From patchwork Wed Aug 27 17:07:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 4790001 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 286289F2A9 for ; Wed, 27 Aug 2014 17:08:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01B132015A for ; Wed, 27 Aug 2014 17:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5123A20158 for ; Wed, 27 Aug 2014 17:07:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934906AbaH0RHw (ORCPT ); Wed, 27 Aug 2014 13:07:52 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:43851 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756820AbaH0RHv (ORCPT ); Wed, 27 Aug 2014 13:07:51 -0400 X-IronPort-AV: E=Sophos;i="5.04,412,1406584800"; d="scan'208";a="76854146" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Aug 2014 19:07:48 +0200 Date: Wed, 27 Aug 2014 19:07:45 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: kbuild test robot , Mauro Carvalho Chehab cc: kbuild@01.org, linux-media@vger.kernel.org, dan.carpenter@oracle.com Subject: Re: [linuxtv-media:devel 497/499] drivers/media/platform/s5p-mfc/s5p_mfc.c:454:2-5: WARNING: Use BUG_ON In-Reply-To: <53fe0d6b.ILcqU401zWlsffkn%fengguang.wu@intel.com> Message-ID: References: <53fe0d6b.ILcqU401zWlsffkn%fengguang.wu@intel.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-ID: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 > 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 > From: Fengguang Wu Subject: [PATCH] fix coccinelle warnings TO: Mauro Carvalho Chehab CC: Mauro Carvalho Chehab 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 Signed-off-by: Fengguang Wu --- 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,