From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: wbsd-devel@list.drzeus.cx, linux-kernel@vger.kernel.org
Subject: [patch 3/3] wbsd: make use of ARRAY_SIZE() macro
Date: Thu, 15 Dec 2005 00:39:36 -0500 [thread overview]
Message-ID: <20051215054444.854564000.dtor_core@ameritech.net> (raw)
In-Reply-To: 20051215053933.125918000.dtor_core@ameritech.net
[-- Attachment #1: wbsd-array-size.patch --]
[-- Type: text/plain, Size: 1115 bytes --]
wbsd: make use of ARRAY_SIZE() macro
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/mmc/wbsd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: work/drivers/mmc/wbsd.c
===================================================================
--- work.orig/drivers/mmc/wbsd.c
+++ work/drivers/mmc/wbsd.c
@@ -1399,11 +1399,11 @@ static int __devinit wbsd_scan(struct wb
* Iterate through all ports, all codes to
* find hardware that is in our known list.
*/
- for (i = 0; i < sizeof(config_ports) / sizeof(int); i++) {
+ for (i = 0; i < ARRAY_SIZE(config_ports); i++) {
if (!request_region(config_ports[i], 2, DRIVER_NAME))
continue;
- for (j = 0; j < sizeof(unlock_codes) / sizeof(int); j++) {
+ for (j = 0; j < ARRAY_SIZE(unlock_codes); j++) {
id = 0xFFFF;
host->config = config_ports[i];
@@ -1419,7 +1419,7 @@ static int __devinit wbsd_scan(struct wb
wbsd_lock_config(host);
- for (k = 0; k < sizeof(valid_ids) / sizeof(int); k++) {
+ for (k = 0; k < ARRAY_SIZE(valid_ids); k++) {
if (id == valid_ids[k]) {
host->chip_id = id;
next prev parent reply other threads:[~2005-12-15 5:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-15 5:39 [patch 0/3] wbsd: convert to the new platfrom device interface and more Dmitry Torokhov
2005-12-15 5:39 ` [patch 1/3] wbsd: convert to the new platfrom device interface Dmitry Torokhov
2005-12-15 16:08 ` Pierre Ossman
2005-12-15 5:39 ` [patch 2/3] wbsd: run through Lindent Dmitry Torokhov
2005-12-15 6:52 ` Pierre Ossman
2005-12-15 6:54 ` Dmitry Torokhov
2005-12-15 5:39 ` Dmitry Torokhov [this message]
2005-12-15 16:09 ` [patch 3/3] wbsd: make use of ARRAY_SIZE() macro Pierre Ossman
2005-12-15 16:24 ` Russell King
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=20051215054444.854564000.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=drzeus-list@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=wbsd-devel@list.drzeus.cx \
/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