Re: [PATCH] android/bluetooth: Fix discovering new devices

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

 



Hi Szymon,

On Tue, Jan 14, 2014, Szymon Janc wrote:
> +	} else {
> +		GSList *l;
> +
> +		for(l = devices; l; l = g_slist_next(l)) {

Coding style thing here (space after 'for'). You might wanna consider a
helper function and g_slist_foreach here tough.

> +static bool device_found_needed(struct device *dev)
> +{
> +	if (!dev)
> +		return true;
> +
> +	if (dev->bond_state == HAL_BOND_STATE_BONDED)
> +		return false;
> +
> +	return !dev->found;
> +}

I think you should provide lots more code comments here with proper
explanations of each if-statement. E.g. your commit message doesn't
mention anything about bonded devices and yet you have a check for this
state here.

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