netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: debug: Remove redundant check
@ 2017-10-14  9:46 Christos Gkekas
       [not found] ` <1507974371-7419-1-git-send-email-chris.gekas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Christos Gkekas @ 2017-10-14  9:46 UTC (permalink / raw)
  To: QCA ath9k Development, Kalle Valo, linux-wireless, netdev,
	linux-kernel
  Cc: Christos Gkekas

Variable val is unsigned, so checking whether it is less than zero is
redundant.

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
---
 drivers/net/wireless/ath/ath9k/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 01fa301..4f5f141 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1167,7 +1167,7 @@ static ssize_t write_file_tpc(struct file *file, const char __user *user_buf,
 	if (kstrtoul(buf, 0, &val))
 		return -EINVAL;
 
-	if (val < 0 || val > 1)
+	if (val > 1)
 		return -EINVAL;
 
 	tpc_enabled = !!val;
-- 
2.7.4

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

* Re: ath9k: debug: Remove redundant check
       [not found] ` <1507974371-7419-1-git-send-email-chris.gekas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-10-27 13:50   ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-10-27 13:50 UTC (permalink / raw)
  To: Christos Gkekas
  Cc: QCA ath9k Development, Kalle Valo,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Christos Gkekas

Christos Gkekas <chris.gekas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Variable val is unsigned, so checking whether it is less than zero is
> redundant.
> 
> Signed-off-by: Christos Gkekas <chris.gekas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Kalle Valo <kvalo-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org>

Patch applied to ath-next branch of ath.git, thanks.

9d414949a306 ath9k: debug: Remove redundant check

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

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

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

end of thread, other threads:[~2017-10-27 13:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-14  9:46 [PATCH] ath9k: debug: Remove redundant check Christos Gkekas
     [not found] ` <1507974371-7419-1-git-send-email-chris.gekas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-27 13:50   ` 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).