From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 16B1C38F62C for ; Mon, 23 Mar 2026 16:45:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774284357; cv=none; b=NsNNWWUKm4g5jyaijJsc1yyNuh4V/HJmev+3G5UPfLzQ5lquW6SkH989NzP8OhqbgiBvmRJSw1JFBRr3aY7rIL9U9FmH5RB9U72p1U0z1vPEQqPuS6k5VKjCLcvSqVgLSotblQOJed9Y/xqsnk8oL/hIRsiXrQKCrj+dNEYF0Hc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774284357; c=relaxed/simple; bh=nbeW5BKh4dupU+/T+4r66QLtInNU4xuElWILn2GCiCI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BLqLdKZE6ZVSHdH5hm9PE9++rfiNAkPeMmabFoL3vztbU96H4NAG7Un8kOYfXWhqLJOnj5rdUvp5rNw2vy+9rvtFZkvND+Durop660HlXus4ffyJHVbu6i6xVf/GLznAQwOy/5pVt+E/bGhxqicPHm6DsEpV3juY8rxGngdgT6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c1nUljXQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c1nUljXQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC5E2C4CEF7; Mon, 23 Mar 2026 16:45:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774284357; bh=nbeW5BKh4dupU+/T+4r66QLtInNU4xuElWILn2GCiCI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c1nUljXQwBni2tIrL8TN+q3DDypLLbEBn4tnRzYuYNpy7oHSbr/zG7gqSXeKJmLNa aYLFUID8AAneZ9EJ/xj6OT03bKOHRR8WXa4HipJZoS32S8seWxhyFopYr0Q2WJUSA4 FCxLlIixqosbFj9WLISvNuH3R+IaEbsJefyzS5nMY1hoG45OnaQ6XrAU5RcuFFa/Pz J+Fob0gK2+xgk+PlTjBmWx0dFwAWvGW2Kpc++FxQOsx9bnyUUTR6c0vtImXVD6/X/Z InsPoCRZn2zQMkggKWdbmdzR/5xtu5H/p3HbwhPSin9KuyEg/Ec5UjiJa/rEJUfGLW +5CsFRAb8KRPw== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1w4iPa-00000003eNt-3Js0; Mon, 23 Mar 2026 17:45:54 +0100 Date: Mon, 23 Mar 2026 17:45:54 +0100 From: Johan Hovold To: Bartosz Golaszewski Cc: Srinivas Kandagatla , Bartosz Golaszewski , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/7] nvmem: split struct nvmem_device into refcounted and provider-owned data Message-ID: References: <20260223-nvmem-unbind-v2-0-0df33a933dca@oss.qualcomm.com> <20260223-nvmem-unbind-v2-6-0df33a933dca@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Mar 17, 2026 at 01:52:13PM +0100, Bartosz Golaszewski wrote: > On Tue, Mar 17, 2026 at 11:44 AM Johan Hovold wrote: > > On Mon, Feb 23, 2026 at 11:57:07AM +0100, Bartosz Golaszewski wrote: > > > +/* > > > + * Holds data owned by the provider of the nvmem implementation. This goes > > > + * away immediately the moment nvmem_unregister() is called. > > > + */ > > > +struct nvmem_impl { > > > + nvmem_reg_read_t reg_read; > > > + nvmem_reg_write_t reg_write; > > > + void *priv; > > > > And priv is just a pointer that is never used by nvmem core directly. > > > > > +}; > > > > How about just wrapping the callbacks and calling the struct nvmem_ops > > to make it more clear how this is used? > > > > That is, that nvmem core guarantees that there will be no further > > callbacks after deregistration. > > Yeah, having an ops struct makes sense. Do you have any objections to > patches 1-5? Maybe Srini could pick them up for v7.1 because I'm not > sure when I'll be able to rework the last two. This one fell between the cracks, sorry. I've taken a closer look at 1-5 now as well. Johan