Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1073934imm; Wed, 25 Jul 2018 11:02:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeQtJUDCzthPYKt3KiDN6XoARtFLI7mL38+Xb6R23NFLu1SkDtkkJx/bTC3GcDUdEquNlVp X-Received: by 2002:a63:29c6:: with SMTP id p189-v6mr21805589pgp.305.1532541721240; Wed, 25 Jul 2018 11:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532541721; cv=none; d=google.com; s=arc-20160816; b=iWUyHva004N8er/Oo7C5NYPvSJSp0h1LGjmmCdtQzP2ihLNN3o437hmxcC7pWhsbwQ zgncChGEODUA5PEXNTnglr/hZ6UGwDV9WXrSZqK4a2Za2uQNiIvUxx9v3C0b4BTDyw5S A3c2g0uoR+Cn+bF4DZd50mdRSXI29gaSuJwbUAUmAj4KlcNuCouuvZBdjwbA24pNE3aa K5V2t6J9I93W1DrDIFChqSZnTwRYfshS8QdOaqohHm95f+OsBN36A4TUAny5wUVV/CUf hm2qGdNILY04LTw/PmVMKZ8z1qsAc6canD6vcoKQamNF5O5uCT0FGXHpx7YGaHIhcAj4 1Mjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=v3k36i61a+Df0Y+Rw6OFxj4AmRpD1fGqi/nVBX+oiKI=; b=kwM9g/Hqi2nblu/N7KUsDEVbsF3a54oKBZu7VgHrLNcv+qz8eFISL8UZZmrJjbA/zx ocVxFwm9G+GgubtO2acOW9v8Mmjp+4dF2HzqAU0+QSMABbYyU0HOHq4RFM9RtV8/Osrh t1sQwQkJR9QOhuZwAVG/y0WR5kPj3gtkgvX6twGNjRlS0+NvKJOjbIsT36lbkiALnEoH hPvBsYn1j1n1gsbcey5XgmTR8PH1KTO9nWDFlez1ef9zqiFwDJZuW6gWl9HpPRJcqljk 6SzZVNfEuwvtIwtv3FuoT29e77eFntK/B2eYYl+6asVr+x2kuneVzPi7mzBMWvt6GXtf yJrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j85-v6si16252130pfa.232.2018.07.25.11.01.45; Wed, 25 Jul 2018 11:02:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730181AbeGYTMv (ORCPT + 99 others); Wed, 25 Jul 2018 15:12:51 -0400 Received: from mga03.intel.com ([134.134.136.65]:30139 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729367AbeGYTMv (ORCPT ); Wed, 25 Jul 2018 15:12:51 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2018 11:00:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,401,1526367600"; d="scan'208";a="74466575" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga004.fm.intel.com with ESMTP; 25 Jul 2018 10:57:07 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1fiO26-000Ltt-Fi; Thu, 26 Jul 2018 01:57:06 +0800 Date: Thu, 26 Jul 2018 01:57:00 +0800 From: kbuild test robot To: Mauro Carvalho Chehab Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Tomi Valkeinen , Bartlomiej Zolnierkiewicz , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH] media: omap2: omapfb: fix bugon.cocci warnings Message-ID: <20180725175700.GA82595@lkp-sb05.lkp.intel.com> References: <201807260144.q4WK2PMA%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807260144.q4WK2PMA%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: lkp@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/video/fbdev/omap2/omapfb/dss/dss_features.c:895:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h) Use BUG_ON instead of a if condition followed by BUG. Semantic patch information: This makes an effort to find cases where BUG() follows an if condition on an expression and replaces the if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. Generated by: scripts/coccinelle/misc/bugon.cocci Fixes: 7378f1149884 ("media: omap2: omapfb: allow building it with COMPILE_TEST") Signed-off-by: kbuild test robot --- Please take the patch only if it's a positive warning. Thanks! dss_features.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dss_features.c @@ -891,8 +891,7 @@ bool dss_has_feature(enum dss_feat_id id void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end) { - if (id >= omap_current_dss_features->num_reg_fields) - BUG(); + BUG_ON(id >= omap_current_dss_features->num_reg_fields); *start = omap_current_dss_features->reg_fields[id].start; *end = omap_current_dss_features->reg_fields[id].end;