From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9C0E2EC54A; Mon, 17 Aug 2026 18:54:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786992897; cv=none; b=Fg4aC0yy8VVyvZezd5d9s/mTNuIM4TEcgq6I21iz/HGi1NFxZeT5MX0Bwrj5lfrNVUImAAuPPcrztAnwHNfonZuk9JRSIwYraaAcpvnY9UmM9Y+zAYeIvbWacnO7ctCPr9utTXY4pZ7q7HDPuP8Bm/u7DUmOwAr7jqSu0yKVtQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786992897; c=relaxed/simple; bh=UagiHACKsOzSdTkMKQraTvqxzxYR38G+03DH+tjOxy8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h+wOk6kBst6i0hNCn9CWZZ0nviuDGZ/D0tgMaQ0tFdytb7RcKM7cPhk9Q0j6v2iUNMuL1Fcg/+pbPeCI4yicFd5/zgRUHpPhlj+sy4uHE/4BAGRBso8CSQVlR0Uq7SwZnFVLhZc2sbRJSKQyO6B8rtEiASlmnWdw45v3f+X9+UA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Im+Qbwla; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Im+Qbwla" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1786992896; x=1818528896; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=UagiHACKsOzSdTkMKQraTvqxzxYR38G+03DH+tjOxy8=; b=Im+QbwlaWwDxj/9L0TuFT7z8Zn/ylilwg/lAUVoYtc8R/616OrkwlUT3 hYc5TW7dcMBv7j0C1EN0ng3bVp4BN6QGKwKQw+LXosg0gQGzckJqGDRII ksJgzZUNLKZques4mFxwUr2LTHaZZqU3NwW6Ykvzhq5DelxP0R55ropkL Q1yg0tJ7UZ/YMTLgmd31RaRrwf7zkJKbQiKDNWAG4uqbfUkweC3RcvFEB azGI+5TVxaEZZ69n1wPvXj8KEdLrbrpQNVRluQ7xbULdGU9rrsHnMcXut xhB+thpd9w/s/BRHCkDyB/UqEf6ui4bkq9KKvB2g+PhpTqa/erSfzHfY0 w==; X-CSE-ConnectionGUID: vuZdotADTb2dh7ybSA21LQ== X-CSE-MsgGUID: ug6ApJJzR66oojV+x6l/kw== X-IronPort-AV: E=McAfee;i="6800,10657,11878"; a="87330820" X-IronPort-AV: E=Sophos;i="6.25,229,1779174000"; d="scan'208";a="87330820" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2026 11:54:55 -0700 X-CSE-ConnectionGUID: yFyEuGAqQ9Gm8zboujI71g== X-CSE-MsgGUID: Z79PQw2ITnSV0r6BrpxHAw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,229,1779174000"; d="scan'208";a="266971517" Received: from klitkey1-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.67]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2026 11:54:45 -0700 Date: Mon, 17 Aug 2026 21:54:43 +0300 From: Andy Shevchenko To: Link Mauve Cc: Srinivas Kandagatla , Sasha Finkelstein , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Sven Peter , Janne Grunau , Neal Gompa , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Vladimir Zapolskiy , =?iso-8859-1?Q?Andr=E9?= Draszik , Orson Zhai , Baolin Wang , Chunyan Zhang , Maxime Coquelin , Alexandre Torgue , Kalyani Akula , Michal Simek , Miguel Ojeda , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , Onur =?iso-8859-1?Q?=D6zkan?= , Johan Hovold , Ronald Claveau , Daniel Lezcano , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev, imx@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, rust-for-linux@vger.kernel.org Subject: Re: [PATCH v5 0/3] nvmem: migrate to const void * in reg_write Message-ID: References: <20260804135940.2378737-1-linkmauve@linkmauve.fr> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260804135940.2378737-1-linkmauve@linkmauve.fr> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Tue, Aug 04, 2026 at 03:59:34PM +0200, Link Mauve wrote: > This callback used to take a mutable void * for no reason, which causes > the compiler to be unaware that the val buffer should never be modified > by the callback. > > This was found while drafting the nvmem-provider Rust abstraction. > > Thanks to the guidance of Andy Shevchenko, this now introduces a new > callback and deprecates the existing one, with the goal of renaming the > new one into the old one once no user remains in the kernel. FWIW, if the approach taken is okay by maintainers, Reviewed-by: Andy Shevchenko I think this is right direction to go. We should use all possible ways to protect the data from corruption. -- With Best Regards, Andy Shevchenko