From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A74E3C44500 for ; Fri, 3 Jul 2026 14:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=emPNlpLgKyN7Wrjvq88i3Jz9tv5vIZpRwsSSqXFH6HA=; b=OJQ/WBYJaoNefo z/Uc8ThtwnNiOJsP1XOg7sFKqs+IrO9q3uYJ5np5u90IhTOgpkgnIdJJFcukKg46jgaamFfdklgsg A7kvOxM/BTmpGdF8eY7nFfNxNlPDswTLh6fFPHJCXYxyGBy/YN4gOTxr7NxVpC2HcjdBxJ3IuzsPE KpSCJWU+Awr3SBp1+FTGToqN9mAjiQZnxs8QmVcLmlPA+sV0tPTsLmIhuZ/n/aPUL33GOGHmJQbda Mzf7fJb7tirrDr9a7Klc93SNk5KzWj11NIoJ8BYQsjtALNlXTgRilBZaelnjDL6qvu+u8GkXJ9NZp FLolqZkeurNnw4Zb/S9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wfeuT-00000007GZ7-35hm; Fri, 03 Jul 2026 14:30:29 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wfeuS-00000007GYO-1bWY for linux-mtd@lists.infradead.org; Fri, 03 Jul 2026 14:30:28 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 0605043989; Fri, 3 Jul 2026 14:30:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C11B01F000E9; Fri, 3 Jul 2026 14:30:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783089027; bh=2tBIpzrA2mgPVackQiqt2YipbpdW03n68DVd0kQkAho=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HhEK+Ds/B7KF49mTU59VK6Q/LG2AXRFARX1bbgsREHHRjE9rjbrNNYzx2aXDuXw4o weUZbdT4oukmaWdATunIOGYCZak7l5621NtbOQEDQJJsgH8qjBr1i6XeTj8a6ra0Bh u4B5uijo+kDkq2wA8QSfCFPvDtuyZeIXBYoXxpNrh3WckRiF2G29zgzwm2U5yCJBWc FdVJm4y231EjsVFk7rhMOvMLuGI5c8H48+jxpgIu6Y4sRuX4B0FkoQFxJpSKPZWfqd Fcp5G36ERgColU480gS+x8VdU3V4PdqDklzBt/HRIjdGfqc3mBNyFlryWjw8ovwWDp SfTG7wEefHqVQ== From: Michael Walle To: Pratyush Yadav , Michael Walle , Takahiro Kuwano , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus Cc: linux-mtd@lists.infradead.org, Cheng Ming Lin , linux-kernel@vger.kernel.org Subject: [PATCH v1 2/8] mtd: spi-nor: don't clear the SNOR_F_4B_OPCODES flag on failure Date: Fri, 3 Jul 2026 16:29:13 +0200 Message-ID: <20260703143003.1809579-3-mwalle@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260703143003.1809579-1-mwalle@kernel.org> References: <20260703143003.1809579-1-mwalle@kernel.org> MIME-Version: 1.0 X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org This was introduced in commit 548ed6847f530 ("mtd: spi-nor: Add the SNOR_F_4B_OPCODES flag"). It looks like it was the rollback mechanism if parsing the SFDP failed, but was setting that flag first. Nowadays, that flag can only be set if spi_nor_parse_4bait() was successful. IOW, the flags won't be left in an undefined state if parsing SFDP fails. Remove the unneeded code to be able to rework spi_nor_init_params(). Signed-off-by: Michael Walle Reviewed-by: Miquel Raynal Reviewed-by: Tudor Ambarus --- drivers/mtd/spi-nor/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 4046e137531f..fbf8c2d9c6b5 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -3066,10 +3066,8 @@ static void spi_nor_sfdp_init_params_deprecated(struct spi_nor *nor) memcpy(&sfdp_params, nor->params, sizeof(sfdp_params)); - if (spi_nor_parse_sfdp(nor)) { + if (spi_nor_parse_sfdp(nor)) memcpy(nor->params, &sfdp_params, sizeof(*nor->params)); - nor->flags &= ~SNOR_F_4B_OPCODES; - } } /** -- 2.47.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/