diff options
author | Marcin Wojtas <mw@FreeBSD.org> | 2017-08-01 10:44:29 +0000 |
---|---|---|
committer | Marcin Wojtas <mw@FreeBSD.org> | 2017-08-01 10:44:29 +0000 |
commit | df00fb68b9f65b3540fa22663ac954755b4e6755 (patch) | |
tree | 7252b773f00b5655e314c12875d67ad51f6b1aaf | |
parent | e1593b114ffa9fede0111ea3c21665c9e5d71014 (diff) |
ena_plat.h: delete WARN_ON dead codevendor/ena-com/1.1.4.2
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.
Submitted by: rlibby
Reviewed by: mw
Approved by: cognet (mentor)
Notes
Notes:
svn path=/vendor-sys/ena-com/dist/; revision=321861
svn path=/vendor-sys/ena-com/1.1.4.2/; revision=321862; tag=vendor/ena-com/1.1.4.2
-rw-r--r-- | ena_plat.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ena_plat.h b/ena_plat.h index 481f7aa4bbad..48127d1d8d7b 100644 --- a/ena_plat.h +++ b/ena_plat.h @@ -139,21 +139,12 @@ extern struct ena_bus_space ebs; #define MAX_ERRNO 4095 #define IS_ERR_VALUE(x) unlikely((x) <= (unsigned long)MAX_ERRNO) -#define WARN_ON(condition) \ - do { \ - int __ret_warn_on = !!(condition); \ - if (unlikely(__ret_warn_on)) \ - printf("%s %s", __FUNCTION__, __FILE__); \ - unlikely(__ret_warn_on); \ - } while (0) - #define ENA_ASSERT(cond, format, arg...) \ do { \ if (unlikely(!(cond))) { \ ena_trc_err( \ "Assert failed on %s:%s:%d:" format, \ __FILE__, __func__, __LINE__, ##arg); \ - WARN_ON(cond); \ } \ } while (0) |