From: kbuild test robot <fengguang.wu@intel.com>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: [PATCH] media: omap2: omapfb: fix bugon.cocci warnings
Date: Wed, 25 Jul 2018 17:57:00 +0000 [thread overview]
Message-ID: <20180725175700.GA82595@lkp-sb05.lkp.intel.com> (raw)
In-Reply-To: <201807260144.q4WK2PMA%fengguang.wu@intel.com>
From: kbuild test robot <fengguang.wu@intel.com>
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 <fengguang.wu@intel.com>
---
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;
next prev parent reply other threads:[~2018-07-25 17:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201807260144.q4WK2PMA%fengguang.wu@intel.com>
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix ifnullfree.cocci warnings kbuild test robot
2018-07-31 11:04 ` Bartlomiej Zolnierkiewicz
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix boolreturn.cocci warnings kbuild test robot
2018-07-31 11:03 ` Bartlomiej Zolnierkiewicz
2018-07-25 17:57 ` kbuild test robot [this message]
2018-07-31 11:04 ` [PATCH] media: omap2: omapfb: fix bugon.cocci warnings Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180725175700.GA82595@lkp-sb05.lkp.intel.com \
--to=fengguang.wu@intel.com \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbuild-all@01.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).