Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appropriate

2007-02-08 Thread Kai Germaschewski
Bill Davidsen wrote: > Philippe De Muyter wrote: >> On Tue, Feb 06, 2007 at 10:41:30PM +0200, Ahmed S. Darwish wrote: >>> On Tue, Feb 06, 2007 at 09:52:17AM -0800, Joe Perches wrote: On Tue, 2007-02-06 at 18:04 +0200, Ahmed S. Darwish wrote: > A patch to use ARRAY_SIZE macro already define

Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appropriate

2007-02-08 Thread Bill Davidsen
Philippe De Muyter wrote: On Tue, Feb 06, 2007 at 10:41:30PM +0200, Ahmed S. Darwish wrote: On Tue, Feb 06, 2007 at 09:52:17AM -0800, Joe Perches wrote: On Tue, 2007-02-06 at 18:04 +0200, Ahmed S. Darwish wrote: A patch to use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S

Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appropriate

2007-02-07 Thread Philippe De Muyter
On Wed, Feb 07, 2007 at 09:41:00PM +0200, Ahmed S. Darwish wrote: > On Tue, Feb 06, 2007 at 10:18:14PM +0100, Philippe De Muyter wrote: > > On Tue, Feb 06, 2007 at 10:41:30PM +0200, Ahmed S. Darwish wrote: > > > > > > -for (i=nelem-1; i >= 0; i--) { > > > +for (i = ARRAY_SIZE(procfsentrie

Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appropriate

2007-02-07 Thread Ahmed S. Darwish
On Tue, Feb 06, 2007 at 10:18:14PM +0100, Philippe De Muyter wrote: > On Tue, Feb 06, 2007 at 10:41:30PM +0200, Ahmed S. Darwish wrote: > > > > -for (i=nelem-1; i >= 0; i--) { > > +for (i = ARRAY_SIZE(procfsentries) - 1; i >= 0; i--) { > > I would write such decrementing loops as : > >

Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appropriate

2007-02-06 Thread Philippe De Muyter
On Tue, Feb 06, 2007 at 10:41:30PM +0200, Ahmed S. Darwish wrote: > On Tue, Feb 06, 2007 at 09:52:17AM -0800, Joe Perches wrote: > > On Tue, 2007-02-06 at 18:04 +0200, Ahmed S. Darwish wrote: > > > A patch to use ARRAY_SIZE macro already defined in kernel.h > > > Signed-off-by: Ahmed S. Darwish <[E

Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appropriate

2007-02-06 Thread Ahmed S. Darwish
On Tue, Feb 06, 2007 at 09:52:17AM -0800, Joe Perches wrote: > On Tue, 2007-02-06 at 18:04 +0200, Ahmed S. Darwish wrote: > > A patch to use ARRAY_SIZE macro already defined in kernel.h > > Signed-off-by: Ahmed S. Darwish <[EMAIL PROTECTED]> [...] > > -int nelem = sizeof(procfsentries)/sizeof(p

Re: [PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appropriate

2007-02-06 Thread Joe Perches
On Tue, 2007-02-06 at 18:04 +0200, Ahmed S. Darwish wrote: > A patch to use ARRAY_SIZE macro already defined in kernel.h > Signed-off-by: Ahmed S. Darwish <[EMAIL PROTECTED]> > --- > diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c > index d22c022..3804591 100644 > --- a/drivers/isd

[PATCH 2.6.20] isdn-capi: Use ARRAY_SIZE macro when appropriate

2007-02-06 Thread Ahmed S. Darwish
Hi all, A patch to use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S. Darwish <[EMAIL PROTECTED]> --- 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 d22c0