From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (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 88D632206B1 for ; Thu, 19 Dec 2024 09:39:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734601148; cv=none; b=qKH79PI5quFsuzeRd4kkqpGd5z5J67OyZd2HUS/nGeB6EE/ShBRXxLdiRG85MVfLSuTXNbLCh4dZHwc4sX4CicH7sX9Q6PaZ8ri8SRl4v0wUuDX3IdCFTwTo59ix03fRi3GDCPP51hXCrDJC4rhmZfHDsJ/AY/XwfxufYvdd4JA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734601148; c=relaxed/simple; bh=6lhOJFRno/mvidYnuu68JmBEwHr50s8ru10CyQ/Sxmg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=GnF95+PymmpSh6H5a++Dex/J0JHkDbuyEpUyDjiKXsvrzgUj9xZDSYtJAId8YwJmPzzXgE2MM8rb4Xi7hgmUzc7E7VRIg9LX4Hn6bWjlKqXR3HQfn5SEGHTs6lFLfqe7lRpO2gZOa09K72CnO0HvB3Q9Pb0TGdqhsaIwk4BHtL0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Qm2eu0hg; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Qm2eu0hg" Received: by mail.gandi.net (Postfix) with ESMTPSA id 835C5240006; Thu, 19 Dec 2024 09:38:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1734601137; 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=IpanWpJe/wGGQ+1iErUMawi8OQL0a5bJWkGJjHidT3w=; b=Qm2eu0hgUVKJmekn5dAx8tlaonQA11lphWj0SoA9CCHP/6QLOgsiQ/iuk8img2Kxg1rAjM LK51GLCX95ymOrxUOrJ16xOkr5c6ql+/iuq/768dPztxajFgAHxDnesgp/ujSO3+921RbQ Ox950nJ9lAE9iNXgoJZl2FUdTBN3Z+OFHDQ+DpvV+2nJ82Mm51T7QbfKJT1fVCkJD1RtpL K3TyxV7ZqTY5c7VqZKcFi7Bdg6b85YiUiCDRlMUiaLAv1TrmZoAGV+kT5Ql9BBPiuSieHz SSLr3ZQ6+TPtsqNeMP2kaBuIQDILxP8vojUyBfz3m8QNgauzlm/d0eaHkXHrvw== From: Miquel Raynal To: Tudor Ambarus Cc: Renjun Wang , Pratyush Yadav , Michael Walle , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: spi-nor: extend description of size member of struct flash_info In-Reply-To: <20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org> (Tudor Ambarus's message of "Thu, 19 Dec 2024 09:20:04 +0000") References: <20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Thu, 19 Dec 2024 10:38:56 +0100 Message-ID: <87r064c8r3.fsf@bootlin.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-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com On 19/12/2024 at 09:20:04 GMT, Tudor Ambarus wro= te: > 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 keep > the struct size at a minimum, as it's used for every flash declaration. > 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. TBH I'd be perfectly fine (and prefer) a dedicated member, because code clarity is IMO more important than memory footprint today. However for now I am totally agreeing with changes clarifying what we currently do, so: Reviewed-by: Miquel Raynal One minor nit below though: > + * @size: the size of the flash in bytes. The flash size is one > + * property parsed by the SFDP. We use it as an indicat= or > + * whether we need SFDP parsing for a particular flash. > + * I.e. non-legacy flash entries in flash_info will have > + * a size of zero iff SFDP should be used. typo, 'if' ^^^ Cheers, Miqu=C3=A8l