From: Mark Pearson <devnull.port@googlemail.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH] ARRAY_SIZE in linux-2.6.25-rc2/scripts/mod/modpost.c
Date: Sat, 16 Feb 2008 18:21:52 +0000 [thread overview]
Message-ID: <47B729C0.5060602@googlemail.com> (raw)
Hi
I was looking through the TODO list at kernel janitors and thought I
would see if there was any clean-up work I could do. I found a message
about replacing sizeof code for array structures with the ARRAY_SIZE
macro. If this is useful, I can go through the list of modules I found
to require this patch.
As this is the first time I'm delivering a patch, could someone comment
if the format, etc. is ok? If so I will continue with the other modules.
BTW: I'm check on the mailing archives to ensure I'm not repeating work
already completed by someone else.
--- linux-2.6.25-rc2-mpe/scripts/mod/modpost.c 2008-02-16
19:06:58.000000000 +0100
+++ linux-2.6.25-rc2/scripts/mod/modpost.c 2008-02-15
21:57:20.000000000 +0100
@@ -882,7 +882,7 @@
static int section_mismatch(const char *fromsec, const char *tosec)
{
int i;
- int elems = ARRAY_SIZE(sectioncheck);
+ int elems = sizeof(sectioncheck) / sizeof(struct sectioncheck);
const struct sectioncheck *check = §ioncheck[0];
for (i = 0; i < elems; i++) {
--
Cheers, Mark.
next reply other threads:[~2008-02-16 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-16 18:21 Mark Pearson [this message]
2008-02-16 19:04 ` [PATCH] ARRAY_SIZE in linux-2.6.25-rc2/scripts/mod/modpost.c Nish Aravamudan
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=47B729C0.5060602@googlemail.com \
--to=devnull.port@googlemail.com \
--cc=kernel-janitors@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 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.