From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA529222587 for ; Thu, 19 Dec 2024 10:01:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734602506; cv=none; b=dgj2ZaWx17Wjs16ji6N8MiL9tIFH65Kf5c3mgMW2m6K0BgY/y8lZMlbJsrJtZUeEmWz7SOxM7rAF9aHxnhqYxjcdA+O8221KXgS+3rKDV+FgajVU5cnLvJvob1+hje5fUB04ER1sx3uCM7o0OhaW/HAe7FpBgTEI4ml6bthJiD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734602506; c=relaxed/simple; bh=/OGsCzFtdel0sG04BUcAWsMXknu0AFL9+3Zo9eXlplI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=l0jxc8kBJ0CHrWT4wgwxk+I7ZhMRraC2K6qg9zW8qDdAXNnP8nbsc4atayRZ1a+TrrFPR0WWEfIAVmIcJ5IWUWQfF6nbZyFeC9ms3qBXmuG53Wj5MZWukp3yO48H4vszRsMdrHuHOcYd2CzleMer1nq4ryMynS0Q9ymAxh9uSoo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=YLMs4l6z; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YLMs4l6z" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4363ae65100so6176645e9.0 for ; Thu, 19 Dec 2024 02:01:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734602503; x=1735207303; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+sOz53FSX6YjdJKc3tV6Pg7C4qqSPSTPmj6M8d9fLjQ=; b=YLMs4l6z3J9zHbyCRKUyfazFdpX0WpFLRxl9iQsGJRgOZyw4Lbbe1AuCcInhwhJaeH qtOCJ0xRSHpBRHGIGdcStBuKSeAj6OKfkqXyVlLWaLnWWC3DsT3vsBwoeHcPoG29nl+n x+31ccTYm35aLMHzwUvypYn4JS3b120BzpCrhd2IW50BDY2UcDYw5hzQVpSww5E2Xe2Z vHAn7sGIH1OyIY/FTCZRiqnomApTA30UJOLOefs+3mE/CW3djVPDcKT/ULdIGiaxa/Sd A9NezeLFlftuK1qEyxDRsr46fC7DmSCJVKpqhgQUGWS2TWyyLaqDP5RA/hHJ3bPtBIBu mNsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734602503; x=1735207303; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+sOz53FSX6YjdJKc3tV6Pg7C4qqSPSTPmj6M8d9fLjQ=; b=cTsJK7AHi9VYDrwcxTTP0O1+sAisR94U3jJpVn8Gvg1+yeuUKCAbZVpXG1Wazdn+Yx giuyLynfCOLepY1nOX9LuFfkUmwc6AqWsiqCFgDhzh5j6I6QCbA4J7EJdQzU7bot5A4w lee4o0MyIeAcBZddjn5Dh2Royj+NYuaXezG9rQIpnc81CBKw9wfe0X8/DnTLRW9rBk5N JmMAAsYVari7b/TFxgN2yZIXYnM1KyGWDO1aqP8djSkO8VZoUUO8owO0n5k6IhAeo8rJ FFcYnC3mXOYtljwufDnETw631dxSODssuf2dhCHuTongUqUgqcLbKd2AErbapxeygoFe dmeg== X-Forwarded-Encrypted: i=1; AJvYcCU1AqrFNAIMvMKD5c4pMc9X0lGEO7Yorh0930v5s2/hXKBZHQeBACs9nnmjqGteCxOOTcpxog+IMP6dyPM=@vger.kernel.org X-Gm-Message-State: AOJu0YwuLkyq46K/UA9/jmNbbWC7EurE/G/F9ljp6xQLYgevAtrMXIEG pi+Pv2U/N8yafQoo3iKbM2I0TCTHlCuH4FDkULRDFKy/nBM2WCRu8RBfmTa86vA= X-Gm-Gg: ASbGncu5hI8hq66/mRmpXxiNu8Tkveb9VgZUm2G/y1BLNuekx/AHrzYTqF+CuKFjdPb dSs94xHF7yd4U5G9rM7XycqFfwuZQi9Uh1+SYZT+sDNDfZ799rIRbd54I5vNaipjI+GVObhh3sP L9tpPq+zAq2nYpVxEi9eiH4lZlEGSTC+U0+bQiAyswBECt8TAquorq0+0h2EuEY7mpZ4rHUEUYL d6EBcBvn3BSgc9xWeLOPjD0Yj293LiOETHCSUfIzXY1kxHqE4JrhoyD28gufWO2 X-Google-Smtp-Source: AGHT+IHs2Gvw5AVCoudWceeZOOoXTP5NIzK6gACv6j+ZfS9K0abLDVbde+kFM64W/fXJSX1k45ISVw== X-Received: by 2002:a05:6000:401e:b0:385:df59:1158 with SMTP id ffacd0b85a97d-38a19b3cc57mr2866519f8f.53.1734602502951; Thu, 19 Dec 2024 02:01:42 -0800 (PST) Received: from [192.168.0.14] ([188.26.61.92]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c832a90sm1162456f8f.28.2024.12.19.02.01.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Dec 2024 02:01:42 -0800 (PST) Message-ID: <4660f0ea-b1d1-46c3-b5ea-efe549c9adf6@linaro.org> Date: Thu, 19 Dec 2024 10:01:41 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mtd: spi-nor: extend description of size member of struct flash_info To: Miquel Raynal Cc: Renjun Wang , Pratyush Yadav , Michael Walle , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org References: <20241219-spi-nor-flash-info-size-desc-v1-1-6b53cf011027@linaro.org> <87r064c8r3.fsf@bootlin.com> Content-Language: en-US From: Tudor Ambarus In-Reply-To: <87r064c8r3.fsf@bootlin.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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.