Re: [PATCH 2/3] Bluetooth: Create a unique mgmt error code hierarchy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lizardo,

On Fri, Nov 11, 2011, Anderson Lizardo wrote:
> On Fri, Nov 11, 2011 at 10:18 AM,  <johan.hedberg@xxxxxxxxx> wrote:
> > +#ifndef NELEM
> > +#define NELEM(arr) (sizeof(arr) / sizeof((arr)[0]))
> > +#endif
> > +
> 
> What about using ARRAY_SIZE() from  kernel.h ?
> 
> include/linux/kernel.h:#define ARRAY_SIZE(arr) (sizeof(arr) /
> sizeof((arr)[0]) + __must_be_array(arr))

Yeah, I was looking for something like that but failed to find it.
Thanks for the pointer! I'll send an updated patch soon.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux