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>
Subject: [PATCH 2/9] driver: add missing parentheses around macro argument
Date: Wed,  4 Dec 2019 13:56:52 +0100	[thread overview]
Message-ID: <20191204125659.22506-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20191204125659.22506-1-a.fatoum@pengutronix.de>

Currently, the macro can't be used for more complex expressions
like &pci_dev->dev. Fix this by adding the missing parentheses.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/driver.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/driver.h b/include/driver.h
index 300603fa3277..ad59ce90c3a3 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -155,12 +155,12 @@ int unregister_device(struct device_d *);
 /* Iterate over a devices children
  */
 #define device_for_each_child(dev, child) \
-	list_for_each_entry(child, &dev->children, sibling)
+	list_for_each_entry(child, &(dev)->children, sibling)
 
 /* Iterate over a devices children - Safe against removal version
  */
 #define device_for_each_child_safe(dev, tmpdev, child) \
-	list_for_each_entry_safe(child, tmpdev, &dev->children, sibling)
+	list_for_each_entry_safe(child, tmpdev, &(dev)->children, sibling)
 
 /* Iterate through the devices of a given type. if last is NULL, the
  * first device of this type is returned. Put this pointer in as
-- 
2.24.0


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

  parent reply	other threads:[~2019-12-04 12:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 12:56 [PATCH 0/9] efi: add PCI controller driver Ahmad Fatoum
2019-12-04 12:56 ` [PATCH 1/9] efi: add and use new efi_device_has_guid helper Ahmad Fatoum
2019-12-04 12:56 ` Ahmad Fatoum [this message]
2019-12-04 12:56 ` [PATCH 3/9] efi: fix off-by-one in mem_malloc_init(..., end) Ahmad Fatoum
2019-12-04 12:56 ` [PATCH 4/9] x86: efi: lds: don't discard any relocation sections Ahmad Fatoum
2019-12-04 12:56 ` [PATCH 5/9] PCI: add driver_data member to struct pci_device_id Ahmad Fatoum
2019-12-04 12:56 ` [PATCH 6/9] PCI: copy over some Linux PCI helpers Ahmad Fatoum
2019-12-04 12:56 ` [PATCH 7/9] efi: turn set of defines into enumerations Ahmad Fatoum
2019-12-04 12:56 ` [PATCH 8/9] pci: add EFI PCI root bridge IO protocol driver Ahmad Fatoum
2019-12-09 10:39   ` Ahmad Fatoum
2019-12-04 12:56 ` [PATCH 9/9] serial: add support for PCI NS16550 UARTs Ahmad Fatoum

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=20191204125659.22506-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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