Re: [PATCH v1] mgmtops: Handle Start Discovery Complete in case of failure

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

 



Hi Hemant,

On Tue, Apr 10, 2012, Hemant Gupta wrote:
> This patch adds handling of start discovery complete event in cases
> when discovery fails to get started.
> ---
>  plugins/mgmtops.c |   33 ++++++++++++++++++++++++++++++++-
>  1 files changed, 32 insertions(+), 1 deletions(-)

The patch is now applied but I still had to fix it up manually myself:

> +static void start_discovery_complete(int sk, uint16_t index, uint8_t status,
> +				     void *buf, size_t len)

Incorrect indentation above: you should indent with tabs as much as
possible while remaining under the 80 character boundary.

> +	if (len != sizeof(*type)) {
> +		error("start_discovery_complete event size mismatch "
> +			"(%zu != %zu)", len, sizeof(*type));

This should also be indented more.

> +	DBG("type %u status %u", *type, status);

Where did the hci%u go? I meant move the entire DBG statement here and
not just part of it (it's perfectly fine to print the index value even
though it's > max_index).

> +	if (index > max_index) {
> +		error("Unexpected index %u in start_discovery_complete",
> +			index);

Incorrect indentation again (should be indented more)

> +	DBG("hci%u", index);

And the above should go away assuming that you move the entire statement
to the new location.

I think we'll need to reexamine the user space coding style now that the
kernel doesn't use a strict tabs-only approach anymore. But for now
we're still following the style we've always used in user space.

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