Search Linux Wireless

Re: [PATCH] NFC: pn533: don't send USB data off of the stack

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

 



Hi Greg,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17-rc5 next-20180517]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Greg-KH/NFC-pn533-don-t-send-USB-data-off-of-the-stack/20180518-100416
config: i386-randconfig-x013-201819 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/nfc/pn533/usb.c: In function 'pn533_usb_send_ack':
>> drivers/nfc/pn533/usb.c:163:15: error: invalid operands to binary | (have 'struct urb *' and 'int')
     phy->out_urb |= URB_FREE_BUFFER;
                  ^~
   drivers/nfc/pn533/usb.c: In function 'pn533_usb_send_frame':
   drivers/nfc/pn533/usb.c:180:15: error: invalid operands to binary & (have 'struct urb *' and 'int')
     phy->out_urb &= ~URB_FREE_BUFFER;
                  ^~
   drivers/nfc/pn533/usb.c: In function 'pn533_acr122_poweron_rdr':
   drivers/nfc/pn533/usb.c:406:15: error: invalid operands to binary | (have 'struct urb *' and 'int')
     phy->out_urb |= URB_FREE_BUFFER;
                  ^~

vim +163 drivers/nfc/pn533/usb.c

   147	
   148	static int pn533_usb_send_ack(struct pn533 *dev, gfp_t flags)
   149	{
   150		struct pn533_usb_phy *phy = dev->phy;
   151		static const u8 ack[6] = {0x00, 0x00, 0xff, 0x00, 0xff, 0x00};
   152		/* spec 7.1.1.3:  Preamble, SoPC (2), ACK Code (2), Postamble */
   153		char *buffer;
   154		int rc;
   155	
   156		buffer = kmalloc(sizeof(ack), GFP_KERNEL);
   157		if (!buffer)
   158			return -ENOMEM;
   159		memcpy(buffer, ack, sizeof(ack));
   160	
   161		phy->out_urb->transfer_buffer = (u8 *)ack;
   162		phy->out_urb->transfer_buffer_length = sizeof(ack);
 > 163		phy->out_urb |= URB_FREE_BUFFER;
   164		rc = usb_submit_urb(phy->out_urb, flags);
   165	
   166		return rc;
   167	}
   168	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[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