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)
May 2 2024, 1:32 AM
Unknown Object (File)
May 1 2024, 6:24 AM
Unknown Object (File)
Apr 30 2024, 8:10 AM
Unknown Object (File)
Apr 29 2024, 3:54 PM
Unknown Object (File)
Apr 20 2024, 10:28 AM
Unknown Object (File)
Apr 20 2024, 10:28 AM
Unknown Object (File)
Apr 18 2024, 1:36 AM
Unknown Object (File)
Apr 18 2024, 1:19 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