From: Johan Hedberg <johan.hedberg@gmail.com>
To: Hemant Gupta <hemant.gupta@stericsson.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] mgmtops: Handle Start Discovery Complete in case of failure
Date: Tue, 10 Apr 2012 12:13:20 +0300 [thread overview]
Message-ID: <20120410091320.GA6124@x220> (raw)
In-Reply-To: <1333955251-8377-1-git-send-email-hemant.gupta@stericsson.com>
Hi Hemant,
On Mon, Apr 09, 2012, Hemant Gupta wrote:
> + if (len != sizeof(*type)) {
> + error("start_discovery_complete event size mismatch "
> + "(%zu != %zu)", len, sizeof(*type));
The above line should be indented only with tabs. You're using tabs +
spaces.
> + if (index > max_index) {
> + error("Unexpected index %u in start_discovery_complete",
> + index);
> + return;
> + }
> +
> + if (!status)
> + return;
> +
> + DBG("hci%u type%d status%d", index, *type, status);
Could you move this DBG statement above the index < max_index and add
spaces after "type" and "status" (hci%u is the only exception since
that's how adapters are named). Also, the format specifiers should be %u
since both type and status are unsigned.
> + adapter = manager_find_adapter_by_id(index);
> +
> + if (adapter)
Remove the empty line between the adapter assignment and the
if-statement (this applies to any function call and a test for its
result; there should be no empty line between them).
Johan
next prev parent reply other threads:[~2012-04-10 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-09 7:07 [PATCH] mgmtops: Handle Start Discovery Complete in case of failure Hemant Gupta
2012-04-10 9:13 ` Johan Hedberg [this message]
2012-04-10 9:58 ` Hemant Gupta
2012-04-10 10:04 ` Johan Hedberg
-- strict thread matches above, loose matches on Subject: below --
2012-04-09 5:47 Hemant Gupta
2012-04-09 7:05 ` Marcel Holtmann
2012-04-09 7:08 ` Hemant Gupta
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=20120410091320.GA6124@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