From: Szymon Janc <ext.szymon.janc@tieto.com>
To: "Mutharaju, Prasanna (P.)" <mkarthi3@visteon.com>
Cc: "marcel@holtmann.org" <marcel@holtmann.org>,
"gustavo@padovan.org" <gustavo@padovan.org>,
"johan.hedberg@gmail.com" <johan.hedberg@gmail.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] Bluetooth:hci_qca: Changed unsigned long to bool
Date: Mon, 28 Sep 2015 09:15:47 +0200 [thread overview]
Message-ID: <8697290.fIAsqDPKZQ@leonov> (raw)
In-Reply-To: <20150928062901.GA5935@jci-VirtualBox>
Hi,
On Monday 28 of September 2015 06:29:07 Mutharaju, Prasanna wrote:
> From: Prasanna Karthik <mkarthi3@visteon.com>
>
> 'retransmit' being set in HCI_IBS_TX_WAKING case,
> using bool would be efficient.
>
> Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
> ---
> drivers/bluetooth/hci_qca.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 21f4ea4..3fdb17d 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -347,7 +347,7 @@ static void hci_ibs_wake_retrans_timeout(unsigned long
> arg) struct hci_uart *hu = (struct hci_uart *)arg;
> struct qca_data *qca = hu->priv;
> unsigned long flags, retrans_delay;
> - unsigned long retransmit = 0;
> + bool retransmit;
>
> BT_DBG("hu %p wake retransmit timeout in %d state",
> hu, qca->tx_ibs_state);
> @@ -358,7 +358,7 @@ static void hci_ibs_wake_retrans_timeout(unsigned long
> arg) switch (qca->tx_ibs_state) {
> case HCI_IBS_TX_WAKING:
> /* No WAKE_ACK, retransmit WAKE */
> - retransmit = 1;
> + retransmit = true;
> if (send_hci_ibs_cmd(HCI_IBS_WAKE_IND, hu) < 0) {
> BT_ERR("Failed to acknowledge device wake up");
> break;
Isn't this patch giving you a warning about retransmit being used
uninitialized? (it is never set to false)
--
BR
Szymon Janc
next prev parent reply other threads:[~2015-09-28 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 6:29 [PATCH] Bluetooth:hci_qca: Changed unsigned long to bool Mutharaju, Prasanna (P.)
2015-09-28 7:15 ` Szymon Janc [this message]
2015-09-28 7:58 ` Mutharaju, Prasanna (P.)
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=8697290.fIAsqDPKZQ@leonov \
--to=ext.szymon.janc@tieto.com \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mkarthi3@visteon.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.