[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1484918453-5849-1-git-send-email-volodymyr.bendiuga@gmail.com>
Date: Fri, 20 Jan 2017 14:20:53 +0100
From: Volodymyr Bendiuga <volodymyr.bendiuga@...il.com>
To: davem@...emloft.net, mst@...hat.com, nikolay@...ulusnetworks.com,
netdev@...r.kernel.org, volodymyr.bendiuga@...termo.se
Cc: Jonas Johansson <jonas.johansson@...termo.se>,
Volodymyr Bendiuga <volodymyr.bendiuga@...il.com>
Subject: [PATCH net-next] uapi: fix signess in ethtool_validate_speed()
From: Jonas Johansson <jonas.johansson@...termo.se>
There is a comparison of speed variable which
is unsigned, and SPEED_UNKNOWN which is signed.
Signed-off-by: Jonas Johansson <jonas.johansson@...termo.se>
Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@...il.com>
---
include/uapi/linux/ethtool.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index f0db778..1ca4a77 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1500,7 +1500,7 @@ enum ethtool_link_mode_bit_indices {
#define SPEED_UNKNOWN -1
-static inline int ethtool_validate_speed(__u32 speed)
+static inline int ethtool_validate_speed(__s32 speed)
{
return speed <= INT_MAX || speed == SPEED_UNKNOWN;
}
--
2.7.4
Powered by blists - more mailing lists