From: Francis Galiegue <fgaliegue@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/7] drivers:media:radio: wl128x: fmdrv common header file
Date: Fri, 17 Dec 2010 11:02:26 +0000 (UTC) [thread overview]
Message-ID: <loom.20101217T115727-612@post.gmane.org> (raw)
In-Reply-To: <1292583996-4440-2-git-send-email-manjunatha_halli@ti.com>
manjunatha_halli <at> ti.com> writes:
[...]
> +
> +#define NO_OF_ENTRIES_IN_ARRAY(array) (sizeof(array) / sizeof(array[0]))
> +
Hello,
There is already ARRAY_SIZE() defined in <linux/kernel.h>. And while we're at
it, git grep '#define ARRAY_SIZE' tells that there are 4 definitions in arch:
arch/powerpc/boot/types.h:#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
arch/um/include/shared/user.h:#define ARRAY_SIZE(x) (sizeof(x) /
sizeof((x)[0]))
arch/x86/boot/boot.h:#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
arch/x86/boot/compressed/relocs.c:#define ARRAY_SIZE(x) (sizeof(x) /
sizeof((x)[0]))
include/linux/kernel.h:#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])
+ __must_be_array(arr))
Does the __must_be_array() cause trouble with arch/? If not, shouldn't these
definitions be merged?
next prev parent reply other threads:[~2010-12-18 10:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 11:06 [PATCH v7 0/7] FM V4L2 drivers for WL128x manjunatha_halli
2010-12-17 11:06 ` [PATCH v7 1/7] drivers:media:radio: wl128x: fmdrv common header file manjunatha_halli
2010-12-17 11:02 ` Francis Galiegue [this message]
2010-12-17 11:06 ` [PATCH v7 2/7] drivers:media:radio: wl128x: fmdrv_v4l2 sources manjunatha_halli
2010-12-17 11:06 ` [PATCH v7 3/7] drivers:media:radio: wl128x: fmdrv_common sources manjunatha_halli
2010-12-17 11:06 ` [PATCH v7 4/7] drivers:media:radio: wl128x: FM driver RX sources manjunatha_halli
2010-12-17 11:06 ` [PATCH v7 5/7] drivers:media:radio: wl128x: FM driver TX sources manjunatha_halli
2010-12-17 11:06 ` [PATCH v7 6/7] drivers:media:radio: wl128x: Kconfig & Makefile added for wl128x driver manjunatha_halli
2010-12-17 11:06 ` [PATCH v7 7/7] drivers:media:radio: Update Kconfig and Makefile for supporting wl128x manjunatha_halli
2010-12-18 11:38 ` [PATCH v7 2/7] drivers:media:radio: wl128x: fmdrv_v4l2 sources Hans Verkuil
2010-12-22 6:19 ` halli manjunatha
2010-12-22 11:56 ` Hans Verkuil
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=loom.20101217T115727-612@post.gmane.org \
--to=fgaliegue@gmail.com \
--cc=linux-kernel@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 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®