From: Karsten Keil <kkeil@suse.de>
To: "Ahmed S. Darwish" <darwish.07@gmail.com>
Cc: kai.germaschewski@gmx.de, linux-kernel@vger.kernel.org,
trivial@kernel.org
Subject: Re: [PATCH 2.6.20-rc5] isdn/capi: use ARRAY_SIZE when appropriate
Date: Tue, 16 Jan 2007 14:05:44 +0100 [thread overview]
Message-ID: <20070116130544.GA18190@pingi.kke.suse.de> (raw)
In-Reply-To: <20070116095319.GB718@Ahmed>
On Tue, Jan 16, 2007 at 11:53:19AM +0200, Ahmed S. Darwish wrote:
> Hi all,
>
> A trivial patch to use ARRAY_SIZE macro defined in kernel.h instead
> of reimplementing it.
>
> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
> ---
>
> capi.c | 4 ++--
> capidrv.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
> index d22c022..3804591 100644
> --- a/drivers/isdn/capi/capi.c
> +++ b/drivers/isdn/capi/capi.c
> @@ -1456,7 +1456,7 @@ static struct procfsentries {
>
> static void __init proc_init(void)
> {
> - int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
> + int nelem = ARRAY_SIZE(procfsentries);
> int i;
>
> for (i=0; i < nelem; i++) {
> @@ -1468,7 +1468,7 @@ static void __init proc_init(void)
>
> static void __exit proc_exit(void)
> {
> - int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
> + int nelem = ARRAY_SIZE(procfsentries);
> int i;
>
> for (i=nelem-1; i >= 0; i--) {
> diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
> index c4d438c..8cec9c3 100644
> --- a/drivers/isdn/capi/capidrv.c
> +++ b/drivers/isdn/capi/capidrv.c
> @@ -2218,7 +2218,7 @@ static struct procfsentries {
>
> static void __init proc_init(void)
> {
> - int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
> + int nelem = ARRAY_SIZE(procfsentries);
> int i;
>
> for (i=0; i < nelem; i++) {
> @@ -2230,7 +2230,7 @@ static void __init proc_init(void)
>
> static void __exit proc_exit(void)
> {
> - int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
> + int nelem = ARRAY_SIZE(procfsentries);
> int i;
>
> for (i=nelem-1; i >= 0; i--) {
>
> --
> Ahmed S. Darwish
> http://darwish-07.blogspot.com
--
Karsten Keil
SuSE Labs
ISDN development
prev parent reply other threads:[~2007-01-16 13:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 9:53 Ahmed S. Darwish
2007-01-16 13:05 ` Karsten Keil [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=20070116130544.GA18190@pingi.kke.suse.de \
--to=kkeil@suse.de \
--cc=darwish.07@gmail.com \
--cc=kai.germaschewski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@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
all inboxes | Powered by JetHome®