Re: [PATCH] shared/gatt: Use iterator based discovery result structure.

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

 



Hi Arman,

>>> +struct result_ptrs {
>>> +     struct bt_gatt_result *head;
>>> +     struct bt_gatt_result *tail;
>>> +};
>>> +
>>> +struct discovery_op {
>>> +     struct bt_att *att;
>>> +     uint16_t end_handle;
>>> +     int ref_count;
>>> +     bt_uuid_t uuid;
>>> +     struct result_ptrs result;
>> 
>> Does this nested struct give you any benefit. Why not just include head and tail pointers directly.
>> 
> 
> I initially thought that I would reuse the result ptrs but I didn't so
> it's not that necessary any more.
> 
> 
>> I was actually thinking that struct bt_gatt_result will keep the tail pointer all by itself. That way it is self-contained.
> 
> I'd rather have the head and tail pointers inside discovery_op. It's a
> bit weird for each "link" (i.e. struct bt_gatt_result) to have a tail
> pointer, which the iterator itself won't ever use later.

then go for putting them in discovery_op. We can optimize things later since these are all internal details.

Regards

Marcel

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