| Message ID | 20260715175229.24672-9-linkmauve@linkmauve.fr (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-24450-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 744071C09D6 for <noreply@patchwork.local>; Wed, 15 Jul 2026 19:57:56 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-24450-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-24450-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 092DD303A704 for <noreply@patchwork.local>; Wed, 15 Jul 2026 17:53:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 895614A2E21; Wed, 15 Jul 2026 17:53:29 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Received: from luna.linkmauve.fr (82-65-109-163.subs.proxad.net [82.65.109.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 462AB4A1399; Wed, 15 Jul 2026 17:53:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.65.109.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784138009; cv=none; b=cn1lKPDSkaF17FGnYaH7qgwLfWGkqfqp0ubCQZBE2BCE2sfHMmNXrR+0GXs0YjFw7eAGJj3qMFebaoIJ9kiJiqXOs0sgdzlqZjY/Qo27uUXMqPkWVKp1SX4hbEKxMYataPq4ry/zj04ucliMecXYwjZ9dcSlLQH7j63t1TWUtng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784138009; c=relaxed/simple; bh=/KIAOxfi5qPCF7yk1qXbs6TZ1oDnkuWk8273p3ANjNU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YO+HZcaeuZGCXEAOxNM9s0RcKlaBKD3AC9OdMETwq1F3EeME5b7m5eHR3J1xzeQyHyY7iX7WmoREL3IlWNJyDyj6K9PbATRqu02GzZ7vKRcjl7xW80YIXqOn8xOckmkohRxNIwZzOEhEVBW9YFcWsJV/qG+0MzmDGtFMxT8+vQo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linkmauve.fr; spf=pass smtp.mailfrom=linkmauve.fr; arc=none smtp.client-ip=82.65.109.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linkmauve.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linkmauve.fr Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 6F87FF402E8; Wed, 15 Jul 2026 19:52:55 +0200 (CEST) From: Link Mauve <linkmauve@linkmauve.fr> To: Srinivas Kandagatla <srini@kernel.org> Cc: Link Mauve <linkmauve@linkmauve.fr>, Neil Armstrong <neil.armstrong@linaro.org>, Kevin Hilman <khilman@baylibre.com>, Jerome Brunet <jbrunet@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.com>, Jonathan Cameron <jic23@kernel.org>, David Lechner <dlechner@baylibre.com>, =?utf-8?q?Nuno_S=C3=A1?= <nuno.sa@analog.com>, Andy Shevchenko <andy@kernel.org>, Sakari Ailus <sakari.ailus@linux.intel.com>, Tianshu Qiu <tian.shu.qiu@intel.com>, Bingbu Cao <bingbu.cao@intel.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Aaro Koskinen <aaro.koskinen@iki.fi>, Andreas Kemnade <andreas@kemnade.info>, Roger Quadros <rogerq@kernel.org>, Tony Lindgren <tony@atomide.com>, Lee Jones <lee@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Bartosz Golaszewski <brgl@kernel.org>, "Vaibhaav Ram T.L" <vaibhaavram.tl@microchip.com>, Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>, Frank Li <Frank.Li@nxp.com>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Vladimir Zapolskiy <vz@mleia.com>, =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@linaro.org>, Orson Zhai <orsonzhai@gmail.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, Chunyan Zhang <zhang.lyra@gmail.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Praveen Teja Kundanala <praveen.teja.kundanala@amd.com>, Kalyani Akula <kalyani.akula@amd.com>, Michal Simek <michal.simek@amd.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Joshua Kinard <linux@kumba.dev>, Antoniu Miclaus <antoniu.miclaus@analog.com>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Miguel Ojeda <ojeda@kernel.org>, Boqun Feng <boqun@kernel.org>, Gary Guo <gary@garyguo.net>, =?utf-8?q?Bj?= =?utf-8?q?=C3=B6rn_Roy_Baron?= <bjorn3_gh@protonmail.com>, Benno Lossin <lossin@kernel.org>, Andreas Hindborg <a.hindborg@kernel.org>, Alice Ryhl <aliceryhl@google.com>, Trevor Gross <tmgross@umich.edu>, Danilo Krummrich <dakr@kernel.org>, Daniel Almeida <daniel.almeida@collabora.com>, Tamir Duberstein <tamird@kernel.org>, Alexandre Courbot <acourbot@nvidia.com>, =?utf-8?q?Onur_=C3=96zkan?= <work@onurozkan.dev>, Daniel Lezcano <daniel.lezcano@kernel.org>, Johan Hovold <johan@kernel.org>, Ronald Claveau <linux-kernel-dev@aliel.fr>, Salah Triki <salah.triki@gmail.com>, Yury Norov <ynorov@nvidia.com>, David Carlier <devnexen@gmail.com>, Achim Gratz <Achim.Gratz@Stromeko.DE>, Alexander Sverdlin <alexander.sverdlin@siemens.com>, Patrick Wicki <patrick.wicki@siemens.com>, Markus Heidelberg <m.heidelberg@cab.de>, Markus Perkins <markus@notsyncing.net>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=28?= =?utf-8?q?The_Capable_Hub=29?= <u.kleine-koenig@baylibre.com>, Bjorn Helgaas <bhelgaas@google.com>, Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>, Chen Ni <nichen@iscas.ac.cn>, Kees Cook <kees@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, mfd@lists.linux.dev, linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-rtc@vger.kernel.org, linux-sunxi@lists.linux.dev, rust-for-linux@vger.kernel.org Subject: [PATCH 8/8] media: ov2740: remove NULL reg_write callback Date: Wed, 15 Jul 2026 19:52:24 +0200 Message-ID: <20260715175229.24672-9-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260715175229.24672-1-linkmauve@linkmauve.fr> References: <20260715175229.24672-1-linkmauve@linkmauve.fr> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= |
| Series |
nvmem: make reg_write() take a const void *
|
|
Commit Message
Link Mauve
July 15, 2026, 5:52 p.m. UTC
This field is already initialized to NULL, so there is no reason to
write it again.
This prevents it from appearing while grepping for reg_write in the
future.
Signed-off-by: Link Mauve <linkmauve@linkmauve.fr>
---
drivers/media/i2c/ov2740.c | 1 -
1 file changed, 1 deletion(-)
Comments
> This field is already initialized to NULL, so there is no reason to > write it again. > > This prevents it from appearing while grepping for reg_write in the > future. > > Signed-off-by: Link Mauve <linkmauve@linkmauve.fr> Sashiko has reviewed this patch and found no issues. It looks great!
Hi, On Wed, Jul 15, 2026 at 07:52:24PM +0200, Link Mauve wrote: > This field is already initialized to NULL, so there is no reason to > write it again. > > This prevents it from appearing while grepping for reg_write in the > future. > > Signed-off-by: Link Mauve <linkmauve@linkmauve.fr> I believe we need a real name here. > --- > drivers/media/i2c/ov2740.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c > index fb590dfadda1..799eca4023da 100644 > --- a/drivers/media/i2c/ov2740.c > +++ b/drivers/media/i2c/ov2740.c > @@ -1271,7 +1271,6 @@ static int ov2740_register_nvmem(struct i2c_client *client, > nvmem_config.compat = true; > nvmem_config.base_dev = dev; > nvmem_config.reg_read = ov2740_nvmem_read; > - nvmem_config.reg_write = NULL; > nvmem_config.priv = nvm; > nvmem_config.stride = 1; > nvmem_config.word_size = 1; I think it'd be nicer to do the initialisation in variable declaration -- all the information is available already there.
Hi Sakari, On 20-Jul-26 11:39, Sakari Ailus wrote: > Hi, > > On Wed, Jul 15, 2026 at 07:52:24PM +0200, Link Mauve wrote: >> This field is already initialized to NULL, so there is no reason to >> write it again. >> >> This prevents it from appearing while grepping for reg_write in the >> future. >> >> Signed-off-by: Link Mauve <linkmauve@linkmauve.fr> > > I believe we need a real name here. We don't need a real name / official name here, just a "known identity", IOW not "anonoymous1234" since Link has clearly is using Link Mauve as their internet identity (given they went through the trouble of registering it as a domain) I believe the S-o-b here is fine as is. See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d4563201f33a022fc0353033d9dfeb1606a88330 where the "real name" policy was weakened to "known identity". Regards, Hans > >> --- >> drivers/media/i2c/ov2740.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c >> index fb590dfadda1..799eca4023da 100644 >> --- a/drivers/media/i2c/ov2740.c >> +++ b/drivers/media/i2c/ov2740.c >> @@ -1271,7 +1271,6 @@ static int ov2740_register_nvmem(struct i2c_client *client, >> nvmem_config.compat = true; >> nvmem_config.base_dev = dev; >> nvmem_config.reg_read = ov2740_nvmem_read; >> - nvmem_config.reg_write = NULL; >> nvmem_config.priv = nvm; >> nvmem_config.stride = 1; >> nvmem_config.word_size = 1; > > I think it'd be nicer to do the initialisation in variable declaration -- > all the information is available already there. >
Hi Hans, On Mon, Jul 20, 2026 at 12:34:10PM +0200, johannes.goede@oss.qualcomm.com wrote: > Hi Sakari, > > On 20-Jul-26 11:39, Sakari Ailus wrote: > > Hi, > > > > On Wed, Jul 15, 2026 at 07:52:24PM +0200, Link Mauve wrote: > >> This field is already initialized to NULL, so there is no reason to > >> write it again. > >> > >> This prevents it from appearing while grepping for reg_write in the > >> future. > >> > >> Signed-off-by: Link Mauve <linkmauve@linkmauve.fr> > > > > I believe we need a real name here. > > We don't need a real name / official name here, just a "known identity", > IOW not "anonoymous1234" since Link has clearly is using Link Mauve as > their internet identity (given they went through the trouble of > registering it as a domain) I believe the S-o-b here is fine as is. > > See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d4563201f33a022fc0353033d9dfeb1606a88330 > where the "real name" policy was weakened to "known identity". Ack, thanks for pointing that out!
diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c index fb590dfadda1..799eca4023da 100644 --- a/drivers/media/i2c/ov2740.c +++ b/drivers/media/i2c/ov2740.c @@ -1271,7 +1271,6 @@ static int ov2740_register_nvmem(struct i2c_client *client, nvmem_config.compat = true; nvmem_config.base_dev = dev; nvmem_config.reg_read = ov2740_nvmem_read; - nvmem_config.reg_write = NULL; nvmem_config.priv = nvm; nvmem_config.stride = 1; nvmem_config.word_size = 1;