Re: [PATCH] Bluetooth:hci_qca: Changed unsigned long to bool

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

 



On Mon, Sep 28, 2015 at 09:15:47AM +0200, Szymon Janc wrote:
> Hi,
> 
> On Monday 28 of September 2015 06:29:07 Mutharaju, Prasanna wrote:
> > From: Prasanna Karthik <mkarthi3@xxxxxxxxxxx>
> > 
> > 'retransmit' being set in HCI_IBS_TX_WAKING case,
> > using bool would be efficient.
> > 
> > Signed-off-by: Prasanna Karthik <mkarthi3@xxxxxxxxxxx>
> > ---
> >  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

Nope, It doesn't show compiler warning, bool will be initialized to false
by default by the compiler. I will send a V2 of the patch with retransmit
set to false if needed. --
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