Re: [RFCv1 3/6] Bluetooth: AMP: Add handle to hci_chan structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

On Wed, Oct 10, 2012 at 12:07:56PM +0200, Marcel Holtmann wrote:
> Hi Andrei,
> 
> > > > -
> > > > +struct hci_chan *hci_chan_lookup_handle(struct hci_conn *hcon, __u16 handle);
> > > > +struct hci_chan *hci_chan_lookup_handle_all(struct hci_dev *hdev,
> > > > +					    __u16 handle);
> > > 
> > > this naming is pretty bad. I have no idea what one function does
> > > different compared to the other. Especially since none of them take a
> > > hci_chan as argument, but start with that prefix.
> > > 
> > > Would be the naming hci_conn_lookup_chan be a lot clearer? Or maybe
> > > hci_chan_lookup_from_dev or similar.
> > 
> > So are names like:
> > 
> > hci_conn_lookup_hchan_by_handle
> 
> since this one is only internal, you better have a shortcut version as
> just a static helper inside that code.

OK, will name this like __hci_chan_lookup_handle

> 
> > hci_conn_lookup_hchan_from_hdev
> 
> If we follow our naming convention then hci_chan_lookup_from_dev would
> come closest. However since you only need one of these, then
> hci_chan_lookup_handle would be fine and in sync with how we named
> everything else.

then this would be:

hci_chan_lookup_handle

Best regards 
Andrei Emeltchenko 

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux