mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: michael.kopfensteiner@vahle.com
To: barebox@lists.infradead.org
Cc: Michael Kopfensteiner <michael.kopfensteiner@vahle.com>
Subject: [PATCH] common: driver: fixes argument name mismatch in for_each_cdev
Date: Wed, 14 Jun 2023 15:51:33 +0200	[thread overview]
Message-ID: <20230614135133.59312-1-michael.kopfensteiner@vahle.com> (raw)

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




             reply	other threads:[~2023-06-14 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 13:51 michael.kopfensteiner [this message]
2023-06-14 13:58 ` Sascha Hauer

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=20230614135133.59312-1-michael.kopfensteiner@vahle.com \
    --to=michael.kopfensteiner@vahle.com \
    --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