diff mbox

[linuxtv-media:devel,497/499] drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON

Message ID alpine.DEB.2.10.1408271905180.7069@hadrien (mailing list archive)
State New, archived
Headers show

Commit Message

Julia Lawall Aug. 27, 2014, 5:07 p.m. UTC
The bug_on one doesn't look like a good idea, but the returnvar one would
make the code a little simpler.

julia

On Thu, 28 Aug 2014, kbuild test robot wrote:

> TO: Mauro Carvalho Chehab <m.chehab@samsung.com>
> CC: linux-media@vger.kernel.org
>
> Hi Mauro,
>
> First bad commit (maybe != root cause):
>
> tree:   git://linuxtv.org/media_tree.git devel
> head:   38a0731165250a0a77eff7b90ea3156d44cc7d66
> commit: 7155043c2d027c9c848c3d09badb5af2894ed652 [497/499] [media] enable COMPILE_TEST for media drivers
> :::::: branch date: 19 hours ago
> :::::: commit date: 19 hours ago
>
> >> drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON
> >> drivers/media/platform/s5p-mfc/s5p_mfc.c:333:3-6: WARNING: Use BUG_ON
> >> drivers/media/platform/s5p-mfc/s5p_mfc.c:406:2-5: WARNING: Use BUG_ON
> >> drivers/media/platform/s5p-mfc/s5p_mfc.c:548:3-6: WARNING: Use BUG_ON
> >> drivers/media/platform/s5p-mfc/s5p_mfc.c:556:3-6: WARNING: Use BUG_ON
> >> drivers/media/platform/s5p-mfc/s5p_mfc.c:509:2-5: WARNING: Use BUG_ON
> >> drivers/media/platform/s5p-mfc/s5p_mfc.c:634:4-7: WARNING: Use BUG_ON
> --
> >> drivers/media/platform/davinci/vpfe_capture.c:946:5-8: Unneeded variable: "ret". Return "0" on line 951
>
> Please consider folding the attached diff :-)
>
> ---
> 0-DAY kernel build testing backend              Open Source Technology Center
> http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation
>
diff mbox

Patch

From: Fengguang Wu <fengguang.wu@intel.com>
Subject: [PATCH] fix coccinelle warnings
TO: Mauro Carvalho Chehab <m.chehab@samsung.com>
CC: Mauro Carvalho Chehab <m.chehab@samsung.com>
CC: linux-media@vger.kernel.org 
CC: davinci-linux-open-source@linux.davincidsp.com 
CC: linux-kernel@vger.kernel.org 

drivers/media/platform/davinci/vpfe_capture.c:946:5-8: Unneeded variable: "ret". Return "0" on line 951


 Removes unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 vpfe_capture.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -943,12 +943,11 @@  static int vpfe_g_fmt_vid_cap(struct fil
 				struct v4l2_format *fmt)
 {
 	struct vpfe_device *vpfe_dev = video_drvdata(file);
-	int ret = 0;
 
 	v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_g_fmt_vid_cap\n");
 	/* Fill in the information about format */
 	*fmt = vpfe_dev->fmt;
-	return ret;
+	return 0;
 }
 
 static int vpfe_enum_fmt_vid_cap(struct file *file, void  *priv,