On Mon, 2007-06-11 19:47:06 +0200, Karsten Keil <[EMAIL PROTECTED]> wrote:
> diff --git a/drivers/isdn/hisax/callc.c b/drivers/isdn/hisax/callc.c
> index 7c56c44..0b9ed8e 100644
> --- a/drivers/isdn/hisax/callc.c
> +++ b/drivers/isdn/hisax/callc.c
> @@ -834,8 +834,6 @@ static struct FsmNode fnlist[
> Agree, here is a new version.
>
> This patch replaces various array size calculations in drivers/isdn/hisax
> done using sizeof with the ARRAY_SIZE macro.
Thanks for the work Karsten.
Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a messag
> I think what was meant here was to remove _all_ the macros that you
> assigned to the ARRAY_SIZE() macro.
Yes, absolutely. I overlooked the 'eg.' in Jan-Benedict's post. Sorry for that.
> If you look at the two advantages replacing code with the ARRAY_SIZE()
> macro has;
> 1. More readable/cons
On Mon, Jun 11, 2007 at 10:25:31PM +1000, Darren Jenkins wrote:
> G'day Andi,
>
> On 6/11/07, Andi Drebes <[EMAIL PROTECTED]> wrote:
>
> >> I'd suggest to not use another define, but use ARRAY_SIZE(foo)
> >> _instead of_ eg. FNCOUNT.
> >I thought of this, too, but I tried to keep things consisten
G'day Andi,
On 6/11/07, Andi Drebes <[EMAIL PROTECTED]> wrote:
> I'd suggest to not use another define, but use ARRAY_SIZE(foo)
> _instead of_ eg. FNCOUNT.
I thought of this, too, but I tried to keep things consistent. Let me
explain that a little bit more in detail. If you have a look at the f
> > > --- a/drivers/isdn/hisax/callc.c
> > > +++ b/drivers/isdn/hisax/callc.c
> > > @@ -834,7 +834,7 @@ static struct FsmNode fnlist[] __initdata =
> > > };
> > > /* *INDENT-ON* */
> > >
> > > -#define FNCOUNT (sizeof(fnlist)/sizeof(struct FsmNode))
> > > +#define FNCOUNT ARRAY_SIZE(fnlist)
> >
On Sun, 2007-06-10 15:11:22 +0200, Karsten Keil <[EMAIL PROTECTED]> wrote:
> > --- a/drivers/isdn/hisax/callc.c
> > +++ b/drivers/isdn/hisax/callc.c
> > @@ -834,7 +834,7 @@ static struct FsmNode fnlist[] __initdata =
> > };
> > /* *INDENT-ON* */
> >
> > -#define FNCOUNT (sizeof(fnlist)/sizeof(s
This is OK, thanks for changing.
On Sun, Jun 10, 2007 at 12:35:08PM +0200, Andi Drebes wrote:
> This patch replaces various array size calculations in drivers/isdn/hisax
> done using sizeof with the ARRAY_SIZE macro.
>
> Please CC me when you write comments, because I'm not subscribed
> to the LK
This patch replaces various array size calculations in drivers/isdn/hisax
done using sizeof with the ARRAY_SIZE macro.
Please CC me when you write comments, because I'm not subscribed
to the LKML.
Tested by compilation on an i386 box using "allyesconfig".
Diffed against Linus' git-tree.
Signed-o
9 matches
Mail list logo