linux/drivers/net/wireless/rsi
Arnd Bergmann a39644b235 rsi: fix integer overflow warning
gcc produces a harmless warning about a recently introduced
signed integer overflow:

drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_prepare_mgmt_desc':
include/uapi/linux/swab.h:13:15: error: integer overflow in expression [-Werror=overflow]
  (((__u16)(x) & (__u16)0x00ffU) << 8) |   \
   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:104:2: note: in expansion of macro '___constant_swab16'
  ___constant_swab16(x) :   \
  ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab16'
 #define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
                                           ^~~~~~~~
include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le16'
 #define cpu_to_le16 __cpu_to_le16
                     ^~~~~~~~~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:136:3: note: in expansion of macro 'cpu_to_le16'
   cpu_to_le16((tx_params->vap_id << RSI_DESC_VAP_ID_OFST) &
   ^~~~~~~~~~~

The problem is that the 'mask' value is a signed integer that gets
turned into a negative number when truncated to 16 bits. Making it
an unsigned constant avoids this.

Fixes: eac4eed322 ("rsi: tx and rx path enhancements for p2p mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-10-13 13:00:42 +03:00
..
Kconfig rsi: add vendor Kconfig entry 2015-11-18 14:28:31 +02:00
Makefile rsi: add support for legacy power save 2017-08-08 14:46:01 +03:00
rsi_91x_core.c rsi: tx and rx path enhancements for p2p mode 2017-09-20 15:38:56 +03:00
rsi_91x_debugfs.c rsi: add version information 2017-09-25 11:25:23 +03:00
rsi_91x_hal.c rsi: add version information 2017-09-25 11:25:23 +03:00
rsi_91x_mac80211.c rsi: miscellaneous changes for p2p mode 2017-09-20 15:38:58 +03:00
rsi_91x_main.c rsi: add version information 2017-09-25 11:25:23 +03:00
rsi_91x_mgmt.c rsi: miscellaneous changes for p2p mode 2017-09-20 15:38:58 +03:00
rsi_91x_ps.c rsi: disallow power save config when AP vap running 2017-09-20 15:38:57 +03:00
rsi_91x_sdio_ops.c rsi: buffer available interrupt handling 2017-08-08 14:46:03 +03:00
rsi_91x_sdio.c rsi: sdio suspend and resume support 2017-09-25 11:26:30 +03:00
rsi_91x_usb_ops.c rsi: use separate mutex lock for receive thread 2017-07-28 17:22:43 +03:00
rsi_91x_usb.c rsi: fix a dereference on adapter before it has been null checked 2017-09-20 15:40:16 +03:00
rsi_boot_params.h rsi: configure new boot parameters to device 2017-06-21 18:26:26 +03:00
rsi_common.h rsi: add support for p2p listen 2017-09-20 15:38:55 +03:00
rsi_debugfs.h
rsi_hal.h rsi: add version information 2017-09-25 11:25:23 +03:00
rsi_main.h rsi: add version information 2017-09-25 11:25:23 +03:00
rsi_mgmt.h rsi: fix integer overflow warning 2017-10-13 13:00:42 +03:00
rsi_ps.h rsi: disallow power save config when AP vap running 2017-09-20 15:38:57 +03:00
rsi_sdio.h rsi: sdio suspend and resume support 2017-09-25 11:26:30 +03:00
rsi_usb.h rsi: use macro for allocating USB buffer 2017-07-28 17:27:18 +03:00