mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>,
	"Signed-off-by : Trent Piepho" <tpiepho@kymetacorp.com>
Subject: [PATCH] Revert "of: Add of_property_for_each_phandle() iterator"
Date: Thu,  2 Jul 2020 15:32:42 +0200	[thread overview]
Message-ID: <20200702133242.26487-1-a.fatoum@pengutronix.de> (raw)

Codebase is meant to be gnu89, but this was only enforced starting
with bc4840e98b94 ("kbuild: add -Wmissing-prototypes and -std=gnu89
to KBUILD_HOSTCFLAGS"). Since then, use of this macro would yield a
compile error, because of the initialization inside the for-loop,
which is a C99 feature. There hasn't been any users for the macro
since it was added in 2016, thus drop it.

This reverts commit d5f9415b04846661522141ea428f74e3c618fa9e.

Cc: Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/of.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/include/of.h b/include/of.h
index 665580073f1b..b9b3a102284c 100644
--- a/include/of.h
+++ b/include/of.h
@@ -904,17 +904,6 @@ static inline int of_property_read_u32(const struct device_node *np,
 		s;						\
 		s = of_prop_next_string(prop, s))
 
-/*
- * struct device_node *n;
- *
- * of_property_for_each_phandle(np, root, "propname", n)
- *         printk("phandle points to: %s\n", n->full_name);
- */
-#define of_property_for_each_phandle(np, root, propname, n)	\
-	for (int _i = 0; 					\
-	     (n = of_parse_phandle_from(np, root, propname, _i));\
-	     _i++)
-
 static inline int of_property_write_u8(struct device_node *np,
 				       const char *propname, u8 value)
 {
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2020-07-02 13:32 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=20200702133242.26487-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=tpiepho@kymetacorp.com \
    /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