Skip to contentSkip to conversation

HID: huion: Switch to generating report descriptor

DISCUSSION Dan Carpenter 2 participants 2 messages Jul 31, 2014 – Aug 11, 2014 HID

lore
Share & tools
lore
#0 lore raw

Hello Nikolai Kondrashov,

The patch f8dd5cb2c6d0: "HID: huion: Switch to generating report descriptor" from Jul 23, 2014, leads to the following static checker warning:

drivers/hid/hid-huion.c:126 huion_tablet_enable()
error: doing dma on the stack (buf)

drivers/hid/hid-huion.c
113 static int huion_tablet_enable(struct hid_device *hdev) 114 {

   115          int rc;
   116          struct usb_device *usb_dev = hid_to_usb_dev(hdev);
   117          struct huion_drvdata *drvdata = hid_get_drvdata(hdev);
   118          __le16 buf[6];
   119  
   120          /*
   121           * Read string descriptor containing tablet parameters. The specific
   122           * string descriptor and data were discovered by sniffing the Windows
   123           * driver traffic.
   124           * NOTE: This enables fully-functional tablet mode.
   125           */
   126          rc = usb_control_msg(usb_dev, usb_rcvctrlpipe(usb_dev, 0),
   127                                  USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
   128                                  (USB_DT_STRING << 8) + 0x64,
   129                                  0x0409, buf, sizeof(buf),
                                                ^^^

130 USB_CTRL_GET_TIMEOUT);

regards,
dan carpenter

#1 lore raw

Hi Dan,

Quoted 6 lines · Dan Carpenter

The patch f8dd5cb2c6d0: "HID: huion: Switch to generating report descriptor" from Jul 23, 2014, leads to the following static checker warning:

drivers/hid/hid-huion.c:126 huion_tablet_enable()
error: doing dma on the stack (buf)

Thanks a lot for notifying about the problem.
I just submitted two patches fixing this under subject "HID: huion: Fix "doing dma on the stack"".

Sincerely,
Nick