From nobody Wed Sep 17 12:04:47 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34C0AC4332F for ; Tue, 20 Dec 2022 14:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233676AbiLTOOH (ORCPT ); Tue, 20 Dec 2022 09:14:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbiLTOOC (ORCPT ); Tue, 20 Dec 2022 09:14:02 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F154B231 for ; Tue, 20 Dec 2022 06:14:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8A7816146E for ; Tue, 20 Dec 2022 14:14:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E21DC433D2; Tue, 20 Dec 2022 14:13:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671545641; bh=cIGyHKTuCS/Vz5KNJx8REJ3tduNkZ8K9Gt4q4PtyC8U=; h=From:To:Cc:Subject:Date:From; b=D6BDL4+qcOjHM4dp6KlaZfoUh5/zCdKYUxyAuo5hRDC8So2zEBLpGeeRCIK43fKk1 5SX14NLeKsygPRdArfGtxePFPFOQc8wLOHgkSHau64cwNfO8H0xK0H/d8yRmVwJtdE Paid6yWmazy/cp7qGKiTLK8mAvS6tBmoZNhrH8WLTRYSCy+ywQvXtgbGMI1Fa8UXww 3HJgch1Pk6mvdWr3xYkwuv/H27BTl+yy3sf8a8QC2odJ8p0BJCfxH81WovA4JLkC8w z4Thajc0X7/5pyJxOPQadoKy/Tto7ARgV09i4H3n7mB6yLSyiwUMKwldHXuwnv1DD/ 9FR4gqX+T53hw== From: Arnd Bergmann To: Tudor Ambarus , Pratyush Yadav Cc: Arnd Bergmann , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Takahiro Kuwano , Sai Krishna Potthuri , Boris Brezillon , Mauro Lima , Mika Westerberg , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [v2] mtd: cfi: allow building spi-intel standalone Date: Tue, 20 Dec 2022 15:13:34 +0100 Message-Id: <20221220141352.1486360-1-arnd@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann When MTD or MTD_CFI_GEOMETRY is disabled, the spi-intel driver fails to build, as it includes the shared CFI header: include/linux/mtd/cfi.h:62:2: error: #warning No CONFIG_MTD_CFI_Ix selected= . No NOR chip support can work. [-Werror=3Dcpp] 62 | #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can wor= k. linux/mtd/spi-nor.h does not actually need to include cfi.h, so remove the inclusion here to fix the warning. This uncovers a missing #include in spi-nor/core.c so add that there to prevent a different build issue. Fixes: e23e5a05d1fd ("mtd: spi-nor: intel-spi: Convert to SPI MEM") Signed-off-by: Arnd Bergmann Acked-by: Pratyush Yadav Reviewed-by: Mika Westerberg Reviewed-by: Tokunori Ikegami Reviewed-by: Tudor Ambarus --- drivers/mtd/spi-nor/core.c | 1 + include/linux/mtd/spi-nor.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index d8703d7dfd0a..d67c926bca8b 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 25765556223a..a3f8cdca90c8 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -7,7 +7,6 @@ #define __LINUX_MTD_SPI_NOR_H =20 #include -#include #include #include =20 --=20 2.35.1