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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0784CC433FE for ; Wed, 23 Nov 2022 08:23:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=wCV5nRTYtrz+yJoAAqxGJFae3yu3WtviAuhTTOtMvtM=; b=yAQX7zPAmvMbNH DqAwclFRh5i/eGiZIU/Sr85hrIVkL1+wLd1iwKSHonxxz5TYoaH8fjj1KlL6STgZYPR+wNpEqpdF/ RagBW0pJ/vmXuQDa9Ir9+mWa+1p+TCGQPuH0R0yLmiJ4UldlyStRoMTRM7FokHRdgEVEi7I0BkX5s hPsR9DDW9IUgjMWtXSquyM6DIt6eDFOBVfV6RQcezx31xoeOcNZRf3xtKIujLCbhD7hXaxwJCob7b 1AtSb2hygZ+mcN89+C+ev5C9GDtFhqAVr8ClxRA/7weRTiaAW5GzS3Lx4kFugJ6K+lxeSHGdOXjs1 H8WdOjvtMopt/q50sGcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxl14-00FU5T-7f; Wed, 23 Nov 2022 08:21:58 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxl0z-00FU3F-Vg for linux-arm-kernel@lists.infradead.org; Wed, 23 Nov 2022 08:21:57 +0000 Received: by mail-wm1-x32d.google.com with SMTP id c65-20020a1c3544000000b003cfffd00fc0so857651wma.1 for ; Wed, 23 Nov 2022 00:21:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=L9Thz9yns+FIJXusgM78SIai92l4nRiseqTTKyEIwSM=; b=Qx9r8WsmzKnrKHCSE/h2oX+vFSIBIZN3d05cSGFXZqC424S44b1Jx8CzvEYjvVo/vQ IvNvyMO05iYuXvNZb8hfX9/s+YkzIT7itzXCXaepG+sICmshpaORyGBsXw47ZThtyFYD lET+9yMm5imEg+7giLsm0yHdWscNKjWIPfvtk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=L9Thz9yns+FIJXusgM78SIai92l4nRiseqTTKyEIwSM=; b=a3ZkDId1xThDK8HL1A6Si0BgFOOdzZWwV7644GUSdkQ3ISFYCOBAae5xU19BYo1Zhz yvRiPHywrAWBXlang6xZmxLDop7j4bjSS3QOIALbPPZAntydh23Gt2gt2aVk5xyv/krr 7zjP72LcJYxPjAzQZJ4muCdC7FTJFrm7XBf0P+eMTHZx2Ocoily77K8dh4yjXp2qNldC 1KBPm2Xm5yYor+/g3zx8SJZE+sW78vSsU4ZtGwddzFKHpiEfdojQXMDMZSvNLJmq+Rtq 1e5tZ+F8WaJw03SuDXh3wvEoIBHepjmvpWVazUsQQ2Ws3T+JEIB6VUL27me1mcmd3Axm aa3g== X-Gm-Message-State: ANoB5plRWHX5HYFthvn2XlzwJ5QgBZyz/gVqUncNAsrIYjSOGLLpTd6y KCQyfP/Hh/Ac0iYr3zlAUroC3Q== X-Google-Smtp-Source: AA0mqf6nenQbqL5kVqF3svPV7Z481oVYS0C1JSjWJhHqfh2Ns7JBkLFmxh0/kDbGvLsWJlVFhwIIHQ== X-Received: by 2002:a05:600c:3795:b0:3cf:cfcd:1e0 with SMTP id o21-20020a05600c379500b003cfcfcd01e0mr11411542wmr.166.1669191711172; Wed, 23 Nov 2022 00:21:51 -0800 (PST) Received: from tom-ThinkPad-T14s-Gen-2i (net-188-217-55-94.cust.vodafonedsl.it. [188.217.55.94]) by smtp.gmail.com with ESMTPSA id bg8-20020a05600c3c8800b003a6125562e1sm1456252wmb.46.2022.11.23.00.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 00:21:50 -0800 (PST) Date: Wed, 23 Nov 2022 09:21:48 +0100 From: Tommaso Merciai To: Lukas Bulwahn Cc: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: imx: remove code for non-existing config IMX_GPT_ICAP Message-ID: <20221123082148.GC39395@tom-ThinkPad-T14s-Gen-2i> References: <20221122132330.30408-1-lukas.bulwahn@gmail.com> <20221122160937.GB39395@tom-ThinkPad-T14s-Gen-2i> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221123_002154_076964_D7715847 X-CRM114-Status: GOOD ( 33.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Lukas, On Wed, Nov 23, 2022 at 08:56:06AM +0100, Lukas Bulwahn wrote: > On Tue, Nov 22, 2022 at 5:09 PM Tommaso Merciai > wrote: > > > > Hi Lukas, > > > > On Tue, Nov 22, 2022 at 02:23:30PM +0100, Lukas Bulwahn wrote: > > > There never was a config IMX_GPT_ICAP in the repository. So remove the code > > > conditional on this config and simplify the callers that just called empty > > > functions. > > > > > > Signed-off-by: Lukas Bulwahn > > > --- > > > drivers/staging/media/imx/imx-media-fim.c | 54 ----------------------- > > > 1 file changed, 54 deletions(-) > > > > > > diff --git a/drivers/staging/media/imx/imx-media-fim.c b/drivers/staging/media/imx/imx-media-fim.c > > > index 3a9182933508..19a48eb445fd 100644 > > > --- a/drivers/staging/media/imx/imx-media-fim.c > > > +++ b/drivers/staging/media/imx/imx-media-fim.c > > > @@ -187,54 +187,6 @@ static void frame_interval_monitor(struct imx_media_fim *fim, > > > send_fim_event(fim, error_avg); > > > } > > > > > > -#ifdef CONFIG_IMX_GPT_ICAP > > > -/* > > > - * Input Capture method of measuring frame intervals. Not subject > > > - * to interrupt latency. > > > - */ > > > -static void fim_input_capture_handler(int channel, void *dev_id, > > > - ktime_t timestamp) > > > -{ > > > - struct imx_media_fim *fim = dev_id; > > > - unsigned long flags; > > > - > > > - spin_lock_irqsave(&fim->lock, flags); > > > - > > > - frame_interval_monitor(fim, timestamp); > > > - > > > - if (!completion_done(&fim->icap_first_event)) > > > - complete(&fim->icap_first_event); > > > - > > > - spin_unlock_irqrestore(&fim->lock, flags); > > > -} > > > - > > > -static int fim_request_input_capture(struct imx_media_fim *fim) > > > -{ > > > - init_completion(&fim->icap_first_event); > > > - > > > - return mxc_request_input_capture(fim->icap_channel, > > > - fim_input_capture_handler, > > > - fim->icap_flags, fim); > > > -} > > > - > > > -static void fim_free_input_capture(struct imx_media_fim *fim) > > > -{ > > > - mxc_free_input_capture(fim->icap_channel, fim); > > > -} > > > - > > > -#else /* CONFIG_IMX_GPT_ICAP */ > > > - > > > -static int fim_request_input_capture(struct imx_media_fim *fim) > > > -{ > > > - return 0; > > > -} > > > - > > > -static void fim_free_input_capture(struct imx_media_fim *fim) > > > -{ > > > -} > > > - > > > -#endif /* CONFIG_IMX_GPT_ICAP */ > > > - > > > /* > > > * In case we are monitoring the first frame interval after streamon > > > * (when fim->num_skip = 0), we need a valid fim->last_ts before we > > > @@ -435,14 +387,8 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim, > > > spin_unlock_irqrestore(&fim->lock, flags); > > > > > > if (icap_enabled(fim)) { > > > - ret = fim_request_input_capture(fim); > > > - if (ret) > > > - goto out; > > > fim_acquire_first_ts(fim); > > > } > > > > As suggested by the checkpatch.pl: > > WARNING: braces {} are not necessary for single statement blocks > > > > > - } else { > > > - if (icap_enabled(fim)) > > > - fim_free_input_capture(fim); > > > } > > > > > > fim->stream_on = on; > > > -- > > > 2.17.1 > > > > > > > Strangely, my checkpatch invocation on next-20221116 did not show that > warning and I am unaware that I made any specific changes to > checkpatch or its configuration. > > Anyway, checkpatch and you, Tommaso, are right and the patch can of > course be improved. I sent out a patch v2: > > https://lore.kernel.org/all/20221123075216.28193-1-lukas.bulwahn@gmail.com/ > > I hope to get an Acked-by: tag from you now. Thanks. Sorry I miss the tag :) Acked-by: Tommaso Merciai Apply the patch then run: scripts/checkpatch.pl -f drivers/staging/media/imx/imx-media-fim.c Regards, Tommaso > > Lukas > > > Apart of this, patch looks good to me. > > Thanks. > > > > Regards, > > Tommaso > > > > -- > > Tommaso Merciai > > Embedded Linux Engineer > > tommaso.merciai@amarulasolutions.com > > __________________________________ > > > > Amarula Solutions SRL > > Via Le Canevare 30, 31100 Treviso, Veneto, IT > > T. +39 042 243 5310 > > info@amarulasolutions.com > > www.amarulasolutions.com -- Tommaso Merciai Embedded Linux Engineer tommaso.merciai@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel