From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 4621A3AA4F2 for ; Wed, 24 Jun 2026 07:22:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782285778; cv=none; b=Ltdvs5+xa3Q7lxHIO+Zw7vAszK84gvBHvKXhRO1WZEEkHC0oHcF3md31M07HLXLToT4A6GQUz3vuUctFQhg5RqEBfOZn3rSQCDKX9cWr5/t2D/eoyxqbfpwXcU/iS5TftFopu3FweEeBr6yBtHlWFwJOdbI1Wta7exQs/XdOaXA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782285778; c=relaxed/simple; bh=1cJEr2O1eDCGHxCRdczVRnKEpuZfOGwWAx4w0L3MYFg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=YJTuRSPQRvVxs5w65V2hFUyR78teb1cB82bq9v6Dosia7OHjteJvVYHsuTaZjaujy4vOpAeNTVKuXM67JkQidFXILXLxwQpUqrd7uPHnGH/9VLUJOTj1A8UgYiqavQtTRcK2KsKK9bDIN0e/UAuaGqh0m9LkJHQ86wP8DUEsu9o= 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=1bw3cWUJ; arc=none smtp.client-ip=185.171.202.116 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="1bw3cWUJ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 1E7A3C6B3A7; Wed, 24 Jun 2026 07:23:00 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3A1F7601C5; Wed, 24 Jun 2026 07:22:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7454A106C8380; Wed, 24 Jun 2026 09:22:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782285771; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=MSTKA8QhUnLzrzuy0HoPujwmsjjvzen8gZ+hKpejf2E=; b=1bw3cWUJOZ7HYlyUw5cPZYbSDxlTdKx5yBzTmYQnkB+qaRWbZCSi5PLyD0aO8ZP893u3W9 5IqNE6YCLwx5HRV2hPoAilHrpqsTlDeYLEiBa/+AoJEDIoTsgGR5/s9O4aYgnwrwzDHW1D txdZTLhZnWfz2zULRdhmb/6ks+2Dw4X2U/6l+66mx54/N0dkLaai2N+eoH8wjuIKzWlam5 BY83kVPTxGcXtaJbYKG67BKfHXG36+iKeIhLgQkxJav5iHFo1J6s/JRsr4cjgScTZxRXZv LVdbTD6PvP/Dw3S9AxudtSQ63l/bgADZI17IZGcSm8PgK0Gbv14Lp86RLz4BVg== From: Miquel Raynal To: Pengpeng Hou Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: mchp23k256: Use SPI match data for chip caps In-Reply-To: <20260624055440.35226-1-pengpeng@iscas.ac.cn> (Pengpeng Hou's message of "Wed, 24 Jun 2026 13:54:40 +0800") References: <20260624055440.35226-1-pengpeng@iscas.ac.cn> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Wed, 24 Jun 2026 09:22:47 +0200 Message-ID: <87bjd0mmgo.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-Last-TLS-Session-Version: TLSv1.3 On 24/06/2026 at 13:54:40 +08, Pengpeng Hou wrote: > The driver stores chip capacity information in both the OF match table > and the SPI id table. Probe currently uses of_device_get_match_data(), > so a non-OF SPI modalias match falls back to mchp23k256_caps even when > the SPI id table selected a different part. > > Use spi_get_device_match_data() so SPI id-table driver_data is consumed > when OF match data is absent. This keeps the existing default fallback > while avoiding the wrong MTD geometry for id-table-only matches. > > Signed-off-by: Pengpeng Hou > --- I am not sure the default makes a lot of sense as there are only two possible hits and both have private data attached. Nevertheless, the fix looks correct. Thanks, Miqu=C3=A8l