Failure to compile on kernel 4.17.3
The driver fails to compile on kernel 4.17.3 in Arch. The issue appears to be in the hid_report_raw_event in hid-core.c
Output from make (86 Lines)
make[2]: Entering directory '/usr/lib/modules/4.17.3-1-vfio/build'
CC [M] /home/cgalves/git/LogitechFFDrivers/hid/hid-core.o
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:1492:5: error: conflicting types for ‘hid_report_raw_event’
int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
^~~~~~~~~~~~~~~~~~~~
In file included from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:35:
./include/linux/hid.h:1115:5: note: previous declaration of ‘hid_report_raw_event’ was here
int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
^~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/linkage.h:7,
from ./include/linux/kernel.h:7,
from ./include/linux/list.h:9,
from ./include/linux/module.h:9,
from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:19:
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:1544:19: error: conflicting types for ‘hid_report_raw_event’
EXPORT_SYMBOL_GPL(hid_report_raw_event);
^~~~~~~~~~~~~~~~~~~~
./include/linux/export.h:65:21: note: in definition of macro ‘___EXPORT_SYMBOL’
extern typeof(sym) sym; \
^~~
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:1544:1: note: in expansion of macro ‘EXPORT_SYMBOL_GPL’
EXPORT_SYMBOL_GPL(hid_report_raw_event);
^~~~~~~~~~~~~~~~~
In file included from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:35:
./include/linux/hid.h:1115:5: note: previous declaration of ‘hid_report_raw_event’ was here
int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
^~~~~~~~~~~~~~~~~~~~
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:1557:5: error: conflicting types for ‘hid_input_report’
int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int interrupt)
^~~~~~~~~~~~~~~~
In file included from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:35:
./include/linux/hid.h:858:5: note: previous declaration of ‘hid_input_report’ was here
int hid_input_report(struct hid_device *, int type, u8 *, u32, int);
^~~~~~~~~~~~~~~~
In file included from ./include/linux/linkage.h:7,
from ./include/linux/kernel.h:7,
from ./include/linux/list.h:9,
from ./include/linux/module.h:9,
from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:19:
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:1606:19: error: conflicting types for ‘hid_input_report’
EXPORT_SYMBOL_GPL(hid_input_report);
^~~~~~~~~~~~~~~~
./include/linux/export.h:65:21: note: in definition of macro ‘___EXPORT_SYMBOL’
extern typeof(sym) sym; \
^~~
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:1606:1: note: in expansion of macro ‘EXPORT_SYMBOL_GPL’
EXPORT_SYMBOL_GPL(hid_input_report);
^~~~~~~~~~~~~~~~~
In file included from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:35:
./include/linux/hid.h:858:5: note: previous declaration of ‘hid_input_report’ was here
int hid_input_report(struct hid_device *, int type, u8 *, u32, int);
^~~~~~~~~~~~~~~~
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:1608:13: error: conflicting types for ‘hid_match_one_id’
static bool hid_match_one_id(struct hid_device *hdev,
^~~~~~~~~~~~~~~~
In file included from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:35:
./include/linux/hid.h:877:6: note: previous declaration of ‘hid_match_one_id’ was here
bool hid_match_one_id(const struct hid_device *hdev,
^~~~~~~~~~~~~~~~
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:1617:29: error: conflicting types for ‘hid_match_id’
const struct hid_device_id *hid_match_id(struct hid_device *hdev,
^~~~~~~~~~~~
In file included from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:35:
./include/linux/hid.h:879:29: note: previous declaration of ‘hid_match_id’ was here
const struct hid_device_id *hid_match_id(const struct hid_device *hdev,
^~~~~~~~~~~~
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:2200:36: error: static declaration of ‘hid_match_device’ follows non-static declaration
static const struct hid_device_id *hid_match_device(struct hid_device *hdev,
^~~~~~~~~~~~~~~~
In file included from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:35:
./include/linux/hid.h:881:29: note: previous declaration of ‘hid_match_device’ was here
const struct hid_device_id *hid_match_device(struct hid_device *hdev,
^~~~~~~~~~~~~~~~
/home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:2363:24: error: static declaration of ‘hid_bus_type’ follows non-static declaration
static struct bus_type hid_bus_type = {
^~~~~~~~~~~~
In file included from /home/cgalves/git/LogitechFFDrivers/hid/hid-core.c:35:
./include/linux/hid.h:829:24: note: previous declaration of ‘hid_bus_type’ was here
extern struct bus_type hid_bus_type;
^~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:313: /home/cgalves/git/LogitechFFDrivers/hid/hid-core.o] Error 1
make[2]: *** [Makefile:1572: _module_/home/cgalves/git/LogitechFFDrivers/hid] Error 2
make[2]: Leaving directory '/usr/lib/modules/4.17.3-1-vfio/build'
make[1]: *** [Makefile:13: default] Error 2
make[1]: Leaving directory '/home/cgalves/git/LogitechFFDrivers/hid'
make: *** [Makefile:8: build] Error 2