From: Michael Trimarchi <michael@amarulasolutions.com>
To: "Marek Behún" <marek.behun@nic.cz>,
"Patrice Chotard" <patrice.chotard@foss.st.com>,
u-boot@lists.denx.de (open list)
Cc: Simon Glass <sjg@chromium.org>, 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 [thread overview]
Message-ID: <20220719194319.1744729-1-michael@amarulasolutions.com> (raw)
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 <sjg@chromium.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
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
reply other threads:[~2022-07-19 19:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220719194319.1744729-1-michael@amarulasolutions.com \
--to=michael@amarulasolutions.com \
--cc=marek.behun@nic.cz \
--cc=patrice.chotard@foss.st.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox