* [PATCH] ath10k: remove redundant -ve check against u32 integer size
@ 2018-01-12 17:27 Colin King
2018-01-16 14:34 ` Kalle Valo
2018-01-16 14:34 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-01-12 17:27 UTC (permalink / raw)
To: Kalle Valo, ath10k, linux-wireless, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable section_table.size is a u32 and so cannot be less than
zero, hence the less than zero check is redundant and can be
removed.
Detected by CoverityScan, CID#1463855 ("Unsigned compared against 0")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index f6a23f2d0335..355db6a0fcf3 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1478,9 +1478,6 @@ static int ath10k_pci_dump_memory_section(struct ath10k *ar,
if (!mem_region || !buf)
return 0;
- if (mem_region->section_table.size < 0)
- return 0;
-
cur_section = &mem_region->section_table.sections[0];
if (mem_region->start > cur_section->start) {
--
2.15.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: ath10k: remove redundant -ve check against u32 integer size
2018-01-12 17:27 [PATCH] ath10k: remove redundant -ve check against u32 integer size Colin King
2018-01-16 14:34 ` Kalle Valo
@ 2018-01-16 14:34 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-01-16 14:34 UTC (permalink / raw)
To: Colin Ian King
Cc: Kalle Valo, ath10k, linux-wireless, netdev, kernel-janitors,
linux-kernel
Colin Ian King <colin.king@canonical.com> wrote:
> Variable section_table.size is a u32 and so cannot be less than
> zero, hence the less than zero check is redundant and can be
> removed.
>
> Detected by CoverityScan, CID#1463855 ("Unsigned compared against 0")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
95f27a51ee02 ath10k: remove redundant -ve check against u32 integer size
--
https://patchwork.kernel.org/patch/10161483/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ath10k: remove redundant -ve check against u32 integer size
2018-01-12 17:27 [PATCH] ath10k: remove redundant -ve check against u32 integer size Colin King
@ 2018-01-16 14:34 ` Kalle Valo
2018-01-16 14:34 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-01-16 14:34 UTC (permalink / raw)
To: Colin Ian King
Cc: linux-wireless, netdev, kernel-janitors, linux-kernel, ath10k,
Kalle Valo
Colin Ian King <colin.king@canonical.com> wrote:
> Variable section_table.size is a u32 and so cannot be less than
> zero, hence the less than zero check is redundant and can be
> removed.
>
> Detected by CoverityScan, CID#1463855 ("Unsigned compared against 0")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
95f27a51ee02 ath10k: remove redundant -ve check against u32 integer size
--
https://patchwork.kernel.org/patch/10161483/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-16 14:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12 17:27 [PATCH] ath10k: remove redundant -ve check against u32 integer size Colin King
2018-01-16 14:34 ` Kalle Valo
2018-01-16 14:34 ` 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).