]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/core/net-sysfs.c
net: make struct net_device::tx_queue_len unsigned int
[karo-tx-linux.git] / net / core / net-sysfs.c
index 65ea0ff4017c166fea648f3ef3db57966f44aa66..58e6cc70500d7c68245a6bf7c3c345b59c57bbad 100644 (file)
@@ -323,7 +323,11 @@ NETDEVICE_SHOW_RW(flags, fmt_hex);
 
 static int change_tx_queue_len(struct net_device *dev, unsigned long new_len)
 {
-       int res, orig_len = dev->tx_queue_len;
+       unsigned int orig_len = dev->tx_queue_len;
+       int res;
+
+       if (new_len != (unsigned int)new_len)
+               return -ERANGE;
 
        if (new_len != orig_len) {
                dev->tx_queue_len = new_len;
@@ -349,7 +353,7 @@ static ssize_t tx_queue_len_store(struct device *dev,
 
        return netdev_store(dev, attr, buf, len, change_tx_queue_len);
 }
-NETDEVICE_SHOW_RW(tx_queue_len, fmt_ulong);
+NETDEVICE_SHOW_RW(tx_queue_len, fmt_dec);
 
 static int change_gro_flush_timeout(struct net_device *dev, unsigned long val)
 {