[PATCH] common: driver: fixes argument name mismatch in for_each_cdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael Kopfensteiner <michael.kopfensteiner@xxxxxxxxx>

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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux