From: Marcel Holtmann <marcel@holtmann.org>
To: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Fix registering HCI devices with duplicate name
Date: Thu, 12 Apr 2012 12:50:19 +0200 [thread overview]
Message-ID: <1334227819.16897.144.camel@aeonflux> (raw)
In-Reply-To: <20120412104521.GA2779@aemeltch-MOBL1>
Hi Andrei,
> > then lets fix the logic we have right now. It can not be that hard to
> > have this behave correctly. Find the proper next free id and find the
> > right location in the list to add it to.
>
> We are highly dependent here on ordered list which is not good IMO,
> especially given that BR/EDR shall be first element with id=0. This of
> course works well in default situation when we have only 2 controllers.
>
> > > > > BTW: Have you checked my patch version 3.
> > > >
> > > > If we have to run through that list twice, then we are doing something
> > > > wrong. Also having to run through the whole list seems pointless. We
> > > > just need to make sure that the list stays ordered.
> > >
> > > We are not running through the whole list, just until found free id.
> >
> > You are running the whole list for the bitmask creation and then a
> > second time for finding the right location in the list. Fair enough that
>
> Second run is not needed, we can just add to the tail of the list. In most
> cases list will still be ordered and this does not matter since we do not
> depend on ordered list.
can we just ensure we have an ordered list and fix this.
Regards
Marcel
next prev parent reply other threads:[~2012-04-12 10:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 15:32 [PATCH] Bluetooth: Fix registering HCI devices with duplicate name Marcel Holtmann
2012-04-12 7:38 ` Andrei Emeltchenko
2012-04-12 9:50 ` Marcel Holtmann
2012-04-12 10:03 ` Andrei Emeltchenko
2012-04-12 10:15 ` Marcel Holtmann
2012-04-12 10:45 ` Andrei Emeltchenko
2012-04-12 10:50 ` Marcel Holtmann [this message]
2012-04-12 11:39 ` Andrei Emeltchenko
2012-04-13 8:29 ` Andrei Emeltchenko
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=1334227819.16897.144.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=andrei.emeltchenko.news@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;
as well as URLs for NNTP newsgroup(s).