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 CB54EC87FCF for ; Thu, 7 Aug 2025 07:02:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Cc:To:Subject:From:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Cjn7iFOjPRb8qVGhwqQkhAl0V4bzxrYAWCtxnBYOqC4=; b=Lv1sczPwnNEjANckJTD1MP00Gg +REaSZYY3akHLl5Wm8gdFOA35jvQm/dCOZQt5kQ6BMIir6T7ijkFZA+KwvLrjq4mAbqIOz+GJm5PC ubuX3hcvy38pGIaTiZnOAsBdZfR6dU0D8DsX8552RJT3LUfZHJO+oWJVkAUJLuCUUm8t2GyhbQQJj eJHV5VoaTKQscGEAzS+KfQJJ0kKm1C4Me1bkbp4qZsKZtqW4iAn0ZNJys5sA7l3Gk6fNC8q8yQHkZ aS7ZeUJALslFFDdvGRjBCAh6GgM9rKw5CRcIA9YgyhLiWf7hDF0XjULuXyeS1ew1RYqnkisz4c00c 1mYiznbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ujudc-0000000HPtG-0IuL; Thu, 07 Aug 2025 07:02:08 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ujua0-0000000HPI5-2R7v; Thu, 07 Aug 2025 06:58:26 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id AF050437A3; Thu, 7 Aug 2025 06:58:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3474EC4CEEB; Thu, 7 Aug 2025 06:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754549903; bh=tNf8yXWpoqOnHiYWPw3fqpNsTnL+1s/P0u4Xeao7oac=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=FiIz5oVgOYMO6q4869RWcOtlVdu9nL+0h0TxLPttL1GsnNHj8WeGZvdTa0hQ9g2IF b2wpXZEdscZwcYTFUfD3Vak7J29IVobTHxanKkkz14AEYU/ukIZ++vsVvVAw99umRg fszGhSjaHM5r+e6TZDl+fqCQot/inXgAQ76e8uSvp7C7I/EYbVds7D778J5GQxDrvP K/8R8NLvCgWzWtfarV/vXEHBez0mayIYSmeKfaDsccXFY1Pe71Jfa20pHWGtm9MUgF 6fVTDAxHrEq3NGzLwa0Z2/p/Q8or6h4Ic4LhSq8VFOMX6ph8bptUk/1SV7iMmp4cMZ 528aoa8dBtCjQ== Message-ID: Date: Thu, 7 Aug 2025 08:58:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Hans Verkuil Subject: Re: [PATCH 58/65] media: zoran: Remove access to __fh To: Jacopo Mondi , Mauro Carvalho Chehab , Devarsh Thakkar , Benoit Parrot , Hans Verkuil , Mike Isely , Laurent Pinchart , Hans de Goede , Parthiban Veerasooran , Christian Gromm , Greg Kroah-Hartman , Alex Shi , Yanteng Si , Dongliang Mu , Jonathan Corbet , Tomasz Figa , Marek Szyprowski , Andy Walls , Michael Tretter , Pengutronix Kernel Team , Bin Liu , Matthias Brugger , AngeloGioacchino Del Regno , Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Mirela Rabulea , Shawn Guo , Sascha Hauer , Fabio Estevam , Kieran Bingham , Michal Simek , Ming Qian , Zhou Peng , Xavier Roumegue , Philipp Zabel , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Sylwester Nawrocki , Jernej Skrabec , Chen-Yu Tsai , Samuel Holland , Daniel Almeida , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Nas Chung , Jackson Lee , Minghsiu Tsai , Houlong Wei , Andrew-CT Chen , Tiffany Lin , Yunfei Dong , Geert Uytterhoeven , Magnus Damm , Mikhail Ulyanov , Jacob Chen , Ezequiel Garcia , Heiko Stuebner , Detlev Casanova , Krzysztof Kozlowski , Alim Akhtar , Sylwester Nawrocki , =?UTF-8?Q?=C5=81ukasz_Stelmach?= , Andrzej Pietrasiewicz , Jacek Anaszewski , Andrzej Hajda , Fabien Dessenne , Hugues Fruchet , Jean-Christophe Trotin , Maxime Coquelin , Alexandre Torgue , Nicolas Dufresne , Benjamin Gaignard , Steve Longerbeam , Maxime Ripard , Paul Kocialkowski , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Robert Foss , Todor Tomov , Vladimir Zapolskiy , Corentin Labbe , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Stanislaw Gruszka Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, imx@lists.linux.dev, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-usb@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, mjpeg-users@lists.sourceforge.net References: <20250802-media-private-data-v1-0-eb140ddd6a9d@ideasonboard.com> <20250802-media-private-data-v1-58-eb140ddd6a9d@ideasonboard.com> Content-Language: en-US, nl In-Reply-To: <20250802-media-private-data-v1-58-eb140ddd6a9d@ideasonboard.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250806_235824_668734_E2EE0631 X-CRM114-Status: GOOD ( 20.65 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 02/08/2025 11:23, Jacopo Mondi wrote: > The __fh parameter is assigned to an unsued variable. Remove it > and remove the unused struct zoran_fh type. > > Signed-off-by: Jacopo Mondi > --- > drivers/media/pci/zoran/zoran.h | 6 ------ > drivers/media/pci/zoran/zoran_driver.c | 3 +-- > 2 files changed, 1 insertion(+), 8 deletions(-) > > diff --git a/drivers/media/pci/zoran/zoran.h b/drivers/media/pci/zoran/zoran.h > index 1cd990468d3de9db8b14b72483972041c57bfee2..d05e222b392156bf1b3b4c83c6591db642c3c377 100644 > --- a/drivers/media/pci/zoran/zoran.h > +++ b/drivers/media/pci/zoran/zoran.h > @@ -154,12 +154,6 @@ struct zoran_jpg_settings { > > struct zoran; > > -/* zoran_fh contains per-open() settings */ > -struct zoran_fh { > - struct v4l2_fh fh; > - struct zoran *zr; > -}; > - > struct card_info { > enum card_type type; > char name[32]; > diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c > index f42f596d3e6295e31e3b33cd83c5f7243911bd30..ec7fc1da4cc02f5a344cb49bb9a783c41c758195 100644 > --- a/drivers/media/pci/zoran/zoran_driver.c > +++ b/drivers/media/pci/zoran/zoran_driver.c > @@ -511,12 +511,11 @@ static int zoran_s_fmt_vid_cap(struct file *file, void *__fh, This driver uses __fh as the name for the second argument of the ioctl callbacks. Can you take this opportunity to rename it to either 'fh' or 'priv'? Generally it's not a good idea to prefix variables with __ for no good reason. Grepping for __fh also shows two other drivers: drivers/media/platform/chips-media/coda/coda-common.c:#define fh_to_ctx(__fh) container_of(__fh, struct coda_ctx, fh) drivers/media/platform/samsung/s5p-mfc/s5p_mfc_common.h:#define fh_to_ctx(__fh) container_of(__fh, struct s5p_mfc_ctx, fh) I think it is a good idea to rename __fh to fh there as well. Regards, Hans > struct v4l2_format *fmt) > { > struct zoran *zr = video_drvdata(file); > - struct zoran_fh *fh = __fh; > int i; > int res = 0; > > if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) > - return zoran_s_fmt_vid_out(file, fh, fmt); > + return zoran_s_fmt_vid_out(file, __fh, fmt); > > for (i = 0; i < NUM_FORMATS; i++) > if (fmt->fmt.pix.pixelformat == zoran_formats[i].fourcc) >