From patchwork Wed Jul 15 17:52:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Link Mauve X-Patchwork-Id: 2666 Return-Path: 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 1701E1C2FCC for ; Wed, 15 Jul 2026 19:57:05 +0200 (CEST) Authentication-Results: mxe881; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-24446-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-24446-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 9F0AD302C18B for ; Wed, 15 Jul 2026 17:53:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E8F64A2E2E; Wed, 15 Jul 2026 17:53:17 +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 1E6E34A1399; Wed, 15 Jul 2026 17:53:10 +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=1784137997; cv=none; b=HzhopjhtySTOTZIRqEwouFr1im3SKAX+hQdcA9g647yZWuTHmY9EhGSEEj6iFNNqGmMnUsJtAo/CKngbzn12Qd7sJrFjJRchd/PNQ2tU40a8kRH0lNtcv5Yq+dy56ihxquBL3qV557lxF8ifV5nko/wXXvZsRlNHA5Zeg2kJ/LQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784137997; c=relaxed/simple; bh=9OgfLL5KgScCxZBmXsZuyUZVZq0idXb05mKOPsKZp4o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LYII1k1I3/0F47DdrChTdF5mkmIw8JHbVwdqe7up1qPARjbCJaS8/KOQSwVYeMFvXdrNmLyRme0zEhY2oJm8DhcKD8KvDHQN7diwpN3llECg1AdN9YnQQirEO47XiWxB3kGMpcS96bT2SVWDvtJjGKpF1xbshJb89qQ86ow09MQ= 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 093A2F40D21; Wed, 15 Jul 2026 19:52:42 +0200 (CEST) From: Link Mauve To: Srinivas Kandagatla Cc: Link Mauve , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Sakari Ailus , Tianshu Qiu , Bingbu Cao , Mauro Carvalho Chehab , Aaro Koskinen , Andreas Kemnade , Roger Quadros , Tony Lindgren , Lee Jones , Arnd Bergmann , Greg Kroah-Hartman , Bartosz Golaszewski , "Vaibhaav Ram T.L" , Kumaravel Thiagarajan , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Vladimir Zapolskiy , =?utf-8?q?Andr=C3=A9_Draszik?= , Orson Zhai , Baolin Wang , Chunyan Zhang , Maxime Coquelin , Alexandre Torgue , Praveen Teja Kundanala , Kalyani Akula , Michal Simek , Alexandre Belloni , Joshua Kinard , Antoniu Miclaus , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?q?Bj?= =?utf-8?q?=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , =?utf-8?q?Onur_=C3=96zkan?= , Daniel Lezcano , Johan Hovold , Ronald Claveau , Salah Triki , Yury Norov , David Carlier , Achim Gratz , Alexander Sverdlin , Patrick Wicki , Markus Heidelberg , Markus Perkins , =?utf-8?q?Uwe_Kleine-K=C3=B6nig_=28?= =?utf-8?q?The_Capable_Hub=29?= , Bjorn Helgaas , Abd-Alrhman Masalkhi , Chen Ni , Kees Cook , 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 4/8] misc: make all reg_write callbacks take const void * Date: Wed, 15 Jul 2026 19:52:20 +0200 Message-ID: <20260715175229.24672-5-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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [4.34 / 15.00]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; TAGGED_RCPT(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo,linkmauve.fr:email]; PRECEDENCE_BULK(0.00)[]; DMARC_DNSFAIL(0.00)[linkmauve.fr : server fail]; FREEMAIL_CC(0.00)[linkmauve.fr,linaro.org,baylibre.com,googlemail.com,kernel.org,analog.com,linux.intel.com,intel.com,iki.fi,kemnade.info,atomide.com,arndb.de,linuxfoundation.org,microchip.com,nxp.com,pengutronix.de,gmail.com,mleia.com,linux.alibaba.com,foss.st.com,amd.com,bootlin.com,kumba.dev,sholland.org,garyguo.net,protonmail.com,google.com,umich.edu,collabora.com,nvidia.com,onurozkan.dev,aliel.fr,Stromeko.DE,siemens.com,cab.de,notsyncing.net,iscas.ac.cn,lists.infradead.org,vger.kernel.org,lists.linux.dev,st-md-mailman.stormreply.com]; FORGED_SENDER_MAILLIST(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RCVD_COUNT_FIVE(0.00)[5]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_GT_50(0.00)[88]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; TAGGED_FROM(0.00)[bounces-24446-noreply=patchwork.local]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[linkmauve@linkmauve.fr,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 1701E1C2FCC 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?= The previous commit switched from a pointer to mutable data to a pointer to immutable data, so let’s fix all users of the nvmem_config API. Signed-off-by: Link Mauve --- drivers/misc/ds1682.c | 2 +- drivers/misc/eeprom/at24.c | 4 ++-- drivers/misc/eeprom/at25.c | 2 +- drivers/misc/eeprom/eeprom_93xx46.c | 4 ++-- drivers/misc/eeprom/m24lr.c | 2 +- drivers/misc/keba/cp500.c | 2 +- drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/misc/ds1682.c b/drivers/misc/ds1682.c index cb09e056531a..4e42a45c17d4 100644 --- a/drivers/misc/ds1682.c +++ b/drivers/misc/ds1682.c @@ -209,7 +209,7 @@ static int ds1682_nvmem_read(void *priv, unsigned int offset, void *val, return ret < 0 ? ret : 0; } -static int ds1682_nvmem_write(void *priv, unsigned int offset, void *val, +static int ds1682_nvmem_write(void *priv, unsigned int offset, const void *val, size_t bytes) { struct i2c_client *client = priv; diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c index 772c4d9fa651..cd38cf8aad45 100644 --- a/drivers/misc/eeprom/at24.c +++ b/drivers/misc/eeprom/at24.c @@ -477,11 +477,11 @@ static int at24_read(void *priv, unsigned int off, void *val, size_t count) return 0; } -static int at24_write(void *priv, unsigned int off, void *val, size_t count) +static int at24_write(void *priv, unsigned int off, const void *val, size_t count) { struct at24_data *at24; struct device *dev; - char *buf = val; + const char *buf = val; int ret; at24 = priv; diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c index bc2cfb75d9bb..28f1dc1b9be7 100644 --- a/drivers/misc/eeprom/at25.c +++ b/drivers/misc/eeprom/at25.c @@ -235,7 +235,7 @@ static int at25_wait_ready(struct at25_data *at25) return bounce[0]; } -static int at25_ee_write(void *priv, unsigned int off, void *val, size_t count) +static int at25_ee_write(void *priv, unsigned int off, const void *val, size_t count) { u8 *bounce __free(kfree) = kmalloc(min(count, io_limit), GFP_KERNEL); struct at25_data *at25 = priv; diff --git a/drivers/misc/eeprom/eeprom_93xx46.c b/drivers/misc/eeprom/eeprom_93xx46.c index f9c3ab52c2f9..813f295af096 100644 --- a/drivers/misc/eeprom/eeprom_93xx46.c +++ b/drivers/misc/eeprom/eeprom_93xx46.c @@ -268,10 +268,10 @@ eeprom_93xx46_write_word(struct eeprom_93xx46_dev *edev, } static int eeprom_93xx46_write(void *priv, unsigned int off, - void *val, size_t count) + const void *val, size_t count) { struct eeprom_93xx46_dev *edev = priv; - char *buf = val; + const char *buf = val; int ret, step = 1; unsigned int i; diff --git a/drivers/misc/eeprom/m24lr.c b/drivers/misc/eeprom/m24lr.c index 7a9fd45a8e46..22f3221e232b 100644 --- a/drivers/misc/eeprom/m24lr.c +++ b/drivers/misc/eeprom/m24lr.c @@ -374,7 +374,7 @@ static int m24lr_nvmem_read(void *priv, unsigned int offset, void *val, return 0; } -static int m24lr_nvmem_write(void *priv, unsigned int offset, void *val, +static int m24lr_nvmem_write(void *priv, unsigned int offset, const void *val, size_t bytes) { ssize_t err; diff --git a/drivers/misc/keba/cp500.c b/drivers/misc/keba/cp500.c index 6c65fbf22e75..ee7889cb63a8 100644 --- a/drivers/misc/keba/cp500.c +++ b/drivers/misc/keba/cp500.c @@ -590,7 +590,7 @@ static int cp500_nvmem_read(void *priv, unsigned int offset, void *val, return 0; } -static int cp500_nvmem_write(void *priv, unsigned int offset, void *val, +static int cp500_nvmem_write(void *priv, unsigned int offset, const void *val, size_t bytes) { struct cp500_nvmem *nvmem = priv; diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c index a2ed477e0370..f2759e9b4138 100644 --- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c +++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c @@ -159,11 +159,11 @@ static int pci1xxxx_eeprom_read(void *priv_t, unsigned int off, } static int pci1xxxx_eeprom_write(void *priv_t, unsigned int off, - void *value_t, size_t count) + const void *value_t, size_t count) { struct pci1xxxx_otp_eeprom_device *priv = priv_t; void __iomem *rb = priv->reg_base; - char *value = value_t; + const char *value = value_t; u32 regval; u32 byte; int ret; @@ -262,11 +262,11 @@ static int pci1xxxx_otp_read(void *priv_t, unsigned int off, } static int pci1xxxx_otp_write(void *priv_t, unsigned int off, - void *value_t, size_t count) + const void *value_t, size_t count) { struct pci1xxxx_otp_eeprom_device *priv = priv_t; void __iomem *rb = priv->reg_base; - char *value = value_t; + const char *value = value_t; u32 regval; u32 byte; int ret;