Search Linux Wireless

Re: [wireless-drivers-next:master 28/45] drivers/net/wireless/rsi/rsi_91x_usb.c:229:27: sparse: restricted __le32 degrades to integer

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

 



+ linux-wireless

Siva Rebbagondla <siva8118@xxxxxxxxx> writes:

> Hi Kalle,
>
> On Fri, Apr 26, 2019 at 1:06 AM kbuild test robot <lkp@xxxxxxxxx> wrote:
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
>> head:   147b502bda338f4f2dff19faaa5829b691305ea5
>> commit: 0a60014b76f512f18e48cfb4efc71e07c6791996 [28/45] rsi: miscallaneous changes for 9116 and common
>> reproduce:
>>         # apt-get install sparse
>>         git checkout 0a60014b76f512f18e48cfb4efc71e07c6791996
>>         make ARCH=x86_64 allmodconfig
>>         make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
>>
>>
>> sparse warnings: (new ones prefixed by >>)
>>
>> >> drivers/net/wireless/rsi/rsi_91x_usb.c:229:27: sparse: restricted __le32 degrades to integer
>>    drivers/net/wireless/rsi/rsi_91x_usb.c:230:27: sparse: restricted __le32 degrades to integer
>>    drivers/net/wireless/rsi/rsi_91x_usb.c:231:27: sparse: restricted __le32 degrades to integer
>>    drivers/net/wireless/rsi/rsi_91x_usb.c:232:27: sparse: restricted __le32 degrades to integer
>>    drivers/net/wireless/rsi/rsi_91x_usb.c:238:36: sparse: restricted __le32 degrades to integer
>>    drivers/net/wireless/rsi/rsi_91x_usb.c:239:35: sparse: restricted __le32 degrades to integer
>>    drivers/net/wireless/rsi/rsi_91x_usb.c:354:28: sparse: expression using sizeof(void)
>>    drivers/net/wireless/rsi/rsi_91x_usb.c:401:28: sparse: expression using sizeof(void)
>>
>> vim +229 drivers/net/wireless/rsi/rsi_91x_usb.c
>>
>>    203
>>    204  /**
>>    205   * rsi_usb_reg_write() - This function writes the given data into the given
>>    206   *                       register address.
>>    207   * @usbdev: Pointer to the usb_device structure.
>>    208   * @reg: Address of the register.
>>    209   * @value: Value to write.
>>    210   * @len: Length of data to be written.
>>    211   *
>>    212   * Return: status: 0 on success, a negative error code on failure.
>>    213   */
>>    214  static int rsi_usb_reg_write(struct usb_device *usbdev,
>>    215                               u32 reg,
>>    216                               u32 value,
>>    217                               u16 len)
>>    218  {
>>    219          u8 *usb_reg_buf;
>>    220          int status = -ENOMEM;
>>    221
>>    222          if (len > RSI_USB_CTRL_BUF_SIZE)
>>    223                  return -EINVAL;
>>    224
>>    225          usb_reg_buf  = kmalloc(RSI_USB_CTRL_BUF_SIZE, GFP_KERNEL);
>>    226          if (!usb_reg_buf)
>>    227                  return status;
>>    228
>>  > 229          usb_reg_buf[0] = (cpu_to_le32(value) & 0x00ff);
>>    230          usb_reg_buf[1] = (cpu_to_le32(value) & 0xff00) >> 8;
>>    231          usb_reg_buf[2] = (cpu_to_le32(value) & 0x00ff0000) >> 16;
>>    232          usb_reg_buf[3] = (cpu_to_le32(value) & 0xff000000) >> 24;
>>    233
>>    234          status = usb_control_msg(usbdev,
>>    235                                   usb_sndctrlpipe(usbdev, 0),
>>    236                                   USB_VENDOR_REGISTER_WRITE,
>>    237                                   RSI_USB_REQ_OUT,
>>    238                                   ((cpu_to_le32(reg) & 0xffff0000) >> 16),
>>    239                                   (cpu_to_le32(reg) & 0xffff),
>>    240                                   (void *)usb_reg_buf,
>>    241                                   len,
>>    242                                   USB_CTRL_SET_TIMEOUT);
>>    243          if (status < 0) {
>>    244                  rsi_dbg(ERR_ZONE,
>>    245                          "%s: Reg write failed with error code :%d\n",
>>    246                          __func__, status);
>>    247          }
>>    248          kfree(usb_reg_buf);
>>    249
>>    250          return status;
>>    251  }
>>    252
>>
>> ---
>> 0-DAY kernel test infrastructure                Open Source Technology Center
>> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
>
> Some where went wrong. I fixed this one. I will resend you the patches
> with changes.

Your patches are now applied and cannot be changed, so no point of
resending them anymore. You need to send followup patches which fix the
issues and apply to wireless-drivers-next.

And remember to use Fixes tag so that we know which commit patch fixes.

-- 
Kalle Valo



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux