From: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
To: developers@islsm.org, linux-wireless@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: [PATCH 2/2] use list_for_each() for iteration in Prism 54 driver
Date: Fri, 25 May 2007 15:04:44 +0200 [thread overview]
Message-ID: <20070525130444.GG31790@traven> (raw)
In-Reply-To: <20070525125630.GE31790@traven>
Use list_for_each() in the Prism54 driver to iterate over the MAC list
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
--
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index 283be4a..34cf13c 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -1861,7 +1861,7 @@ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info,
if (down_interruptible(&acl->sem))
return -ERESTARTSYS;
- for (ptr = acl->mac_list.next; ptr != &acl->mac_list; ptr = ptr->next) {
+ list_for_each(ptr, &acl->mac_list) {
entry = list_entry(ptr, struct mac_entry, _list);
if (memcmp(entry->addr, addr->sa_data, ETH_ALEN) == 0) {
@@ -1891,7 +1891,7 @@ prism54_get_mac(struct net_device *ndev, struct iw_request_info *info,
if (down_interruptible(&acl->sem))
return -ERESTARTSYS;
- for (ptr = acl->mac_list.next; ptr != &acl->mac_list; ptr = ptr->next) {
+ list_for_each(ptr, &acl->mac_list) {
entry = list_entry(ptr, struct mac_entry, _list);
memcpy(dst->sa_data, entry->addr, ETH_ALEN);
@@ -1972,7 +1972,7 @@ prism54_mac_accept(struct islpci_acl *acl, char *mac)
return 1;
}
- for (ptr = acl->mac_list.next; ptr != &acl->mac_list; ptr = ptr->next) {
+ list_for_each(ptr, &acl->mac_list) {
entry = list_entry(ptr, struct mac_entry, _list);
if (memcmp(entry->addr, mac, ETH_ALEN) == 0) {
res = 1;
--
Matthias Kaehlcke
Linux Application Developer
Barcelona
If sharing a thing in no way diminishes it,
it is not rightly owned if it is not shared
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
next prev parent reply other threads:[~2007-05-25 13:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070525125630.GE31790@traven>
2007-05-25 13:03 ` [PATCH 1/2] use list_for_each() for iteration in Host AP driver Matthias Kaehlcke
2007-05-25 14:30 ` Christoph Hellwig
2007-05-27 10:28 ` [PATCH 1/2] use list_for_each_entry() for iteration in hostap_ap.c Matthias Kaehlcke
2007-05-28 2:44 ` Jouni Malinen
2007-05-28 6:45 ` Matthias Kaehlcke
2007-05-25 13:04 ` Matthias Kaehlcke [this message]
2007-05-27 10:39 ` [PATCH 2/2] use list_for_each_entry() for iteration in Prism 54 driver Matthias Kaehlcke
2007-05-29 15:38 ` Luis R. Rodriguez
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=20070525130444.GG31790@traven \
--to=matthias.kaehlcke@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=developers@islsm.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).