mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: [PATCH] vr41xx: ARRAY_SIZE cleanup
Date: Sat, 7 Jan 2006 22:58:56 +0100	[thread overview]
Message-ID: <20060107225856.30eb651b.khali@linux-fr.org> (raw)

Hi Andrew,

Can you please pick this patch for -mm? I sent it to Yoichi Yuasa one
month ago but didn't get any answer. Thanks.

Content-Disposition: inline; filename=vr41xx-array-size-cleanup.patch

Possible ARRAY_SIZE cleanup for the vr41xx_rtc driver.

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-rc2.orig/drivers/char/vr41xx_rtc.c	2005-11-13 21:02:32.000000000 +0100
+++ linux-2.6.15-rc2/drivers/char/vr41xx_rtc.c	2005-12-05 22:25:48.000000000 +0100
@@ -127,8 +127,6 @@
 		.flags	= IORESOURCE_MEM,	},
 };
 
-#define RTC_NUM_RESOURCES	sizeof(rtc_resource) / sizeof(struct 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

             reply	other threads:[~2006-01-07 21:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-07 21:58 Jean Delvare [this message]
2006-01-07 22:14 ` Jean Delvare

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=20060107225856.30eb651b.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome