* [PATCH] media: omap2: omapfb: fix bugon.cocci warnings
[not found] <201807260144.q4WK2PMA%fengguang.wu@intel.com>
@ 2018-07-25 17:57 ` kbuild test robot
2018-07-31 11:04 ` Bartlomiej Zolnierkiewicz
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix ifnullfree.cocci warnings kbuild test robot
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix boolreturn.cocci warnings kbuild test robot
2 siblings, 1 reply; 6+ messages in thread
From: kbuild test robot @ 2018-07-25 17:57 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: kbuild-all, linux-kernel, linux-media, Tomi Valkeinen,
Bartlomiej Zolnierkiewicz, linux-omap, linux-fbdev, dri-devel
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] media: omap2: omapfb: fix ifnullfree.cocci warnings
[not found] <201807260144.q4WK2PMA%fengguang.wu@intel.com>
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix bugon.cocci warnings kbuild test robot
@ 2018-07-25 17:57 ` 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
2 siblings, 1 reply; 6+ messages in thread
From: kbuild test robot @ 2018-07-25 17:57 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: linux-fbdev, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
linux-kernel, dri-devel, kbuild-all, Tomi Valkeinen,
Laurent Pinchart, linux-omap, linux-media
From: kbuild test robot <fengguang.wu@intel.com>
drivers/video/fbdev/omap2/omapfb/dss/core.c:141:2-26: WARNING: NULL check before some freeing functions is not needed.
NULL check before some freeing functions is not needed.
Based on checkpatch warning
"kfree(NULL) is safe this check is probably not required"
and kfreeaddr.cocci by Julia Lawall.
Generated by: scripts/coccinelle/free/ifnullfree.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!
core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/video/fbdev/omap2/omapfb/dss/core.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c
@@ -137,8 +137,7 @@ static int dss_initialize_debugfs(void)
static void dss_uninitialize_debugfs(void)
{
- if (dss_debugfs_dir)
- debugfs_remove_recursive(dss_debugfs_dir);
+ debugfs_remove_recursive(dss_debugfs_dir);
}
int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] media: omap2: omapfb: fix boolreturn.cocci warnings
[not found] <201807260144.q4WK2PMA%fengguang.wu@intel.com>
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix bugon.cocci warnings kbuild test robot
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix ifnullfree.cocci warnings kbuild test robot
@ 2018-07-25 17:57 ` kbuild test robot
2018-07-31 11:03 ` Bartlomiej Zolnierkiewicz
2 siblings, 1 reply; 6+ messages in thread
From: kbuild test robot @ 2018-07-25 17:57 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: kbuild-all, linux-kernel, linux-media, Tomi Valkeinen,
Bartlomiej Zolnierkiewicz, Dan Carpenter, linux-omap, linux-fbdev,
dri-devel
From: kbuild test robot <fengguang.wu@intel.com>
drivers/video/fbdev/omap2/omapfb/omapfb-main.c:290:9-10: WARNING: return of 0/1 in function 'cmp_var_to_colormode' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
Fixes: 7378f1149884 ("media: omap2: omapfb: allow building it with COMPILE_TEST")
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---
omapfb-main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
@@ -287,7 +287,7 @@ static bool cmp_var_to_colormode(struct
var->red.length = 0 ||
var->blue.length = 0 ||
var->green.length = 0)
- return 0;
+ return false;
return var->bits_per_pixel = color->bits_per_pixel &&
cmp_component(&var->red, &color->red) &&
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: omap2: omapfb: fix boolreturn.cocci warnings
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix boolreturn.cocci warnings kbuild test robot
@ 2018-07-31 11:03 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-07-31 11:03 UTC (permalink / raw)
To: kbuild test robot
Cc: linux-fbdev, linux-omap, linux-kernel, dri-devel, Tomi Valkeinen,
kbuild-all, Mauro Carvalho Chehab, Dan Carpenter, linux-media
On Thursday, July 26, 2018 01:57:00 AM kbuild test robot wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
>
> drivers/video/fbdev/omap2/omapfb/omapfb-main.c:290:9-10: WARNING: return of 0/1 in function 'cmp_var_to_colormode' with return type bool
>
> Return statements in functions returning bool should use
> true/false instead of 1/0.
> Generated by: scripts/coccinelle/misc/boolreturn.cocci
>
> Fixes: 7378f1149884 ("media: omap2: omapfb: allow building it with COMPILE_TEST")
> Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Patch queued for 4.19 (w/ "media"->"fbdev" fixup in the patch title), thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: omap2: omapfb: fix bugon.cocci warnings
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix bugon.cocci warnings kbuild test robot
@ 2018-07-31 11:04 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-07-31 11:04 UTC (permalink / raw)
To: kbuild test robot
Cc: Mauro Carvalho Chehab, kbuild-all, linux-kernel, linux-media,
Tomi Valkeinen, linux-omap, linux-fbdev, dri-devel
On Thursday, July 26, 2018 01:57:00 AM kbuild test robot wrote:
> 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>
Patch queued for 4.19 (w/ "media"->"fbdev" fixup in the patch title), thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] media: omap2: omapfb: fix ifnullfree.cocci warnings
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix ifnullfree.cocci warnings kbuild test robot
@ 2018-07-31 11:04 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-07-31 11:04 UTC (permalink / raw)
To: kbuild test robot
Cc: Mauro Carvalho Chehab, kbuild-all, linux-kernel, linux-media,
Tomi Valkeinen, Laurent Pinchart, Arnd Bergmann, linux-omap,
linux-fbdev, dri-devel
On Thursday, July 26, 2018 01:57:00 AM kbuild test robot wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
>
> drivers/video/fbdev/omap2/omapfb/dss/core.c:141:2-26: WARNING: NULL check before some freeing functions is not needed.
>
> NULL check before some freeing functions is not needed.
>
> Based on checkpatch warning
> "kfree(NULL) is safe this check is probably not required"
> and kfreeaddr.cocci by Julia Lawall.
>
> Generated by: scripts/coccinelle/free/ifnullfree.cocci
>
> Fixes: 7378f1149884 ("media: omap2: omapfb: allow building it with COMPILE_TEST")
> Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
Patch queued for 4.19 (w/ "media"->"fbdev" fixup in the patch title), thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-07-31 11:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201807260144.q4WK2PMA%fengguang.wu@intel.com>
2018-07-25 17:57 ` [PATCH] media: omap2: omapfb: fix bugon.cocci warnings kbuild test robot
2018-07-31 11:04 ` Bartlomiej Zolnierkiewicz
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
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).