From: Jean Delvare <khali@linux-fr.org>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Subject: Re: [PATCH] vr41xx: ARRAY_SIZE cleanup
Date: Sat, 7 Jan 2006 23:14:45 +0100 [thread overview]
Message-ID: <20060107231445.5af656f0.khali@linux-fr.org> (raw)
In-Reply-To: <20060107225856.30eb651b.khali@linux-fr.org>
Quoting myself:
> Can you please pick this patch for -mm? I sent it to Yoichi Yuasa one
> month ago but didn't get any answer. Thanks.
Oops, I just realized (two minutes too late, of course) that you
already have a similar, but different, fix for this driver (as part of
drivers-char-use-array_size-macro.patch). So, please consider this new
patch instead, which should apply properly on top of your current
stack. Thanks, and sorry for the noise.
Content-Disposition: inline; filename=vr41xx-rtc-num-resources-cleanup.patch
No need to define RTC_NUM_RESOURCES, it doesn't add any value to the
code.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
drivers/char/vr41xx_rtc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- linux-2.6.15-mm2.orig/drivers/char/vr41xx_rtc.c 2006-01-07 23:00:54.000000000 +0100
+++ linux-2.6.15-mm2/drivers/char/vr41xx_rtc.c 2006-01-07 23:08:28.000000000 +0100
@@ -127,8 +127,6 @@
.flags = IORESOURCE_MEM, },
};
-#define RTC_NUM_RESOURCES ARRAY_SIZE(rtc_resource)
-
static inline unsigned long read_elapsed_second(void)
{
unsigned long first_low, first_mid, first_high;
@@ -686,7 +684,8 @@
break;
}
- rtc_platform_device = platform_device_register_simple("RTC", -1, rtc_resource, RTC_NUM_RESOURCES);
+ rtc_platform_device = platform_device_register_simple("RTC", -1,
+ rtc_resource, ARRAY_SIZE(rtc_resource));
if (IS_ERR(rtc_platform_device))
return PTR_ERR(rtc_platform_device);
--
Jean Delvare
prev parent reply other threads:[~2006-01-07 22:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-07 21:58 [PATCH] vr41xx: ARRAY_SIZE cleanup Jean Delvare
2006-01-07 22:14 ` Jean Delvare [this message]
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=20060107231445.5af656f0.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuasa@hh.iij4u.or.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.