linux/drivers/net/ethernet/3com
Arnd Bergmann fb6fafbc7d 3c515: fix integer overflow warning
clang points out a harmless signed integer overflow:

drivers/net/ethernet/3com/3c515.c:1530:66: error: implicit conversion from 'int' to 'short' changes value from 32783 to -32753 [-Werror,-Wconstant-conversion]
                new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm;
                         ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
drivers/net/ethernet/3com/3c515.c:1532:52: error: implicit conversion from 'int' to 'short' changes value from 32775 to -32761 [-Werror,-Wconstant-conversion]
                new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast;
                         ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
drivers/net/ethernet/3com/3c515.c:1534:38: error: implicit conversion from 'int' to 'short' changes value from 32773 to -32763 [-Werror,-Wconstant-conversion]
                new_mode = SetRxFilter | RxStation | RxBroadcast;
                         ~ ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~

Make the variable unsigned to avoid the overflow.

Fixes: Linux-2.1.128pre1
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-19 15:07:49 -07:00
..
3c59x.c net: 3com: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:15 -05:00
3c509.c net: 3c509: mark expected switch fall-throughs 2019-01-23 09:06:36 -08:00
3c515.c 3c515: fix integer overflow warning 2019-03-19 15:07:49 -07:00
3c574_cs.c net: 3com: 3c574_cs: mark expected switch fall-through 2017-11-11 19:10:06 +09:00
3c589_cs.c drivers/net/3com: Convert timers to use timer_setup() 2017-10-18 12:39:38 +01:00
Kconfig net: documentation: build a directory structure for drivers 2018-12-05 11:30:06 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
typhoon.c net: typhoon: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
typhoon.h