mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] common: driver: fixes argument name mismatch in for_each_cdev
@ 2023-06-14 13:51 michael.kopfensteiner
  2023-06-14 13:58 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: michael.kopfensteiner @ 2023-06-14 13:51 UTC (permalink / raw)
  To: barebox; +Cc: Michael Kopfensteiner

From: Michael Kopfensteiner <michael.kopfensteiner@vahle.com>

The for_each_cdev makro takes a pointer argument as loop cursor.
Due to a name mismatch, not the provided pointer was used but
whatever was called `cdev`.
This mismatch had no effect, because in every usage the given
pointer is named cdev anyway.

This commit fixes the name-mismatch. The makro now works with
arguments name differently than 'cdev' too.
---
 include/driver.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/driver.h b/include/driver.h
index d33e0fcbcc..e1ee3dc2dd 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -566,7 +566,7 @@ int cdev_truncate(struct cdev*, size_t size);
 loff_t cdev_unallocated_space(struct cdev *cdev);
 
 extern struct list_head cdev_list;
-#define for_each_cdev(c) \
+#define for_each_cdev(cdev) \
 	list_for_each_entry(cdev, &cdev_list, list)
 
 #define DEVFS_PARTITION_FIXED		(1U << 0)
-- 
2.30.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-14 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 13:51 [PATCH] common: driver: fixes argument name mismatch in for_each_cdev michael.kopfensteiner
2023-06-14 13:58 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox