linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] wireless: broadcom: b43legacy: Fix assigning negative value to unsigned variable
@ 2022-03-24  8:06 Haowen Bai
  2022-03-24 15:58 ` Larry Finger
  2022-03-25 10:09 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Haowen Bai @ 2022-03-24  8:06 UTC (permalink / raw)
  To: Larry.Finger, kvalo; +Cc: linux-wireless, b43-dev, linux-kernel, Haowen Bai

fix warning reported by smatch:
drivers/net/wireless/broadcom/b43legacy/phy.c:1181 b43legacy_phy_lo_b_measure()
warn: assigning (-772) to unsigned variable 'fval'

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
V1->V2: modify title of this patch
 drivers/net/wireless/broadcom/b43legacy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/b43legacy/phy.c b/drivers/net/wireless/broadcom/b43legacy/phy.c
index 05404fb..c1395e6 100644
--- a/drivers/net/wireless/broadcom/b43legacy/phy.c
+++ b/drivers/net/wireless/broadcom/b43legacy/phy.c
@@ -1123,7 +1123,7 @@ void b43legacy_phy_lo_b_measure(struct b43legacy_wldev *dev)
 	struct b43legacy_phy *phy = &dev->phy;
 	u16 regstack[12] = { 0 };
 	u16 mls;
-	u16 fval;
+	s16 fval;
 	int i;
 	int j;
 
-- 
2.7.4


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

* Re: [PATCH V2] wireless: broadcom: b43legacy: Fix assigning negative value to unsigned variable
  2022-03-24  8:06 [PATCH V2] wireless: broadcom: b43legacy: Fix assigning negative value to unsigned variable Haowen Bai
@ 2022-03-24 15:58 ` Larry Finger
  2022-03-25 10:09 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Larry Finger @ 2022-03-24 15:58 UTC (permalink / raw)
  To: Haowen Bai, kvalo; +Cc: linux-wireless, b43-dev, linux-kernel

On 3/24/22 03:06, Haowen Bai wrote:
> fix warning reported by smatch:
> drivers/net/wireless/broadcom/b43legacy/phy.c:1181 b43legacy_phy_lo_b_measure()
> warn: assigning (-772) to unsigned variable 'fval'
> 
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>

This change makes no change to the executable code, but as long as it makes 
smatch happy -

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Larry

> ---
> V1->V2: modify title of this patch
>   drivers/net/wireless/broadcom/b43legacy/phy.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/broadcom/b43legacy/phy.c b/drivers/net/wireless/broadcom/b43legacy/phy.c
> index 05404fb..c1395e6 100644
> --- a/drivers/net/wireless/broadcom/b43legacy/phy.c
> +++ b/drivers/net/wireless/broadcom/b43legacy/phy.c
> @@ -1123,7 +1123,7 @@ void b43legacy_phy_lo_b_measure(struct b43legacy_wldev *dev)
>   	struct b43legacy_phy *phy = &dev->phy;
>   	u16 regstack[12] = { 0 };
>   	u16 mls;
> -	u16 fval;
> +	s16 fval;
>   	int i;
>   	int j;
>   


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

* Re: [PATCH V2] wireless: broadcom: b43legacy: Fix assigning negative value to unsigned variable
  2022-03-24  8:06 [PATCH V2] wireless: broadcom: b43legacy: Fix assigning negative value to unsigned variable Haowen Bai
  2022-03-24 15:58 ` Larry Finger
@ 2022-03-25 10:09 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2022-03-25 10:09 UTC (permalink / raw)
  To: Haowen Bai; +Cc: Larry.Finger, linux-wireless, b43-dev, linux-kernel

Haowen Bai <baihaowen@meizu.com> writes:

> fix warning reported by smatch:
> drivers/net/wireless/broadcom/b43legacy/phy.c:1181 b43legacy_phy_lo_b_measure()
> warn: assigning (-772) to unsigned variable 'fval'
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
> V1->V2: modify title of this patch
>  drivers/net/wireless/broadcom/b43legacy/phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

The prefix should be only "b43legacy:", I can fix that.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

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

end of thread, other threads:[~2022-03-25 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24  8:06 [PATCH V2] wireless: broadcom: b43legacy: Fix assigning negative value to unsigned variable Haowen Bai
2022-03-24 15:58 ` Larry Finger
2022-03-25 10:09 ` 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).