From df00fb68b9f65b3540fa22663ac954755b4e6755 Mon Sep 17 00:00:00 2001 From: Marcin Wojtas Date: Tue, 1 Aug 2017 10:44:29 +0000 Subject: ena_plat.h: delete WARN_ON dead code 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) --- ena_plat.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ena_plat.h b/ena_plat.h index 481f7aa4bbadd..48127d1d8d7b2 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) -- cgit v1.2.3