Page MenuHomeFreeBSD

ena(4): Fix building with gcc9
AcceptedPublic

Authored by lwhsu on Wed, Jul 14, 7:19 AM.

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 Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 40465
Build 37354: arc lint + arc unit

Event Timeline

lwhsu requested review of this revision.Wed, Jul 14, 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.Wed, Jul 14, 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.