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
F81558953: D26839.id.diff
Thu, Apr 18, 1:36 AM
F81558074: D26839.diff
Thu, Apr 18, 1:19 AM
Unknown Object (File)
Feb 4 2024, 7:12 PM
Unknown Object (File)
Jan 20 2024, 3:46 PM
Unknown Object (File)
Dec 20 2023, 7:04 AM
Unknown Object (File)
Dec 12 2023, 9:50 AM
Unknown Object (File)
Nov 14 2023, 12:53 AM
Unknown Object (File)
Nov 13 2023, 4:56 PM

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