Page MenuHomeFreeBSD

ena(4): Fix building with gcc9
AcceptedPublic

Authored by lwhsu on Jul 14 2021, 7:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 2:42 AM
Unknown Object (File)
Dec 20 2023, 4:59 AM
Unknown Object (File)
Apr 26 2023, 4:11 AM
Unknown Object (File)
Apr 8 2023, 10:44 AM
Subscribers

Details

Reviewers
mw
imp
Summary

Currently gcc9 build has following error:

In file included from /usr/home/lwhsu/freebsd-src/sys/contrib/ena-com/ena_com.h:37,
                 from /usr/home/lwhsu/freebsd-src/sys/dev/ena/ena.h:39,
                 from /usr/home/lwhsu/freebsd-src/sys/dev/ena/ena_netmap.c:35:
/usr/home/lwhsu/freebsd-src/sys/contrib/ena-com/ena_plat.h:101:12: error: redundant redeclaration of 'ena_log_level' [-Werror=redundant-decls]
  101 | extern int ena_log_level;
      |            ^~~~~~~~~~~~~
In file included from /usr/home/lwhsu/freebsd-src/sys/contrib/ena-com/ena_plat.h:94,
                 from /usr/home/lwhsu/freebsd-src/sys/contrib/ena-com/ena_com.h:37,
                 from /usr/home/lwhsu/freebsd-src/sys/dev/ena/ena.h:39,
                 from /usr/home/lwhsu/freebsd-src/sys/dev/ena/ena_netmap.c:35:
/usr/home/lwhsu/freebsd-src/sys/contrib/ena-com/ena_fbsd_log.h:44:12: note: previous declaration of 'ena_log_level' was here
   44 | extern int ena_log_level;
      |            ^~~~~~~~~~~~~

Although ena_log_level looks belonging to ena_plat.h more, but it is only
used in ena_fbsd_log.h and because the including order, I keep the one in
ena_fbsd_log.h.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 40465
Build 37354: arc lint + arc unit

Event Timeline

lwhsu requested review of this revision.Jul 14 2021, 7:19 AM

This seems fine, but since this is in contrib, is there an upstream that needs this change too?

This revision is now accepted and ready to land.Jul 14 2021, 2:38 PM

Hi! Thank you for the change. LGTM, but it's a code shared between all Amazon components, so we need to get an ack first. Once all is confirmed, I will merge it through the vendor branch to contrib.