Page MenuHomeFreeBSD

[axgbe] fix compiler warnings when compiling using gcc-6.4
ClosedPublic

Authored by adrian on Oct 18 2020, 5:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 1:21 PM
Unknown Object (File)
Fri, Nov 15, 4:08 PM
Unknown Object (File)
Tue, Nov 5, 5:25 AM
Unknown Object (File)
Fri, Nov 1, 4:17 AM
Unknown Object (File)
Thu, Oct 24, 10:37 PM
Unknown Object (File)
Sep 30 2024, 7:42 PM
Unknown Object (File)
Sep 17 2024, 7:11 PM
Unknown Object (File)
Sep 14 2024, 5:01 AM

Details

Summary

This fixes some compiler warnings:

  • uninitialised variable use
  • Using XGBE_ADV rather than XGBE_ADV_SET in the phy-v2 path
Test Plan
  • just compile tested; I don't have hardware to test, esp the phy-v2 path

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kevans added a subscriber: rajesh1.kumar_amd.com.

Adding submitter, @rajesh1.kumar_amd.com -- looks like Adrian already worked up a patch here.

Thanks @adrian for taking on this. From a compilation perspective, Looks good. I don't have any more specific comments.

who has test hardware that can test this and report back?

rpokala added a subscriber: rpokala.

I don't have the hardware to test, but the change looks fine.

  1. The zero-initialization is obviously valid
  2. It's clear in context that XGBE_SET_ADV() (which sets the flag) is what was really intended, instead of testing the flag with XGBE_ADV() and throwing away the result.
This revision is now accepted and ready to land.Dec 3 2020, 3:46 AM