From: Szymon Janc <szymon.janc@tieto.com>
To: Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] android/bluetooth: Fix discovering new devices
Date: Thu, 16 Jan 2014 11:22:55 +0100 [thread overview]
Message-ID: <3622437.o5mxG3O6lC@uw000953> (raw)
In-Reply-To: <20140114113920.GD4709@x220.p-661hnu-f1>
Hi Johan,
On Tuesday 14 of January 2014 13:39:20 Johan Hedberg wrote:
> Hi Szymon,
>
> On Tue, Jan 14, 2014, Szymon Janc wrote:
> > + } else {
> > + GSList *l;
> > +
> > + for(l = devices; l; l = g_slist_next(l)) {
>
> Coding style thing here (space after 'for'). You might wanna consider a
> helper function and g_slist_foreach here tough.
>
> > +static bool device_found_needed(struct device *dev)
> > +{
> > + if (!dev)
> > + return true;
> > +
> > + if (dev->bond_state == HAL_BOND_STATE_BONDED)
> > + return false;
> > +
> > + return !dev->found;
> > +}
>
> I think you should provide lots more code comments here with proper
> explanations of each if-statement. E.g. your commit message doesn't
> mention anything about bonded devices and yet you have a check for this
> state here.
Now I think this check is not really needed, if paired remote is responding to
inquiry then just notify HAL as with any other device found.
I'll send V2 shortly.
--
Best regards,
Szymon Janc
prev parent reply other threads:[~2014-01-16 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 9:31 [PATCH] android/bluetooth: Fix discovering new devices Szymon Janc
2014-01-14 11:39 ` Johan Hedberg
2014-01-16 10:22 ` Szymon Janc [this message]
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=3622437.o5mxG3O6lC@uw000953 \
--to=szymon.janc@tieto.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox