public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Hemant Gupta <hemant.gupta@stericsson.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v1] mgmtops: Handle Start Discovery Complete in case of failure
Date: Tue, 10 Apr 2012 13:33:06 +0300	[thread overview]
Message-ID: <20120410103306.GA9418@x220> (raw)
In-Reply-To: <1334052807-14320-1-git-send-email-hemant.gupta@stericsson.com>

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

  reply	other threads:[~2012-04-10 10:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 10:13 [PATCH v1] mgmtops: Handle Start Discovery Complete in case of failure Hemant Gupta
2012-04-10 10:33 ` Johan Hedberg [this message]
2012-04-10 11:47   ` Hemant Gupta
2012-04-10 11:58     ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120410103306.GA9418@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=hemant.gupta@stericsson.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox