linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] b43: Fix use true/false for bool type
@ 2019-10-28 19:02 Saurav Girepunje
  2019-10-29  8:24 ` Simon Horman
  2019-10-31  8:07 ` [PATCH] b43: main: " Kalle Valo
  0 siblings, 2 replies; 6+ messages in thread
From: Saurav Girepunje @ 2019-10-28 19:02 UTC (permalink / raw)
  To: kvalo, davem, swinslow, will, opensource, saurav.girepunje,
	baijiaju1990, tglx, linux-wireless, b43-dev, netdev,
	linux-kernel
  Cc: saurav.girepunje

use true/false on bool type variable assignment.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
 drivers/net/wireless/broadcom/b43/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
index b85603e91c7a..39da1a4c30ac 100644
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
@@ -3600,7 +3600,7 @@ static void b43_tx_work(struct work_struct *work)
 			else
 				err = b43_dma_tx(dev, skb);
 			if (err == -ENOSPC) {
-				wl->tx_queue_stopped[queue_num] = 1;
+				wl->tx_queue_stopped[queue_num] = true;
 				ieee80211_stop_queue(wl->hw, queue_num);
 				skb_queue_head(&wl->tx_queue[queue_num], skb);
 				break;
@@ -3611,7 +3611,7 @@ static void b43_tx_work(struct work_struct *work)
 		}
 
 		if (!err)
-			wl->tx_queue_stopped[queue_num] = 0;
+			wl->tx_queue_stopped[queue_num] = false;
 	}
 
 #if B43_DEBUG
@@ -5603,7 +5603,7 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
 	/* Initialize queues and flags. */
 	for (queue_num = 0; queue_num < B43_QOS_QUEUE_NUM; queue_num++) {
 		skb_queue_head_init(&wl->tx_queue[queue_num]);
-		wl->tx_queue_stopped[queue_num] = 0;
+		wl->tx_queue_stopped[queue_num] = false;
 	}
 
 	snprintf(chip_name, ARRAY_SIZE(chip_name),
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] b43: Fix use true/false for bool type
  2019-10-28 19:02 [PATCH] b43: Fix use true/false for bool type Saurav Girepunje
@ 2019-10-29  8:24 ` Simon Horman
  2019-10-29  8:30   ` Joe Perches
  2019-10-29  8:43   ` Simon Horman
  2019-10-31  8:07 ` [PATCH] b43: main: " Kalle Valo
  1 sibling, 2 replies; 6+ messages in thread
From: Simon Horman @ 2019-10-29  8:24 UTC (permalink / raw)
  To: Saurav Girepunje
  Cc: kvalo, davem, swinslow, will, opensource, baijiaju1990, tglx,
	linux-wireless, b43-dev, netdev, linux-kernel, saurav.girepunje

Hi Saurav,

thanks for your patch.

On Tue, Oct 29, 2019 at 12:32:04AM +0530, Saurav Girepunje wrote:
> use true/false on bool type variable assignment.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>

This does not seem to cover the case in dma.c,
which seems to want fixing for the sake of consistency.

Also, I wonder why bools rather than a bitmask was chosen
for this field, it seems rather space intensive in its current form.

> ---
>  drivers/net/wireless/broadcom/b43/main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
> index b85603e91c7a..39da1a4c30ac 100644
> --- a/drivers/net/wireless/broadcom/b43/main.c
> +++ b/drivers/net/wireless/broadcom/b43/main.c
> @@ -3600,7 +3600,7 @@ static void b43_tx_work(struct work_struct *work)
>  			else
>  				err = b43_dma_tx(dev, skb);
>  			if (err == -ENOSPC) {
> -				wl->tx_queue_stopped[queue_num] = 1;
> +				wl->tx_queue_stopped[queue_num] = true;
>  				ieee80211_stop_queue(wl->hw, queue_num);
>  				skb_queue_head(&wl->tx_queue[queue_num], skb);
>  				break;
> @@ -3611,7 +3611,7 @@ static void b43_tx_work(struct work_struct *work)
>  		}
>  
>  		if (!err)
> -			wl->tx_queue_stopped[queue_num] = 0;
> +			wl->tx_queue_stopped[queue_num] = false;
>  	}
>  
>  #if B43_DEBUG
> @@ -5603,7 +5603,7 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
>  	/* Initialize queues and flags. */
>  	for (queue_num = 0; queue_num < B43_QOS_QUEUE_NUM; queue_num++) {
>  		skb_queue_head_init(&wl->tx_queue[queue_num]);
> -		wl->tx_queue_stopped[queue_num] = 0;
> +		wl->tx_queue_stopped[queue_num] = false;
>  	}
>  
>  	snprintf(chip_name, ARRAY_SIZE(chip_name),
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] b43: Fix use true/false for bool type
  2019-10-29  8:24 ` Simon Horman
@ 2019-10-29  8:30   ` Joe Perches
  2019-10-29  8:43     ` Simon Horman
  2019-10-29  8:43   ` Simon Horman
  1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2019-10-29  8:30 UTC (permalink / raw)
  To: Simon Horman, Saurav Girepunje
  Cc: kvalo, davem, swinslow, will, opensource, baijiaju1990, tglx,
	linux-wireless, b43-dev, netdev, linux-kernel, saurav.girepunje

On Tue, 2019-10-29 at 09:24 +0100, Simon Horman wrote:
> I wonder why bools rather than a bitmask was chosen
> for this field, it seems rather space intensive in its current form.

4 bools is not intensive.

> > diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
[]
> > @@ -3600,7 +3600,7 @@ static void b43_tx_work(struct work_struct *work)
[]
> > -				wl->tx_queue_stopped[queue_num] = 1;
> > +				wl->tx_queue_stopped[queue_num] = true;



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] b43: Fix use true/false for bool type
  2019-10-29  8:24 ` Simon Horman
  2019-10-29  8:30   ` Joe Perches
@ 2019-10-29  8:43   ` Simon Horman
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Horman @ 2019-10-29  8:43 UTC (permalink / raw)
  To: Saurav Girepunje
  Cc: kvalo, davem, swinslow, will, opensource, baijiaju1990, tglx,
	linux-wireless, b43-dev, netdev, linux-kernel, saurav.girepunje

On Tue, Oct 29, 2019 at 09:24:27AM +0100, Simon Horman wrote:
> Hi Saurav,
> 
> thanks for your patch.
> 
> On Tue, Oct 29, 2019 at 12:32:04AM +0530, Saurav Girepunje wrote:
> > use true/false on bool type variable assignment.
> > 
> > Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> 
> This does not seem to cover the case in dma.c,
> which seems to want fixing for the sake of consistency.

I now see this handled in a separate patch, sorry for the noise.

> Also, I wonder why bools rather than a bitmask was chosen
> for this field, it seems rather space intensive in its current form.
> 
> > ---
> >  drivers/net/wireless/broadcom/b43/main.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
> > index b85603e91c7a..39da1a4c30ac 100644
> > --- a/drivers/net/wireless/broadcom/b43/main.c
> > +++ b/drivers/net/wireless/broadcom/b43/main.c
> > @@ -3600,7 +3600,7 @@ static void b43_tx_work(struct work_struct *work)
> >  			else
> >  				err = b43_dma_tx(dev, skb);
> >  			if (err == -ENOSPC) {
> > -				wl->tx_queue_stopped[queue_num] = 1;
> > +				wl->tx_queue_stopped[queue_num] = true;
> >  				ieee80211_stop_queue(wl->hw, queue_num);
> >  				skb_queue_head(&wl->tx_queue[queue_num], skb);
> >  				break;
> > @@ -3611,7 +3611,7 @@ static void b43_tx_work(struct work_struct *work)
> >  		}
> >  
> >  		if (!err)
> > -			wl->tx_queue_stopped[queue_num] = 0;
> > +			wl->tx_queue_stopped[queue_num] = false;
> >  	}
> >  
> >  #if B43_DEBUG
> > @@ -5603,7 +5603,7 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
> >  	/* Initialize queues and flags. */
> >  	for (queue_num = 0; queue_num < B43_QOS_QUEUE_NUM; queue_num++) {
> >  		skb_queue_head_init(&wl->tx_queue[queue_num]);
> > -		wl->tx_queue_stopped[queue_num] = 0;
> > +		wl->tx_queue_stopped[queue_num] = false;
> >  	}
> >  
> >  	snprintf(chip_name, ARRAY_SIZE(chip_name),
> > -- 
> > 2.20.1
> > 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] b43: Fix use true/false for bool type
  2019-10-29  8:30   ` Joe Perches
@ 2019-10-29  8:43     ` Simon Horman
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2019-10-29  8:43 UTC (permalink / raw)
  To: Joe Perches
  Cc: Saurav Girepunje, kvalo, davem, swinslow, will, opensource,
	baijiaju1990, tglx, linux-wireless, b43-dev, netdev,
	linux-kernel, saurav.girepunje

On Tue, Oct 29, 2019 at 01:30:34AM -0700, Joe Perches wrote:
> On Tue, 2019-10-29 at 09:24 +0100, Simon Horman wrote:
> > I wonder why bools rather than a bitmask was chosen
> > for this field, it seems rather space intensive in its current form.
> 
> 4 bools is not intensive.

Thanks, point taken.

> 
> > > diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
> []
> > > @@ -3600,7 +3600,7 @@ static void b43_tx_work(struct work_struct *work)
> []
> > > -				wl->tx_queue_stopped[queue_num] = 1;
> > > +				wl->tx_queue_stopped[queue_num] = true;
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] b43: main: Fix use true/false for bool type
  2019-10-28 19:02 [PATCH] b43: Fix use true/false for bool type Saurav Girepunje
  2019-10-29  8:24 ` Simon Horman
@ 2019-10-31  8:07 ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2019-10-31  8:07 UTC (permalink / raw)
  To: Saurav Girepunje
  Cc: davem, swinslow, will, opensource, saurav.girepunje,
	baijiaju1990, tglx, linux-wireless, b43-dev, netdev,
	linux-kernel, saurav.girepunje

Saurav Girepunje <saurav.girepunje@gmail.com> wrote:

> use true/false on bool type variable assignment.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

6db774c17250 b43: main: Fix use true/false for bool type

-- 
https://patchwork.kernel.org/patch/11216303/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-31  8:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 19:02 [PATCH] b43: Fix use true/false for bool type Saurav Girepunje
2019-10-29  8:24 ` Simon Horman
2019-10-29  8:30   ` Joe Perches
2019-10-29  8:43     ` Simon Horman
2019-10-29  8:43   ` Simon Horman
2019-10-31  8:07 ` [PATCH] b43: main: " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).