Page MenuHomeFreeBSD

ena_plat.h: delete WARN_ON dead code
ClosedPublic

Authored by rlibby on Jul 4 2017, 9:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 17, 3:38 AM
Unknown Object (File)
Mon, Nov 17, 1:16 AM
Unknown Object (File)
Thu, Nov 13, 10:29 PM
Unknown Object (File)
Thu, Nov 6, 12:10 AM
Unknown Object (File)
Tue, Nov 4, 7:14 AM
Unknown Object (File)
Tue, Oct 21, 10:31 AM
Unknown Object (File)
Tue, Oct 21, 10:31 AM
Unknown Object (File)
Tue, Oct 21, 10:31 AM
Subscribers

Details

Summary

gcc issues a "useless statement" error about unlikely(__ret_warn_on); in the WARN_ON in ena_plat.h. In WARN_ONs defined elsewhere, this terminal statement is part of a statement-expression, but not here. Rather than make this WARN_ON like the others, just delete it, as it is apparently unused anyway: the only caller (ENA_ASSERT) always passes false.

This fixes buildkernel for ena-com with gcc.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 10305
Build 10722: arc lint + arc unit

Event Timeline

rlibby added a reviewer: cperciva.

Ping. This is a tiny patch for dead code elimination which allows gcc to build ena-com with standard warning flags.

This revision is now accepted and ready to land.Jul 28 2017, 6:01 AM
This revision was automatically updated to reflect the committed changes.