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 868A74A08 for ; Fri, 20 Dec 2024 08:37:02 +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=1734683822; cv=none; b=MOBFHdOmRq4O9ykqFrPTdCoC1EV9t8YymH98C3tbj4b0oDuCAsASBXzqrr9lLX3QL0Rgh8vAKg82xFoxtDcptsHTxYldKBp/iZQS2y/SR63lCnTa73gGbzRcWzi9xAnYe4m/Y2N6oZGTyILnkFuO6Zwh8Gq8oM4n0IkPstBw4OE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734683822; c=relaxed/simple; bh=BkX95TYDCyyX7sv338gZ7D8c9yqGQLujsjZfJ3LfLhU=; h=Content-Type:Date:Message-Id:Subject:Cc:From:To:References: In-Reply-To; b=HJnAhMqr1arJ4pK6i6YhkOUpkXi+TGJtX+USodNLErz87ndWEnVDo1fDMUZ66cHl9fsY21xIs1pAufv1yyI/1qTAz7XBk6U9OiNx6AkFo162+eaS6l54KDrqQvE5E5Iq0fiAo6//HF6AQWdUzKtwRUYMUYeDAIkR7wUZzgmayBQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Rec4aioG; 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="Rec4aioG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95713C4CECD; Fri, 20 Dec 2024 08:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734683822; bh=BkX95TYDCyyX7sv338gZ7D8c9yqGQLujsjZfJ3LfLhU=; h=Date:Subject:Cc:From:To:References:In-Reply-To:From; b=Rec4aioG1lrjE1V03jcufHkmWsp/1cjwqHyxu7DM4FyzNWsp0xMaLdQ6hcUE68GtD Y4D4MLywq65d78JuzCKDrEnM+LF2MuBYtgjZJQayqf+jJJTT5KbYujQ9lxomn4f+63 c7MpVm1+NYtUjkdHkU/f8IAkOBaYZxh2Va08xD5v23We60UV95HItZtzKCFi0N7OtS kvtkzWAEsX/C3auALWlzvjLJyfmgvzV9w0Bh8mRvcGtaEsywFYvSJlT3OFsGJWx9QW Ekq4yYbJwMVS7IIKLdqRHstD5Mt8LallUIs3657/uNJyqbjSTAAMYa+sgbuExey1Gl SIFcfLKwgB5QA== Content-Type: multipart/signed; boundary=da44abc2be6c1d6e7d8f71c66994cb41bf94892202f579c1ba3c7c7fa137; micalg=pgp-sha384; protocol="application/pgp-signature" Date: Fri, 20 Dec 2024 09:36:57 +0100 Message-Id: Subject: Re: [PATCH] mtd: spi-nor: extend description of size member of struct flash_info Cc: "Renjun Wang" , "Pratyush Yadav" , "Richard Weinberger" , "Vignesh Raghavendra" , , From: "Michael Walle" To: "Miquel Raynal" , "Tudor Ambarus" X-Mailer: aerc 0.16.0 References: <20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org> <87r064c8r3.fsf@bootlin.com> <4660f0ea-b1d1-46c3-b5ea-efe549c9adf6@linaro.org> <871py3abt3.fsf@bootlin.com> In-Reply-To: <871py3abt3.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: --da44abc2be6c1d6e7d8f71c66994cb41bf94892202f579c1ba3c7c7fa137 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hi, On Thu Dec 19, 2024 at 5:15 PM CET, Miquel Raynal wrote: > On 19/12/2024 at 10:01:41 GMT, Tudor Ambarus w= rote: > > > On 12/19/24 9:38 AM, Miquel Raynal wrote: > >> On 19/12/2024 at 09:20:04 GMT, Tudor Ambarus wrote: > >>=20 > >>> We use the size as an indicator whether to parse SFDP or not. We don'= t > >>> introduce a dedicated member for SFDP parsing because we'd like to ke= ep > >>> the struct size at a minimum, as it's used for every flash declaratio= n. > >>> Ideally we won't have flash entries at all, but there are still flash > >>> parameters that aren't defined by SFDP, thus we need to statically > >>> specify them. Thanks! Reviewed-by: Michael Walle > >>=20 > >> TBH I'd be perfectly fine (and prefer) a dedicated member, because > >> code clarity is IMO more important than memory footprint today. But that would have meant more code churn, because the default should be the new method. Thus we'd have to change all the old entries. > >> However for now I am totally agreeing with changes clarifying what we > >> currently do, so: > >>=20 > >> Reviewed-by: Miquel Raynal > >>=20 > >> One minor nit below though: > >>=20 > >>> + * @size: the size of the flash in bytes. The flash size i= s one > >>> + * property parsed by the SFDP. We use it as an ind= icator > >>> + * whether we need SFDP parsing for a particular fl= ash. > >>> + * I.e. non-legacy flash entries in flash_info will= have > >>> + * a size of zero iff SFDP should be used. > >>=20 > >> typo, 'if' ^^^ > >>=20 > > > > iff is a conjunction: if and only if. > > > > I think Michael used it to emphasize that we don't allow size > 0 when > > we want SFDP parsing. Using if allows it. Yep :) > Ah, ok, I didn't know the abbreviation. -michael --da44abc2be6c1d6e7d8f71c66994cb41bf94892202f579c1ba3c7c7fa137 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iKgEABMJADAWIQTIVZIcOo5wfU/AngkSJzzuPgIf+AUCZ2UsqRIcbXdhbGxlQGtl cm5lbC5vcmcACgkQEic87j4CH/jsNgF/fNF094kMFQNJF/dJLiIArmtC158mXfOz 2aaeOhwlNLoT+OMqcVN7VBlGmZpETreKAX0Wc83W3EtoJWQMGKDfCvzXfhMEUwFS DI8QgEyd+sgSu/xoCv0VVRFExdPMQQ6K7gw= =nx6t -----END PGP SIGNATURE----- --da44abc2be6c1d6e7d8f71c66994cb41bf94892202f579c1ba3c7c7fa137--