Message ID | 1488462330-12349-2-git-send-email-climbbb.kim@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
2017-03-02 23:10 GMT+09:00 Benjamin Tissoires <benjamin.tissoires@redhat.com>: > On Mar 02 2017 or thereabouts, Jaejoong Kim wrote: >> We need to store the minor number each drivers. In case of hidraw, it's >> minor number stores in struct hidraw. But hiddev's minor is located in >> struct hid_device. >> >> So reallocates for hiddev's minor number. >> > > There is not a real need to have this one in a separate patch. Also, it > depends on the patch "[PATCH] HID: cp2112: use proper hidraw name with > minor number", so better include this cp2112 in this series (as I > mentioned in the cp2112 patch). > > I'd say simply squash this patch with 2/2 and have the cp2112 as 1/2. Ok. I will resend v2 patchset. Thanks. jaejoong > > Cheers, > Benjamin > >> Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> >> --- >> drivers/hid/usbhid/hiddev.c | 1 + >> include/linux/hid.h | 1 - >> 2 files changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c >> index 700145b..5c2c489 100644 >> --- a/drivers/hid/usbhid/hiddev.c >> +++ b/drivers/hid/usbhid/hiddev.c >> @@ -47,6 +47,7 @@ >> #define HIDDEV_BUFFER_SIZE 2048 >> >> struct hiddev { >> + int minor; >> int exist; >> int open; >> struct mutex existancelock; >> diff --git a/include/linux/hid.h b/include/linux/hid.h >> index 28f38e2b8..643c017 100644 >> --- a/include/linux/hid.h >> +++ b/include/linux/hid.h >> @@ -541,7 +541,6 @@ struct hid_device { /* device report descriptor */ >> struct list_head inputs; /* The list of inputs */ >> void *hiddev; /* The hiddev structure */ >> void *hidraw; >> - int minor; /* Hiddev minor number */ >> >> int open; /* is the device open by anyone? */ >> char name[128]; /* Device name */ >> -- >> 2.7.4 >> -- 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
Hi Jaejoong, [auto build test ERROR on hid/for-next] [also build test ERROR on v4.10 next-20170303] [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/Jaejoong-Kim/HID-hiddev-move-hiddev-s-minor-number-and-refactoring/20170303-222428 base: https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-next config: x86_64-randconfig-x016-201709 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/hid/hid-core.c: In function 'hid_connect': >> drivers/hid/hid-core.c:1698:9: error: 'struct hid_device' has no member named 'minor'; did you mean 'vendor'? hdev->minor); ^~ -- drivers/hid/hid-cp2112.c: In function 'cp2112_probe': >> drivers/hid/hid-cp2112.c:1300:43: error: 'struct hid_device' has no member named 'minor'; did you mean 'vendor'? "CP2112 SMBus Bridge on hiddev%d", hdev->minor); ^~ vim +1698 drivers/hid/hid-core.c 93c10132 Jiri Slaby 2008-06-27 1692 93c10132 Jiri Slaby 2008-06-27 1693 len = 0; 93c10132 Jiri Slaby 2008-06-27 1694 if (hdev->claimed & HID_CLAIMED_INPUT) 93c10132 Jiri Slaby 2008-06-27 1695 len += sprintf(buf + len, "input"); 93c10132 Jiri Slaby 2008-06-27 1696 if (hdev->claimed & HID_CLAIMED_HIDDEV) 93c10132 Jiri Slaby 2008-06-27 1697 len += sprintf(buf + len, "%shiddev%d", len ? "," : "", 93c10132 Jiri Slaby 2008-06-27 @1698 hdev->minor); 93c10132 Jiri Slaby 2008-06-27 1699 if (hdev->claimed & HID_CLAIMED_HIDRAW) 93c10132 Jiri Slaby 2008-06-27 1700 len += sprintf(buf + len, "%shidraw%d", len ? "," : "", 93c10132 Jiri Slaby 2008-06-27 1701 ((struct hidraw *)hdev->hidraw)->minor); :::::: The code at line 1698 was first introduced by commit :::::: 93c10132a7ac160df3175b53f7ee857625412165 HID: move connect quirks :::::: TO: Jiri Slaby <jirislaby@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
Hi Jaejoong,
[auto build test ERROR on hid/for-next]
[also build test ERROR on v4.10 next-20170303]
[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/Jaejoong-Kim/HID-hiddev-move-hiddev-s-minor-number-and-refactoring/20170303-222428
base: https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-next
config: i386-randconfig-b0-03032110 (attached as .config)
compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
drivers/hid/hid-cp2112.c: In function 'cp2112_probe':
>> drivers/hid/hid-cp2112.c:1300:43: error: 'struct hid_device' has no member named 'minor'
"CP2112 SMBus Bridge on hiddev%d", hdev->minor);
^
vim +1300 drivers/hid/hid-cp2112.c
e932d817 David Barksdale 2014-02-04 1294 dev->adap.owner = THIS_MODULE;
e932d817 David Barksdale 2014-02-04 1295 dev->adap.class = I2C_CLASS_HWMON;
e932d817 David Barksdale 2014-02-04 1296 dev->adap.algo = &smbus_algorithm;
e932d817 David Barksdale 2014-02-04 1297 dev->adap.algo_data = dev;
e932d817 David Barksdale 2014-02-04 1298 dev->adap.dev.parent = &hdev->dev;
e932d817 David Barksdale 2014-02-04 1299 snprintf(dev->adap.name, sizeof(dev->adap.name),
e932d817 David Barksdale 2014-02-04 @1300 "CP2112 SMBus Bridge on hiddev%d", hdev->minor);
44eda784 Ellen Wang 2015-07-09 1301 dev->hwversion = buf[2];
e932d817 David Barksdale 2014-02-04 1302 init_waitqueue_head(&dev->wait);
e932d817 David Barksdale 2014-02-04 1303
:::::: The code at line 1300 was first introduced by commit
:::::: e932d817866770d456815c9a84b7ed94f0589d80 HID: add hid-cp2112 driver
:::::: TO: David Barksdale <dbarksdale@uplogix.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
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 700145b..5c2c489 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c @@ -47,6 +47,7 @@ #define HIDDEV_BUFFER_SIZE 2048 struct hiddev { + int minor; int exist; int open; struct mutex existancelock; diff --git a/include/linux/hid.h b/include/linux/hid.h index 28f38e2b8..643c017 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -541,7 +541,6 @@ struct hid_device { /* device report descriptor */ struct list_head inputs; /* The list of inputs */ void *hiddev; /* The hiddev structure */ void *hidraw; - int minor; /* Hiddev minor number */ int open; /* is the device open by anyone? */ char name[128]; /* Device name */
We need to store the minor number each drivers. In case of hidraw, it's minor number stores in struct hidraw. But hiddev's minor is located in struct hid_device. So reallocates for hiddev's minor number. Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> --- drivers/hid/usbhid/hiddev.c | 1 + include/linux/hid.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)