All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dirk-Jan C. Binnema" <djcb.bulk@gmail.com>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] attrib/gatt_service_add: support 128-bit uuids for characteristics
Date: Wed, 24 Jul 2013 10:25:29 +0300	[thread overview]
Message-ID: <87fvv4ju6u.fsf@djcbsoftware.nl> (raw)
In-Reply-To: <20130724045756.GC14367@x220.p-661hnu-f1>

Hi Johan,

Thanks for the quick review! I've updated the too-long lines and taught
emacs to avoid mixing tabs/space in bluez code.

On 2013-07-24 07:57, johan.hedberg@gmail.com wrote:

 > info->uuid.value is a union so I don't think it's safe to check any
 > particular member before you've checked uuid.type. However, isn't what
 > you want above to check that you have a BT_UUID16 or BT_UUID128? I.e.
 > there should be no need to check for info->uuid.value.u16 directly.

Makes sense; note that the value check was in the original code, which I
didn't want to touch. In any case, I've changed it now.

 > Be consistent with the coding style here: type casts should have a space
 > between the cast and the variable.

 > >  typedef enum {
 > >  	GATT_OPT_INVALID = 0,
 > >  	GATT_OPT_CHR_UUID,
 > > +	GATT_OPT_CHR_BT_UUID_T,
 > >  	GATT_OPT_CHR_PROPS,
 > >  	GATT_OPT_CHR_VALUE_CB,
 > >  	GATT_OPT_CHR_AUTHENTICATION,

 > To be honest, I'm not 100% sure this is the best name for the new
 > option, but I can't really think of anything much better either.
 > Renaming the existing one to UUID_STR and the new one to UUID (like the
 > old one was) would be one option, but it's one more patch and more code
 > changes.

Indeed, couldn't come up with a better name myself :/... The old one
takes a uint16_t, so maybe we could call it UUID_16, and perhaps in the
future add UUID_STR for string-encoded 128-bit uuids.

Anyway, I'll send an updated patch.

Cheers,
Dirk.
 

-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb@djcbsoftware.nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

  reply	other threads:[~2013-07-24  7:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 13:47 [PATCH] attrib/gatt_service_add: support 128-bit uuids for characteristics Dirk-Jan C. Binnema
2013-07-24  4:57 ` Johan Hedberg
2013-07-24  7:25   ` Dirk-Jan C. Binnema [this message]
2013-07-24  7:32   ` Dirk-Jan C. Binnema
2013-07-24 10:55     ` Anderson Lizardo
2013-07-24 16:43       ` Dirk-Jan C. Binnema
2013-07-24 17:03         ` Johan Hedberg
2013-07-24 17:51           ` [PATCH 1/2] Add support for 128-bit UUIDs " Dirk-Jan C. Binnema
2013-07-24 17:51             ` [PATCH 2/2] Use GATT_OPT_CHR_UUID for bt_uuid_t*, GATT_OPT_CHR_UUID16 for uint16 chrs Dirk-Jan C. Binnema
2013-07-24 17:38         ` [PATCH] attrib/gatt_service_add: support 128-bit uuids for characteristics Anderson Lizardo
2013-07-24 18:04           ` Dirk-Jan C. Binnema
2013-07-25  4:35           ` [PATCH 1/3] gatt-service: fix assertion in gatt_service_add for 128-bit uuids Dirk-Jan C. Binnema
2013-07-25  4:35             ` [PATCH 2/3] gatt_service_add: add support for 128-bit uuids for characteristics Dirk-Jan C. Binnema
2013-07-25  4:35             ` [PATCH 3/3] Use GATT_OPT_CHR_UUID for bt_uuid_t*, GATT_OPT_CHR_UUID16 for uint16 chrs Dirk-Jan C. Binnema

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=87fvv4ju6u.fsf@djcbsoftware.nl \
    --to=djcb.bulk@gmail.com \
    --cc=johan.hedberg@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.