Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/3] Bluetooth: Create a unique mgmt error code hierarchy
Date: Fri, 11 Nov 2011 17:59:26 +0200	[thread overview]
Message-ID: <20111111155926.GA32446@fusion.localdomain> (raw)
In-Reply-To: <CAJdJm_PLSU5wckLrXRjnL8WJb-YAq49s1oMwA_Y72rTbE_pPEQ@mail.gmail.com>

Hi Lizardo,

On Fri, Nov 11, 2011, Anderson Lizardo wrote:
> On Fri, Nov 11, 2011 at 10:18 AM,  <johan.hedberg@gmail.com> 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

  reply	other threads:[~2011-11-11 15:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11 14:18 [PATCH 1/3] Bluetooth: Return success instead of EALREADY for mgmt commands johan.hedberg
2011-11-11 14:18 ` [PATCH 2/3] Bluetooth: Create a unique mgmt error code hierarchy johan.hedberg
2011-11-11 14:37   ` Anderson Lizardo
2011-11-11 15:59     ` Johan Hedberg [this message]
2011-11-11 16:10   ` [PATCH v2] " johan.hedberg
2011-11-11 16:49     ` Andre Guedes
2011-11-11 17:40       ` Johan Hedberg
2011-11-16 18:11     ` Gustavo Padovan
2011-11-16 21:05       ` Johan Hedberg
2011-11-16 22:51         ` Gustavo Padovan
2011-11-11 14:18 ` [PATCH 3/3] Bluetooth: Add missing cmd_complete for mgmt_load_link_keys johan.hedberg
2011-11-16 18:23   ` Gustavo Padovan

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=20111111155926.GA32446@fusion.localdomain \
    --to=johan.hedberg@gmail.com \
    --cc=anderson.lizardo@openbossa.org \
    --cc=linux-bluetooth@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