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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90D87C61DA4 for ; Mon, 30 Jan 2023 10:57:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BFB9B80FF7; Mon, 30 Jan 2023 11:57:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="dx0eBt2D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8DB28118B; Mon, 30 Jan 2023 11:57:00 +0100 (CET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9D98580F5A for ; Mon, 30 Jan 2023 11:56:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=miquel.raynal@bootlin.com Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 53506C0005; Mon, 30 Jan 2023 10:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675076217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Tb+knWc8+xa2/HboMdrehqj8n7prrLHVDVYJpjds7L0=; b=dx0eBt2DUT9QA1cUStZpuihlEBjkczXXHUN7eU6qohkq9uyVgu99pZNPUks9lSEf3INjMe Yk8daT6J86YqnA/B749t+i0aoTWOFeYnHU6r5y/0fJJSOUi3MRXDw9D9SQn4vEPv7ob+Iv HClmkGs85gjGN4KrO/JLMUoCIivBRYhtPZEfCX/7fDzyFJm8cjHrFsSgJSqWAiToFduHke g+yQgy/o2aFDXLO0kePwXPqFG0xQCGm/wtZ2TqApAzolFZqEWmE+5URoKMtHkCwBTruRE2 Onu1MugaQI9Bkiq1OP9apqs4rDufSuPPP/CDM4Iriyr7tOq0h/tR04GnMRsqPw== Date: Mon, 30 Jan 2023 11:56:54 +0100 From: Miquel Raynal To: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Michael Walle , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, u-boot@lists.denx.de, =?UTF-8?B?UmFmYcWC?= =?UTF-8?B?IE1pxYJlY2tp?= Subject: Re: [PATCH V3 1/6] nvmem: core: add nvmem_dev_size() helper Message-ID: <20230130115654.0041716d@xps-13> In-Reply-To: <20230127125709.32191-1-zajec5@gmail.com> References: <20230127125709.32191-1-zajec5@gmail.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Rafa=C5=82, zajec5@gmail.com wrote on Fri, 27 Jan 2023 13:57:04 +0100: > From: Rafa=C5=82 Mi=C5=82ecki >=20 > This is required by layouts that need to read whole NVMEM space. It > applies to NVMEM devices without hardcoded layout (like U-Boot > environment data block). >=20 > Signed-off-by: Rafa=C5=82 Mi=C5=82ecki > --- > V2: Drop "const" from "const size_t" It would be good if you could always add a cover-letter, just so that we can reply to the whole series. In my case I wanted to add a global Reviewed-by: Miquel Raynal Because I gave this series a quick review and it looks good to me. Thanks, Miqu=C3=A8l > --- > drivers/nvmem/core.c | 13 +++++++++++++ > include/linux/nvmem-consumer.h | 1 + > 2 files changed, 14 insertions(+) >=20 > diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c > index 38a5728bc65c..9e77af0164aa 100644 > --- a/drivers/nvmem/core.c > +++ b/drivers/nvmem/core.c > @@ -2063,6 +2063,19 @@ void nvmem_del_cell_lookups(struct nvmem_cell_look= up *entries, size_t nentries) > } > EXPORT_SYMBOL_GPL(nvmem_del_cell_lookups); > =20 > +/** > + * nvmem_dev_size() - Get the size of a given nvmem device. > + * > + * @nvmem: nvmem device. > + * > + * Return: size of the nvmem device. > + */ > +size_t nvmem_dev_size(struct nvmem_device *nvmem) > +{ > + return nvmem->size; > +} > +EXPORT_SYMBOL_GPL(nvmem_dev_size); > + > /** > * nvmem_dev_name() - Get the name of a given nvmem device. > * > diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consume= r.h > index fa030d93b768..c3005ab6cc4f 100644 > --- a/include/linux/nvmem-consumer.h > +++ b/include/linux/nvmem-consumer.h > @@ -78,6 +78,7 @@ ssize_t nvmem_device_cell_read(struct nvmem_device *nvm= em, > int nvmem_device_cell_write(struct nvmem_device *nvmem, > struct nvmem_cell_info *info, void *buf); > =20 > +size_t nvmem_dev_size(struct nvmem_device *nvmem); > const char *nvmem_dev_name(struct nvmem_device *nvmem); > =20 > void nvmem_add_cell_lookups(struct nvmem_cell_lookup *entries,