Re: [PATCH] media: av7110: switch to useing timer_setup()

From: kbuild test robot
Date: Thu Oct 26 2017 - 14:28:14 EST


Hi Dmitry,

Thank you for the patch! Yet we hit a small issue.
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v4.14-rc6 next-20171018]
[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/Dmitry-Torokhov/media-av7110-switch-to-useing-timer_setup/20171027-014646
base: git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-x001-201743 (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 error/warnings (new ones prefixed by >>):

In file included from include/linux/list.h:8:0,
from include/linux/module.h:9,
from drivers/media//pci/ttpci/av7110_ir.c:24:
drivers/media//pci/ttpci/av7110_ir.c: In function 'av7110_emit_keyup':
>> drivers/media//pci/ttpci/av7110_ir.c:89:39: error: 'keyup_timer' undeclared (first use in this function)
struct infrared *ir = from_timer(ir, keyup_timer, t);
^
include/linux/kernel.h:927:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
>> drivers/media//pci/ttpci/av7110_ir.c:89:24: note: in expansion of macro 'from_timer'
struct infrared *ir = from_timer(ir, keyup_timer, t);
^~~~~~~~~~
drivers/media//pci/ttpci/av7110_ir.c:89:39: note: each undeclared identifier is reported only once for each function it appears in
struct infrared *ir = from_timer(ir, keyup_timer, t);
^
include/linux/kernel.h:927:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
>> drivers/media//pci/ttpci/av7110_ir.c:89:24: note: in expansion of macro 'from_timer'
struct infrared *ir = from_timer(ir, keyup_timer, t);
^~~~~~~~~~
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from drivers/media//pci/ttpci/av7110_ir.c:22:
>> include/linux/kernel.h:928:51: error: 'struct infrared' has no member named 't'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/compiler.h:553:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:928:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:928:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
include/linux/timer.h:183:2: note: in expansion of macro 'container_of'
container_of(callback_timer, typeof(*var), timer_fieldname)
^~~~~~~~~~~~
>> drivers/media//pci/ttpci/av7110_ir.c:89:24: note: in expansion of macro 'from_timer'
struct infrared *ir = from_timer(ir, keyup_timer, t);
^~~~~~~~~~
In file included from include/linux/compiler.h:58:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from drivers/media//pci/ttpci/av7110_ir.c:22:
>> include/linux/compiler-gcc.h:165:2: error: 'struct infrared' has no member named 't'
__builtin_offsetof(a, b)
^
include/linux/stddef.h:16:32: note: in expansion of macro '__compiler_offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:931:21: note: in expansion of macro 'offsetof'
((type *)(__mptr - offsetof(type, member))); })
^~~~~~~~
include/linux/timer.h:183:2: note: in expansion of macro 'container_of'
container_of(callback_timer, typeof(*var), timer_fieldname)
^~~~~~~~~~~~
>> drivers/media//pci/ttpci/av7110_ir.c:89:24: note: in expansion of macro 'from_timer'
struct infrared *ir = from_timer(ir, keyup_timer, t);
^~~~~~~~~~
drivers/media//pci/ttpci/av7110_ir.c: In function 'av7110_ir_init':
>> drivers/media//pci/ttpci/av7110_ir.c:364:30: error: 'input_repeat_key' undeclared (first use in this function)
input_dev->timer.function = input_repeat_key;
^~~~~~~~~~~~~~~~
--
In file included from include/linux/list.h:8:0,
from include/linux/module.h:9,
from drivers/media/pci/ttpci/av7110_ir.c:24:
drivers/media/pci/ttpci/av7110_ir.c: In function 'av7110_emit_keyup':
drivers/media/pci/ttpci/av7110_ir.c:89:39: error: 'keyup_timer' undeclared (first use in this function)
struct infrared *ir = from_timer(ir, keyup_timer, t);
^
include/linux/kernel.h:927:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
drivers/media/pci/ttpci/av7110_ir.c:89:24: note: in expansion of macro 'from_timer'
struct infrared *ir = from_timer(ir, keyup_timer, t);
^~~~~~~~~~
drivers/media/pci/ttpci/av7110_ir.c:89:39: note: each undeclared identifier is reported only once for each function it appears in
struct infrared *ir = from_timer(ir, keyup_timer, t);
^
include/linux/kernel.h:927:26: note: in definition of macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~
drivers/media/pci/ttpci/av7110_ir.c:89:24: note: in expansion of macro 'from_timer'
struct infrared *ir = from_timer(ir, keyup_timer, t);
^~~~~~~~~~
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from drivers/media/pci/ttpci/av7110_ir.c:22:
>> include/linux/kernel.h:928:51: error: 'struct infrared' has no member named 't'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/compiler.h:553:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:928:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:928:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
include/linux/timer.h:183:2: note: in expansion of macro 'container_of'
container_of(callback_timer, typeof(*var), timer_fieldname)
^~~~~~~~~~~~
drivers/media/pci/ttpci/av7110_ir.c:89:24: note: in expansion of macro 'from_timer'
struct infrared *ir = from_timer(ir, keyup_timer, t);
^~~~~~~~~~
In file included from include/linux/compiler.h:58:0,
from include/uapi/linux/stddef.h:1,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from drivers/media/pci/ttpci/av7110_ir.c:22:
>> include/linux/compiler-gcc.h:165:2: error: 'struct infrared' has no member named 't'
__builtin_offsetof(a, b)
^
include/linux/stddef.h:16:32: note: in expansion of macro '__compiler_offsetof'
#define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:931:21: note: in expansion of macro 'offsetof'
((type *)(__mptr - offsetof(type, member))); })
^~~~~~~~
include/linux/timer.h:183:2: note: in expansion of macro 'container_of'
container_of(callback_timer, typeof(*var), timer_fieldname)
^~~~~~~~~~~~
drivers/media/pci/ttpci/av7110_ir.c:89:24: note: in expansion of macro 'from_timer'
struct infrared *ir = from_timer(ir, keyup_timer, t);
^~~~~~~~~~
drivers/media/pci/ttpci/av7110_ir.c: In function 'av7110_ir_init':
drivers/media/pci/ttpci/av7110_ir.c:364:30: error: 'input_repeat_key' undeclared (first use in this function)
input_dev->timer.function = input_repeat_key;
^~~~~~~~~~~~~~~~

vim +/keyup_timer +89 drivers/media//pci/ttpci/av7110_ir.c

> 24 #include <linux/module.h>
25 #include <linux/proc_fs.h>
26 #include <linux/kernel.h>
27 #include <linux/bitops.h>
28
29 #include "av7110.h"
30 #include "av7110_hw.h"
31
32
33 #define AV_CNT 4
34
35 #define IR_RC5 0
36 #define IR_RCMM 1
37 #define IR_RC5_EXT 2 /* internal only */
38
39 #define IR_ALL 0xffffffff
40
41 #define UP_TIMEOUT (HZ*7/25)
42
43
44 /* Note: enable ir debugging by or'ing debug with 16 */
45
46 static int ir_protocol[AV_CNT] = { IR_RCMM, IR_RCMM, IR_RCMM, IR_RCMM};
47 module_param_array(ir_protocol, int, NULL, 0644);
48 MODULE_PARM_DESC(ir_protocol, "Infrared protocol: 0 RC5, 1 RCMM (default)");
49
50 static int ir_inversion[AV_CNT];
51 module_param_array(ir_inversion, int, NULL, 0644);
52 MODULE_PARM_DESC(ir_inversion, "Inversion of infrared signal: 0 not inverted (default), 1 inverted");
53
54 static uint ir_device_mask[AV_CNT] = { IR_ALL, IR_ALL, IR_ALL, IR_ALL };
55 module_param_array(ir_device_mask, uint, NULL, 0644);
56 MODULE_PARM_DESC(ir_device_mask, "Bitmask of infrared devices: bit 0..31 = device 0..31 (default: all)");
57
58
59 static int av_cnt;
60 static struct av7110 *av_list[AV_CNT];
61
62 static u16 default_key_map [256] = {
63 KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7,
64 KEY_8, KEY_9, KEY_BACK, 0, KEY_POWER, KEY_MUTE, 0, KEY_INFO,
65 KEY_VOLUMEUP, KEY_VOLUMEDOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
66 KEY_CHANNELUP, KEY_CHANNELDOWN, 0, 0, 0, 0, 0, 0,
67 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
68 0, 0, 0, 0, KEY_TEXT, 0, 0, KEY_TV, 0, 0, 0, 0, 0, KEY_SETUP, 0, 0,
69 0, 0, 0, KEY_SUBTITLE, 0, 0, KEY_LANGUAGE, 0,
70 KEY_RADIO, 0, 0, 0, 0, KEY_EXIT, 0, 0,
71 KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_OK, 0, 0, 0,
72 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_RED, KEY_GREEN, KEY_YELLOW,
73 KEY_BLUE, 0, 0, 0, 0, 0, 0, 0, KEY_MENU, KEY_LIST, 0, 0, 0, 0, 0, 0,
74 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
75 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
76 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
77 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
78 0, 0, 0, 0, KEY_UP, KEY_UP, KEY_DOWN, KEY_DOWN,
79 0, 0, 0, 0, KEY_EPG, 0, 0, 0,
80 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
81 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
82 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_VCR
83 };
84
85
86 /* key-up timer */
87 static void av7110_emit_keyup(struct timer_list *t)
88 {
> 89 struct infrared *ir = from_timer(ir, keyup_timer, t);
90
91 if (!ir || !test_bit(ir->last_key, ir->input_dev->key))
92 return;
93
94 input_report_key(ir->input_dev, ir->last_key, 0);
95 input_sync(ir->input_dev);
96 }
97

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

Attachment: .config.gz
Description: application/gzip