Re: [RFC 1/4] Bluetooth: Prepare start_discovery

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

 



Hi Andre,

> > On Thu, Feb 16, 2012, Andre Guedes wrote:
> >> +#define DISCOV_TYPE_BREDR            (BIT(0))
> >> +#define DISCOV_TYPE_LE                       (BIT(1) | BIT(2))
> >> +#define DISCOV_TYPE_INTERLEAVED              (BIT(0) | BIT(1) | BIT(2))
> >
> > Defining these like this looks a bit (no pun intended) odd. The previous
> > code was at least using the mgmt defs instead of magic numbers (which is
> > how these values have been originally chosen too).
> 
> Do you think this would be better?
> 
> +#define DISCOV_TYPE_BREDR            (BIT(MGMT_ADDR_BREDR))
> +#define DISCOV_TYPE_LE               (BIT(MGMT_ADDR_LE_PUBLIC) |
> BIT(MGMT_ADDR_LE_RANDOM))
> +#define DISCOV_TYPE_INTERLEAVED      (BIT(MGMT_ADDR_BREDR) |
> BIT(MGMT_ADDR_LE_PUBLIC) | \
> +
> BIT(MGMT_ADDR_LE_RANDOM))

even while I already acked the previous patch, this is a bit better.

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