Message ID | 20230123191714.22430-1-bpappas@pappasbrent.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1776611wrn; Mon, 23 Jan 2023 11:21:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXtg6buKuMyMd7dUCUnGFweuMZZXeVA6PGMTIDY7AYaDEwrqBLtN4Mf5MNULYiLvxljeOeM1 X-Received: by 2002:a17:906:9e91:b0:84d:373b:39da with SMTP id fx17-20020a1709069e9100b0084d373b39damr23624232ejc.40.1674501717522; Mon, 23 Jan 2023 11:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674501717; cv=none; d=google.com; s=arc-20160816; b=aQwZPy8AwuuSjgky4Sh9uFoUVf/O3dTpyRuuo4EM6K7E10Sfc5+DkGgylPVuJtiGIH DkhzTISOhy69WHQK30dFsvTcSyrfRuxNRuLOeBX7+RHMn3CzLiK22mHQVQz+UdA2u5FL LwYaOcYCqGw9P4FutniBG2t+4l+tp78SN99icr0LCPmjRgISxmZTa+VLaL6r41us5EwD isusXq83ZcQJdjewFcyAXWftSNq6u0fMoX8pH1rlCDWNX2Y1Kn62IKVsoAmSoG8mLySD SYrP0sUhL9xOwkAGglo7JJTBcyCYg2uZeZNhi0QrnAPqWbWqsczLcNNCJcAnLVGkqVnb kv+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=u/BoPNbHSbwi3taws8Rph0mfYtyTalNF9o8vu8MXtck=; b=qq/lHP2d4dVgurZJzOv+z5ant+V+l+4H3lkaGHuT0ifCr38qZZ5A5XbcpaCTz7nzzL qq8QpoldDlTzd7L6aN9rtmyG0Jr+ufcEy9f8jGV4cAPxmn2bOhdK++wGLtNr/7Y0Qyln +IHruF3+NcjAoxWPn5PYlHLz5Oq9MIoWz7AoqBndiPJ+CEL5GC6b0s5/xuyE1C251xZR 3+P84zPh52Z1mxs0BKcEMk3llNNOTRoCWGNtrO3exER28QSU7v5+N9yLFg6nDAe5qE6A XhecceubnIk71h2rc3zfF3Y062preIivLHFavfoMtBiVrFo5xPSBW/wvw9mmkKMo7WjK PSXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pappasbrent.com header.s=default header.b=EhE6xylC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a17090602d300b00877db5bfb27si793488ejk.703.2023.01.23.11.21.33; Mon, 23 Jan 2023 11:21:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@pappasbrent.com header.s=default header.b=EhE6xylC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229557AbjAWTTU (ORCPT <rfc822;willi4wuff@gmail.com> + 99 others); Mon, 23 Jan 2023 14:19:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232556AbjAWTTA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 23 Jan 2023 14:19:00 -0500 Received: from MTA-06-3.privateemail.com (mta-06-3.privateemail.com [198.54.127.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F953CA0E; Mon, 23 Jan 2023 11:18:27 -0800 (PST) Received: from mta-06.privateemail.com (localhost [127.0.0.1]) by mta-06.privateemail.com (Postfix) with ESMTP id 19FA618000A9; Mon, 23 Jan 2023 14:18:26 -0500 (EST) Received: from bpappas-XPS-13-9310.ucf.edu (050-088-208-136.res.spectrum.com [50.88.208.136]) by mta-06.privateemail.com (Postfix) with ESMTPA id 503ED18000A0; Mon, 23 Jan 2023 14:18:09 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pappasbrent.com; s=default; t=1674501505; bh=v9a1fv396joFpPHCngbbu0JqMfh+uZzL3+ZM1rjZYqM=; h=From:To:Cc:Subject:Date:From; b=EhE6xylCj2/9+WTSRj6eWeLuMpJZqTl3NBQgdngAZnpcAjFRkaNtcy96TuKzErHFO 85feHLV/1nDTndy/VdckUL/09agtT+kyjyB0PsMasmoksB4zHiIrOhmZ0M4d/6ShPr kJHUu5YZ+pnr+yf9CoGIrW1O0z5fdtXfYWtF6Q5sk+AdQT3gYyLKkMubcQkS/LVNkl 7+lwm1jMa2YUzvfe7k9XIpToNHr7RwlXY8w3SdP/WW/sKLq0gh3kze0dVpNBPlh7Mj FEz1ieQRPShgPUVBUSbxpiRXfJ67QqxRtmrgRrvxGJgGKvd+c6pF8omP+IaPqV6juR FBiCqLY/ryKTQ== From: Brent Pappas <bpappas@pappasbrent.com> To: slongerbeam@gmail.com Cc: p.zabel@pengutronix.de, mchehab@kernel.org, gregkh@linuxfoundation.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Brent Pappas <bpappas@pappasbrent.com> Subject: [PATCH] media: imx: imx-media-fim: Replace macro icap_enabled() with function Date: Mon, 23 Jan 2023 14:17:14 -0500 Message-Id: <20230123191714.22430-1-bpappas@pappasbrent.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755842313146823256?= X-GMAIL-MSGID: =?utf-8?q?1755842313146823256?= |
Series |
media: imx: imx-media-fim: Replace macro icap_enabled() with function
|
|
Commit Message
Brent Pappas
Jan. 23, 2023, 7:17 p.m. UTC
Replace the macro icap_enabled() with a static function to comply
with Linux coding style standards.
Signed-off-by: Brent Pappas <bpappas@pappasbrent.com>
---
drivers/staging/media/imx/imx-media-fim.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Comments
Hi, thank you for the patch. On 23-01-23, Brent Pappas wrote: > Replace the macro icap_enabled() with a static function to comply > with Linux coding style standards. > > Signed-off-by: Brent Pappas <bpappas@pappasbrent.com> > --- > drivers/staging/media/imx/imx-media-fim.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/media/imx/imx-media-fim.c b/drivers/staging/media/imx/imx-media-fim.c > index fb6590dcfc36..ccb35d098a19 100644 > --- a/drivers/staging/media/imx/imx-media-fim.c > +++ b/drivers/staging/media/imx/imx-media-fim.c > @@ -68,7 +68,10 @@ struct imx_media_fim { > bool stream_on; > }; > > -#define icap_enabled(fim) ((fim)->icap_flags != IRQ_TYPE_NONE) > +static bool icap_enabled(struct imx_media_fim *fim) > +{ > + return fim->icap_flags != IRQ_TYPE_NONE; > +} Nit: I would make it inline but recent compiler may do the job for us. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Regards, Marco > static void update_fim_nominal(struct imx_media_fim *fim, > const struct v4l2_fract *fi) > -- > 2.34.1 > > >
On Mon, Jan 23, 2023 at 10:51:05PM +0100, Marco Felsch wrote: > > -#define icap_enabled(fim) ((fim)->icap_flags != IRQ_TYPE_NONE) > > +static bool icap_enabled(struct imx_media_fim *fim) > > +{ > > + return fim->icap_flags != IRQ_TYPE_NONE; > > +} > > Nit: I would make it inline but recent compiler may do the job for us. > Yeah. These days we tend to not make things inline. regards, dan carpenter > Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> > > Regards, > Marco
diff --git a/drivers/staging/media/imx/imx-media-fim.c b/drivers/staging/media/imx/imx-media-fim.c index fb6590dcfc36..ccb35d098a19 100644 --- a/drivers/staging/media/imx/imx-media-fim.c +++ b/drivers/staging/media/imx/imx-media-fim.c @@ -68,7 +68,10 @@ struct imx_media_fim { bool stream_on; }; -#define icap_enabled(fim) ((fim)->icap_flags != IRQ_TYPE_NONE) +static bool icap_enabled(struct imx_media_fim *fim) +{ + return fim->icap_flags != IRQ_TYPE_NONE; +} static void update_fim_nominal(struct imx_media_fim *fim, const struct v4l2_fract *fi)