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 174C3C44508 for ; Wed, 15 Jul 2026 17:53: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mpdJujDcrSGkG9w8z0LeXl47TaAPwbvHOjR2HjHxIiU=; b=R5RcoyVge4c/5W 8RB4rnm3Gm4sm2OlXOZSeu7b5RMU6zJRhauO6Zlp684lAjyZ2/qxZoIOiDYK672KNMcIO+vDnDhcj LbPkI13f7g7Ftx7e6crz3ohHX090V57a8WAgrXwX2xogK1jPonyYfkB25reBnIv7ekuL4vLovhxk2 ++44igkcaEHcVnrm4TmPmGPxqWujzPVXIm+QmMldGocu4Vud23iWGzYLM5q9IwjtRJIHoPZW7fmNr 7gfwb5O9tWmfZ9K/U73GEag4ufBMBsqTyAhVdJy0qeK4wj1S4EwNLmVc7hrZjKch+NV6S7wd/naVP 4wWj/P2V4+zuPkkIyftg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wk3n5-0000000Fav2-1SwP; Wed, 15 Jul 2026 17:53:03 +0000 Received: from 82-65-109-163.subs.proxad.net ([82.65.109.163] helo=luna.linkmauve.fr) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wk3n2-0000000FasP-3eEu; Wed, 15 Jul 2026 17:53:02 +0000 Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 989A4F40ABC; Wed, 15 Jul 2026 19:52:35 +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=20S=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=20Draszik?= , 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=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , =?UTF-8?q?Onur=20=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=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=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 1/8] nvmem: core: make reg_write() take a const void * Date: Wed, 15 Jul 2026 19:52:17 +0200 Message-ID: <20260715175229.24672-2-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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260715_105301_058335_BF9CB609 X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org This callback used to take a mutable void * for no reason, this was found while drafting the Rust abstraction. Signed-off-by: Link Mauve --- drivers/nvmem/core.c | 2 +- include/linux/nvmem-provider.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index e871181751f3..202607013054 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -62,7 +62,7 @@ static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, } static int __nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, - void *val, size_t bytes) + const void *val, size_t bytes) { int ret; diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index f3b13da78aac..e62285836cbb 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -19,7 +19,7 @@ struct nvmem_device; typedef int (*nvmem_reg_read_t)(void *priv, unsigned int offset, void *val, size_t bytes); typedef int (*nvmem_reg_write_t)(void *priv, unsigned int offset, - void *val, size_t bytes); + const void *val, size_t bytes); /* used for vendor specific post processing of cell data */ typedef int (*nvmem_cell_post_process_t)(void *priv, const char *id, int index, unsigned int offset, void *buf, -- 2.55.0 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic