Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4154166rwj; Tue, 20 Dec 2022 06:48:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXv8HmulJcK0BPVUKa7kJsUw5VjfDrY/TKk+sdLKlqIrE2YiBKOztTv+v8n4OtNiYwRToCja X-Received: by 2002:a05:6402:4441:b0:45c:835b:9461 with SMTP id o1-20020a056402444100b0045c835b9461mr1939887edb.29.1671547733933; Tue, 20 Dec 2022 06:48:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671547733; cv=none; d=google.com; s=arc-20160816; b=n1qT9hdI/F7qM+ux44NL6pko/0CzGCD3ZhpQ7n+DZ9KFR4DOxk/5jLIUrCdNpgv/PP AqBZUGCEmHg3YxGj8uFB0H/xbePCoi3JbepDr1s0w5DUYlErSNZYafCMEgFrCt1j6VnV mFNJEz+329zsswetk8+q2WHjKQXFSNo6y02bj76C25Ntmstc3DPluFzbSJAScAMJFjNu ziAw1Iw/tIxfV+pbslPwx2FRvVy6sCSA0ZTapOWmLOMKTEZ3QSYHjuBW1IoIrRFpDxFj YAHyWRsGUxOkW9hRZvGY2Cq/Vhy4Zc+d2o1v4mDrZg9By+CWcWRUiS9VLBeb7H56rhFX AcoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2gN2nDnRrhBHOJS7fgE9pOVBJkHNl+ibU4b3BChxdq0=; b=g58088HJw97pZVZw7jXzMw9o7NvK795uTXaqdFON0cmn4pvk0PkZ5/lJSBwbLLZVya lDYqf9MrWbOceIY+2qbwydIHdyxcphchGM7l4T9Z+xOJLjKq5lraLDIwndJksNjhq8c+ 3JCXFtsfGfbdxNEGc48WZWbl81psYlCB/NbdbC6M6BsdZUJ/pjco5/H1b3GJQo1zthy+ JGdLQyFoVF2noRt7GKpmfUi9Yh8T6Nk7QZmg5n8wg6l+vkZu23IGWeyPbdphT8O+IL/x qUkF68zfRFcFSVfNCNueBgpylBcjCxHIq7RXtPN9s11sA9PDxZ8RYHSuyKRv/GzFT3VZ t+zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D6BDL4+q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a508702000000b00461ebc19dcesi11039234edb.56.2022.12.20.06.48.37; Tue, 20 Dec 2022 06:48:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D6BDL4+q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233115AbiLTOOG (ORCPT + 69 others); Tue, 20 Dec 2022 09:14:06 -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: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=cpp] 62 | #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. 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 --- 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 #include -#include #include #include -- 2.35.1