From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF343C4649B for ; Fri, 5 Jul 2019 13:58:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BBE5218CA for ; Fri, 5 Jul 2019 13:58:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n3f8GDSh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="njbh5zTq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BBE5218CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9MHjfwVA6ozfFazW8+IJQQRIMAj95MoTqfUQkgr27LE=; b=n3f8GDShUmX5nI wDqPWiDeGzY1c3p/FVkaL75rJ2RfsRuPqRiAZkLpe3xds6qZevJeG25Z5mdLdUdfIQhYSm83rJTuL Nt4hRt3QTE3gE+U7SPZ3F4/bAGHxlg+TFDUTu2h0ai6icFwMZmO3pjkYMsF20HuY8QRuXSB7KBeXw ZfhST1Bvr4zbhJWOCHAdLVAX8OZY1sRUkPlOnaWhBnn7rHyIsqYb+91ai9NZTwXyRc+VNwY5Z6/0V j6qJS5L8/jCNKtv0VGeexLeHO8hAuwIUnzxr1UhKuwXdE7EEKlO6uSoc5PqayHl1w+WaH477W6ViS ziU8s/SC80NJ0va02f2Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hjOip-0000kE-SS; Fri, 05 Jul 2019 13:57:55 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hjLRQ-0003ll-EF for linux-arm-kernel@bombadil.infradead.org; Fri, 05 Jul 2019 10:27:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AqLezy8yu+p4LgSOFzbldePnRb/H3oHZCVdGxBbZVXo=; b=njbh5zTqSPT/lF85msp0YDeRo b01ySwhJ6woquwOraN/bTnw6f1n+XR3UVp1eR6jqhOdmMhRhTdfrQZI+bx6vr1HITzV/0SgtkLm5B Xy83h5dTQZRhO/FzMq+NimU5YZo2G91vSlDHOVHZd1bv6W0Jwm4iZBtworrrX7yb1fArH2JJLFf7U WADCWAmEdovdFDn6eAnmHKAu8LX5EgyFeVDXzTrEyB+CmwSSE7+ZFUqthgVqu2DeO4REg60Dhfytt Pp/6PeUFYKCS2v9PKlFJLPtDYoa6oeNF1i7k33PpUvWSOnQyJxlCF2NIXLB4g4z1x7Nzo7zlUBLap 15N1WvFZQ==; Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by merlin.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hjLR9-000178-F6 for linux-arm-kernel@lists.infradead.org; Fri, 05 Jul 2019 10:27:28 +0000 X-Originating-IP: 93.29.109.196 Received: from aptenodytes (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 58E1A1C0005; Fri, 5 Jul 2019 10:26:50 +0000 (UTC) Date: Fri, 5 Jul 2019 12:26:50 +0200 From: Paul Kocialkowski To: Nishka Dasgupta Subject: Re: [PATCH 2/2] staging: media: sunxi: Replace function cedrus_check_format() Message-ID: <20190705102650.GB1645@aptenodytes> References: <20190703081317.22795-1-nishkadg.linux@gmail.com> <20190703081317.22795-2-nishkadg.linux@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190703081317.22795-2-nishkadg.linux@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, maxime.ripard@bootlin.com, gregkh@linuxfoundation.org, wens@csie.org, mchehab@kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Wed 03 Jul 19, 13:43, Nishka Dasgupta wrote: > Remove function cedrus_check_format as all it does is call > cedrus_find_format. > Rename cedrus_find_format to cedrus_check_format to maintain > compatibility with call sites. > Issue found with Coccinelle. Maybe we could have a !! or a bool cast to make coccinelle happy here? Cheers, Paul > Signed-off-by: Nishka Dasgupta > --- > drivers/staging/media/sunxi/cedrus/cedrus_video.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_video.c b/drivers/staging/media/sunxi/cedrus/cedrus_video.c > index 0ec31b9e0aea..d5cc9ed04fd2 100644 > --- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c > @@ -55,8 +55,8 @@ static inline struct cedrus_ctx *cedrus_file2ctx(struct file *file) > return container_of(file->private_data, struct cedrus_ctx, fh); > } > > -static bool cedrus_find_format(u32 pixelformat, u32 directions, > - unsigned int capabilities) > +static bool cedrus_check_format(u32 pixelformat, u32 directions, > + unsigned int capabilities) > { > struct cedrus_format *fmt; > unsigned int i; > @@ -76,12 +76,6 @@ static bool cedrus_find_format(u32 pixelformat, u32 directions, > return false; > } > > -static bool cedrus_check_format(u32 pixelformat, u32 directions, > - unsigned int capabilities) > -{ > - return cedrus_find_format(pixelformat, directions, capabilities); > -} > - > static void cedrus_prepare_format(struct v4l2_pix_format *pix_fmt) > { > unsigned int width = pix_fmt->width; > -- > 2.19.1 > -- Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel