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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08046C433EF for ; Tue, 19 Jul 2022 19:43:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0FA7D83FE5; Tue, 19 Jul 2022 21:43:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="aMpOYeIh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6CB6584015; Tue, 19 Jul 2022 21:43:25 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 30968810F6 for ; Tue, 19 Jul 2022 21:43:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@amarulasolutions.com Received: by mail-ej1-x62d.google.com with SMTP id z23so29164238eju.8 for ; Tue, 19 Jul 2022 12:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gSmeenA21FF/Meoep20Aznp819F6PLzZ8a70zpHH500=; b=aMpOYeIhf071ZB/lFyzUppB5I22ZYg0LT1KavHEhk/pbJpjBPU8XwH35TaJVD9BoDr Z65faFOOa8CV1Vz/Q90QZLH0PTPk90tus022t6zYq/uwMiwzHa0QVTFxNkjbkd1u2VYd m5Z6wKF+3Mo0rJOppLbYSJNSIAPBv0wF2svGs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gSmeenA21FF/Meoep20Aznp819F6PLzZ8a70zpHH500=; b=SLD/K7u9puX1fwOvmIlK+bVm2mKNhD19ZJ+qlGzvhYO0OHQS+os+6swJliIT77AY4U PULWJt6VKCJPCiEOS5Zi3mtUwzjBJ9WHSmL0h5oT1L+j29ZR/rwo9RTm7MDU6WVJNs8S wwaRElmbhENB8yFciDEdR7Q6mJYNpSpXesp4WprmHWc4PrSIEdCx+MiTI2qQRixIrBo9 BqvApGnww8njhXcsDkeuXkTDKbYSoi2N9xproCmKHCHgJMEmvAym2mT7eoTRZBUJksnu 6usBVUsB93+JdTG2q55I7L2Zv2FBECPKXcyzMxFRZ2FN6wcwwSmZIYyg4UdRJxAudfIH K1mQ== X-Gm-Message-State: AJIora9hYsM9yulksA8yP+Gpa08lPWdXdOBQtXOMgut9sHKD4g5RY7OT aqPeMqaD/mdhnCN2jguqrHsH2BvrlFhGLt0A X-Google-Smtp-Source: AGRyM1sptxgEysiaH7nV4SVPVxxvEnTd6iNYAjmhBqbF3ca0TYbVHiia8XwcK9LdhvIuliiRvGw4Hw== X-Received: by 2002:a17:907:3e82:b0:6ff:1e04:a365 with SMTP id hs2-20020a1709073e8200b006ff1e04a365mr31890748ejc.617.1658259802751; Tue, 19 Jul 2022 12:43:22 -0700 (PDT) Received: from panicking.amarulasolutions.com (mob-37-180-67-237.net.vodafone.it. [37.180.67.237]) by smtp.gmail.com with ESMTPSA id b18-20020a1709063cb200b00722f069fd40sm6979815ejh.159.2022.07.19.12.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 12:43:21 -0700 (PDT) From: Michael Trimarchi To: =?UTF-8?q?Marek=20Beh=C3=BAn?= , Patrice Chotard , u-boot@lists.denx.de (open list) Cc: Simon Glass , u-boot@lists.denx.de (open list) Subject: [RFC PATCH] mtd: Fix building when CONFIG_DM is not enabled Date: Tue, 19 Jul 2022 21:43:19 +0200 Message-Id: <20220719194319.1744729-1-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean I really don't find any consumer of those functions in uboot. You can only verify if you include nand.h it in no-dm build include/linux/mtd/nand.h: In function 'nanddev_set_ofnode': +include/linux/mtd/nand.h:426:9: error: implicit declaration of function 'mtd_set_ofnode'; did you mean 'mtd_set_of_node'? [-Werror=implicit-function-declaration] + 426 | mtd_set_ofnode(nand->mtd, node); + | ^~~~~~~~~~~~~~ + | mtd_set_of_node +cc1: all warnings being treated as errors Cc: Simon Glass Signed-off-by: Michael Trimarchi --- include/linux/mtd/mtd.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index ff635bd716..6c096ae665 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -343,14 +343,11 @@ static inline const ofnode mtd_get_ofnode(struct mtd_info *mtd) return dev_ofnode(mtd->dev); } #else -struct device_node; - -static inline void mtd_set_of_node(struct mtd_info *mtd, - const struct device_node *np) +static inline void mtd_set_ofnode(struct mtd_info *mtd, ofnode node) { } -static inline const struct device_node *mtd_get_of_node(struct mtd_info *mtd) +static inline const ofnode *mtd_get_ofnode(struct mtd_info *mtd) { return NULL; } -- 2.34.1