linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-4.7-rc2/drivers/net/wireless/ath/ath6kl/wmi.c:2547]: (style) Redundant condition
@ 2016-06-07 15:13 David Binderman
  2016-06-07 15:19 ` Valo, Kalle
  0 siblings, 1 reply; 2+ messages in thread
From: David Binderman @ 2016-06-07 15:13 UTC (permalink / raw)
  To: kvalo, linux-wireless, netdev, linux-kernel, dcb314

Hello there,

linux-4.7-rc2/drivers/net/wireless/ath/ath6kl/wmi.c:2547]: (style)
Redundant condition: If 'EXPR <= 7', the comparison 'EXPR < 8' is
always true.

Source code is

    if (!((params->user_pri < 8) &&
          (params->user_pri <= 0x7) &&

This might be a possible cut'n'paste error. Also in the same file

[drivers/net/wireless/ath/ath6kl/wmi.c:1220]: (style) Variable 'rate'
is assigned a value that is never used.
[drivers/net/wireless/ath/ath6kl/wmi.c:1484]: (style) Variable
'new_threshold' is assigned a value that is never used.
[drivers/net/wireless/ath/ath6kl/wmi.c:3521]: (style) Variable 'ret'
is assigned a value that is never used.

Regards

David Binderman

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

* Re: linux-4.7-rc2/drivers/net/wireless/ath/ath6kl/wmi.c:2547]: (style) Redundant condition
  2016-06-07 15:13 linux-4.7-rc2/drivers/net/wireless/ath/ath6kl/wmi.c:2547]: (style) Redundant condition David Binderman
@ 2016-06-07 15:19 ` Valo, Kalle
  0 siblings, 0 replies; 2+ messages in thread
From: Valo, Kalle @ 2016-06-07 15:19 UTC (permalink / raw)
  To: David Binderman; +Cc: linux-wireless, netdev, linux-kernel, dcb314, ath6kl

David Binderman <linuxdev.baldrick@gmail.com> writes:

> Hello there,
>
> linux-4.7-rc2/drivers/net/wireless/ath/ath6kl/wmi.c:2547]: (style)
> Redundant condition: If 'EXPR <= 7', the comparison 'EXPR < 8' is
> always true.
>
> Source code is
>
>     if (!((params->user_pri < 8) &&
>           (params->user_pri <= 0x7) &&
>
> This might be a possible cut'n'paste error.

This should be recently fixed:

https://git.kernel.org/cgit/linux/kernel/git/kvalo/ath.git/commit/?h=ath-next&id=93b4a09f0f3068e3190548393f39262e5295960e

> Also in the same file
>
> [drivers/net/wireless/ath/ath6kl/wmi.c:1220]: (style) Variable 'rate'
> is assigned a value that is never used.
> [drivers/net/wireless/ath/ath6kl/wmi.c:1484]: (style) Variable
> 'new_threshold' is assigned a value that is never used.
> [drivers/net/wireless/ath/ath6kl/wmi.c:3521]: (style) Variable 'ret'
> is assigned a value that is never used.

I guess these are still valid.

-- 
Kalle Valo

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

end of thread, other threads:[~2016-06-07 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07 15:13 linux-4.7-rc2/drivers/net/wireless/ath/ath6kl/wmi.c:2547]: (style) Redundant condition David Binderman
2016-06-07 15:19 ` Valo, Kalle

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).