Message ID | 1473461449-8060-4-git-send-email-simon@mungewell.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Simon, [auto build test WARNING on hid/for-next] [also build test WARNING on v4.8-rc5 next-20160909] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] [Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information] url: https://github.com/0day-ci/linux/commits/Simon-Wood/HID-hid-logitech-Introduce-dev_attr-for-combined-pedals-feature/20160910-065505 base: https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-next config: sh-titan_defconfig (attached as .config) compiler: sh4-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sh All warnings (new ones prefixed by >>): drivers/hid/hid-lg.c: In function 'lg_report_fixup': >> drivers/hid/hid-lg.c:347:28: warning: unused variable 'rev_min' [-Wunused-variable] __u16 bcdDevice, rev_maj, rev_min; ^ >> drivers/hid/hid-lg.c:347:19: warning: unused variable 'rev_maj' [-Wunused-variable] __u16 bcdDevice, rev_maj, rev_min; ^ >> drivers/hid/hid-lg.c:347:8: warning: unused variable 'bcdDevice' [-Wunused-variable] __u16 bcdDevice, rev_maj, rev_min; ^ >> drivers/hid/hid-lg.c:346:32: warning: unused variable 'udesc' [-Wunused-variable] struct usb_device_descriptor *udesc; ^ vim +/rev_min +347 drivers/hid/hid-lg.c 5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 340 * the original value of 0x28c of logical maximum to 0x104d 5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 341 */ 73e4008d drivers/hid/hid-lg.c Nikolai Kondrashov 2010-08-06 342 static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, 73e4008d drivers/hid/hid-lg.c Nikolai Kondrashov 2010-08-06 343 unsigned int *rsize) 5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 344 { 25751553 drivers/hid/hid-lg.c Axel Lin 2012-09-13 345 struct lg_drv_data *drv_data = hid_get_drvdata(hdev); 54bfe3f0 drivers/hid/hid-lg.c Paul Sbarra 2013-02-17 @346 struct usb_device_descriptor *udesc; 54bfe3f0 drivers/hid/hid-lg.c Paul Sbarra 2013-02-17 @347 __u16 bcdDevice, rev_maj, rev_min; 5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 348 4ab25786 drivers/hid/hid-lg.c Jiri Kosina 2014-08-21 349 if ((drv_data->quirks & LG_RDESC) && *rsize >= 91 && rdesc[83] == 0x26 && 5f22a799 drivers/hid/hid-logitech.c Jiri Slaby 2008-05-16 350 rdesc[84] == 0x8c && rdesc[85] == 0x02) { :::::: The code at line 347 was first introduced by commit :::::: 54bfe3f0dab2b2f0ac629690f187537d95adeb4f HID: logitech: add report descriptor for Driving Force wheel :::::: TO: Paul Sbarra <sbarra.paul@gmail.com> :::::: CC: Jiri Kosina <jkosina@suse.cz> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
On Fri, September 9, 2016 7:34 pm, kbuild test robot wrote: > All warnings (new ones prefixed by >>): > > > drivers/hid/hid-lg.c: In function 'lg_report_fixup': > >>> drivers/hid/hid-lg.c:347:28: warning: unused variable 'rev_min' >>> [-Wunused-variable] >>> > __u16 bcdDevice, rev_maj, rev_min; > ^ > >>> drivers/hid/hid-lg.c:347:19: warning: unused variable 'rev_maj' >>> [-Wunused-variable] >>> > __u16 bcdDevice, rev_maj, rev_min; > ^ > >>> drivers/hid/hid-lg.c:347:8: warning: unused variable 'bcdDevice' >>> [-Wunused-variable] >>> > __u16 bcdDevice, rev_maj, rev_min; > ^ > >>> drivers/hid/hid-lg.c:346:32: warning: unused variable 'udesc' >>> [-Wunused-variable] >>> > struct usb_device_descriptor *udesc; ^ Hi all, No other comments from the rest of the patch set (so far), so I'll send a V2 patch set to cover these towards the end of the week. Also have better support for the "Wingman Forumula Force GT" to include, as I picked one up cheap on Kijiji. Simon. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c index 06f8a5e..53429c6 100644 --- a/drivers/hid/hid-lg.c +++ b/drivers/hid/hid-lg.c @@ -365,18 +365,7 @@ static __u8 *lg_report_fixup(struct hid_device *hdev, __u8 *rdesc, /* Several wheels report as this id when operating in emulation mode. */ case USB_DEVICE_ID_LOGITECH_WHEEL: - udesc = &(hid_to_usb_dev(hdev)->descriptor); - if (!udesc) { - hid_err(hdev, "NULL USB device descriptor\n"); - break; - } - bcdDevice = le16_to_cpu(udesc->bcdDevice); - rev_maj = bcdDevice >> 8; - rev_min = bcdDevice & 0xff; - - /* Update the report descriptor for only the Driving Force wheel */ - if (rev_maj == 1 && rev_min == 2 && - *rsize == DF_RDESC_ORIG_SIZE) { + if (*rsize == DF_RDESC_ORIG_SIZE) { hid_info(hdev, "fixing up Logitech Driving Force report descriptor\n"); rdesc = df_rdesc_fixed;
Rewrite the HID descriptor for _all_ Driving Force wheels (real or emulated) so that they can report separate Accelerator and Brake axis. If the user wants a combined accel/brake axis, they can use the 'combined pedals' feature. $ echo 1 > /sys/bus/hid/devices/<device-id>/combine_pedals Signed-off-by: Simon Wood <simon@mungewell.org> --- drivers/hid/hid-lg.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)