Re: [linux-next:master 788/6276] drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5198:24: sparse: sparse: invalid assignment: |=

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2023-01-19 at 16:20 +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   aa5c49149a823599764e6953229b028e4bf6e9cc
> commit: 3dfb8e844fa30cceb4b810613e2c35f628eb3e70 [788/6276] wifi: rtl8xxxu: Support new chip
> RTL8188EU
> config: openrisc-randconfig-s043-20230119 (
> https://download.01.org/0day-ci/archive/20230119/202301191616.R33Dvxk4-lkp@xxxxxxxxx/config)
> compiler: or1k-linux-gcc (GCC) 12.1.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
> ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # apt-get install sparse
>         # sparse version: v0.6.4-39-gce1a6720-dirty
>         # 
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3dfb8e844fa30cceb4b810613e2c35f628eb3e70
>         git remote add linux-next 
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout 3dfb8e844fa30cceb4b810613e2c35f628eb3e70
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-
> prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-
> prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc SHELL=/bin/bash
> drivers/net/wireless/realtek/rtl8xxxu/
> 
> If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> 
> sparse warnings: (new ones prefixed by >>)
> > > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5198:24: sparse: sparse: invalid
> > > assignment: |=
> > > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5198:24: sparse:    left side has type
> > > restricted __le16
> > > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5198:24: sparse:    right side has type
> > > restricted __le32
> 
> 

[...]

>   5184		/*
>   5185		 * rts_rate is zero if RTS/CTS or CTS to SELF are not enabled
>   5186		 */
>   5187		tx_desc->txdw4 |= cpu_to_le32(rts_rate << TXDESC32_RTS_RATE_SHIFT);
>   5188		if (ampdu_enable || (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS)) {
>   5189			tx_desc->txdw4 |= cpu_to_le32(TXDESC32_RTS_CTS_ENABLE);
>   5190			tx_desc->txdw4 |= cpu_to_le32(TXDESC32_HW_RTS_ENABLE);
>   5191		} else if (rate_flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
>   5192			tx_desc->txdw4 |= cpu_to_le32(TXDESC32_CTS_SELF_ENABLE);
>   5193			tx_desc->txdw4 |= cpu_to_le32(TXDESC32_HW_RTS_ENABLE);
>   5194		}
>   5195	
>   5196		tx_desc->txdw2 |= cpu_to_le32(TXDESC_ANTENNA_SELECT_A |
>   5197					      TXDESC_ANTENNA_SELECT_B);
> > 5198		tx_desc->txdw7 |= cpu_to_le32(TXDESC_ANTENNA_SELECT_C);

I send a patch to fix this [1], but I don't have a card on hand, so only compile test.
Therefore, real test is welcome.

[1] https://lore.kernel.org/linux-wireless/20230119113146.9640-1-pkshih@xxxxxxxxxxx/T/#u

Ping-Ke






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux