Re: [PATCH 1/4] Bluetooth: Move struct hci_request definition higher up in hci_core.h

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

 



Hi Marcel,

On Fri, Dec 19, 2014, Marcel Holtmann wrote:
> > We'll soon start using struct hci_request as a parameter to several more
> > functions in hci_core.h. To avoid compiler warnings of an undefined
> > struct the definition needs to be moved higher up in the file. This
> > patch moves it to the end of the block where several other structs are
> > also defined.
> > 
> > Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> > ---
> > include/net/bluetooth/hci_core.h | 20 ++++++++++----------
> > 1 file changed, 10 insertions(+), 10 deletions(-)
> > 
> > diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> > index 3c7827005c25..75aaae07037f 100644
> > --- a/include/net/bluetooth/hci_core.h
> > +++ b/include/net/bluetooth/hci_core.h
> > @@ -479,6 +479,16 @@ struct hci_conn_params {
> > 	struct hci_conn *conn;
> > };
> > 
> > +struct hci_request {
> > +	struct hci_dev		*hdev;
> > +	struct sk_buff_head	cmd_q;
> > +
> > +	/* If something goes wrong when building the HCI request, the error
> > +	 * value is stored in this field.
> > +	 */
> > +	int			err;
> > +};
> > +
> > extern struct list_head hci_dev_list;
> > extern struct list_head hci_cb_list;
> > extern rwlock_t hci_dev_list_lock;
> > @@ -1284,16 +1294,6 @@ static inline int hci_check_conn_params(u16 min, u16 max, u16 latency,
> > int hci_register_cb(struct hci_cb *hcb);
> > int hci_unregister_cb(struct hci_cb *hcb);
> > 
> > -struct hci_request {
> > -	struct hci_dev		*hdev;
> > -	struct sk_buff_head	cmd_q;
> > -
> > -	/* If something goes wrong when building the HCI request, the error
> > -	 * value is stored in this field.
> > -	 */
> > -	int			err;
> > -};
> > -
> > void hci_req_init(struct hci_request *req, struct hci_dev *hdev);
> > int hci_req_run(struct hci_request *req, hci_req_complete_t complete);
> > void hci_req_add(struct hci_request *req, u16 opcode, u32 plen,
> 
> any reason to not move these along with the data structure? They
> actually do belong together.

Nothing else except that hci_core.h didn't seem to have a very well
established order to begin with and there seemed to be a general section
for structs where I moved this to. I can move the functions along with
it.

Johan
--
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