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 B06D7226553 for ; Thu, 19 Dec 2024 16:15:56 +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=1734624959; cv=none; b=kAxE7dirgoncsn1Br4k4+lJU6HNlVJ47WbP+4peecfgSLvmLRyE17FcngfSQf1r4K4P0jJeJEFDloRyieYO/gWWATl5m6nKCv4Pm/Os+bg4tO+/lo0sZHkJmpEdTgG5hlPXlFUD2uWzgiGoG2Y0kgwXJZitz795N+QWAL/a4H30= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734624959; c=relaxed/simple; bh=vMKY3iBojs1/DE27vKKZgvJtV1+CO09Uc0imRtexzIg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ijPZ+Y8VD2oNiE9dQ8DiicYZ0Y6vXUkjtxJKR3C8EfmRCnNTqv4GNYdYCDM+zAdq08lw/X6UTfyJPOB65YSMBsYiWDbJ39fM1uoc6WlzyTHf2sWIXRJEvZtaJmtXogQHm80FupAyaYn7z29CnK10GPabtsGm0fToG+lQQnXEiB4= 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=II4qOlaA; 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="II4qOlaA" Received: by mail.gandi.net (Postfix) with ESMTPSA id E33B6240004; Thu, 19 Dec 2024 16:15:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1734624953; 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: in-reply-to:in-reply-to:references:references; bh=lRtyNx40vCtDNtySsV71nviUX/3p9WlXOjeSIjpqfOQ=; b=II4qOlaALc7yMtiJWyPXktlkEPN55zLiQ9LLiOx4x8vGaAR3gA/ev7JuZMEoEesP7UaxYU 0OQ1HYOKpun/sRIJ+RgCHwRtMUOV13hMjkqwirqV8PrGd9SvVA3hDHPC82ICPRDrDllKSJ NjFMDscIgxuVJoJUTmxT2c7gXAyPO6a+9upZbGWQ6g7R+jVyx+vGArMFK9fNmbikGkpRli RHpeOW64uzK6u78Kzf8Bbp4SICQV1Dk1qgHpyW0nq7fj7kjRbqCNXyWnQLIQGuVFs0f+Hj qHdY5HzBR2XjFobAAfWqrQb5RJxGsni+J17RXMYhxAX/+K5pvJTPximOR2a0Fg== 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: <4660f0ea-b1d1-46c3-b5ea-efe549c9adf6@linaro.org> (Tudor Ambarus's message of "Thu, 19 Dec 2024 10:01:41 +0000") References: <20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org> <87r064c8r3.fsf@bootlin.com> <4660f0ea-b1d1-46c3-b5ea-efe549c9adf6@linaro.org> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Thu, 19 Dec 2024 17:15:52 +0100 Message-ID: <871py3abt3.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 X-GND-Sasl: miquel.raynal@bootlin.com On 19/12/2024 at 10:01:41 GMT, Tudor Ambarus wrote: > On 12/19/24 9:38 AM, Miquel Raynal wrote: >> On 19/12/2024 at 09:20:04 GMT, Tudor Ambarus wrote: >> >>> 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 indicator >>> + * 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' ^^^ >> > > 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. Ah, ok, I didn't know the abbreviation.