From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/3] Bluetooth: Automate remote name requests
Date: Wed, 17 Nov 2010 21:01:03 -0200 [thread overview]
Message-ID: <20101117230103.GA32261@vigoh> (raw)
In-Reply-To: <20101117223057.GB20735@jh-x301>
* Johan Hedberg <johan.hedberg@gmail.com> [2010-11-18 00:30:57 +0200]:
> Hi Gustavo,
>
> On Tue, Nov 16, 2010, Gustavo F. Padovan wrote:
> > > -static int request_outgoing_auth(struct hci_dev *hdev, bdaddr_t *bdaddr)
> > > +static int outgoing_auth_needed(struct hci_dev *hdev, bdaddr_t *bdaddr)
> >
> > Can you add a hci_ in the beginning of your functions, just to keep the
> > coherency with the rest of the code.
>
> Sure. I guess I'm too used to the userspace convention where strict
> namespacing is only used for exported (non-static) functions.
>
> > I'm not happy with have to lookup the hci_conn twice when we can do that
> > once here. I've noted that always outgoing_auth_needed() returns 1 you do
> > a request_auth, and always it returns 0 you don't, so I think we can
> > embed request_auth() inside outgoing_auth_needed() as it was in patch
> > 2/3 and the give a better name to outgoing_auth_needed() which you
> > reflect the new behavior.
>
> I don't think the check and request should be in the same function since
> there are two places that need the check but not the request.
In that case such function will return after the check not doing any
request.
--
Gustavo F. Padovan
http://profusion.mobi
next prev parent reply other threads:[~2010-11-17 23:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 15:11 [PATCH 1/3] Bluetooth: Simplify remote features callback function logic johan.hedberg
2010-11-10 15:11 ` [PATCH 2/3] Bluetooth: Create a unified authentication request function johan.hedberg
2010-11-10 15:11 ` [PATCH 3/3] Bluetooth: Automate remote name requests johan.hedberg
2010-11-10 21:11 ` Luiz Augusto von Dentz
2010-11-16 22:09 ` Gustavo F. Padovan
2010-11-17 22:30 ` Johan Hedberg
2010-11-17 23:01 ` Gustavo F. Padovan [this message]
2010-11-10 16:24 ` [PATCH 1/3] Bluetooth: Simplify remote features callback function logic Gustavo F. 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=20101117230103.GA32261@vigoh \
--to=padovan@profusion.mobi \
--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;
as well as URLs for NNTP newsgroup(s).