Re: [PATCH v4 1/2] input: keypad: add new keypad driver for MA35D1

kernel test robot
2024-12-04T14:49:04Z

Hi Ming-Jen,

kernel test robot noticed the following build errors:

[auto build test ERROR on dtor-input/next]
[also build test ERROR on dtor-input/for-linus hid/for-next soc/for-next linus/master v6.13-rc1 next-20241203]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Ming-Jen-Chen/input-keypad-add-new-keypad-driver-for-MA35D1/20241204-123001
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
patch link: https://lore.kernel.org/r/20241204021014.5083-2-mjchen0829%40gmail.com
patch subject: [PATCH v4 1/2] input: keypad: add new keypad driver for MA35D1
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20241204/202412042245.5jwzbfGS-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412042245.5jwzbfGS-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412042245.5jwzbfGS-lkp@intel.com/

All errors (new ones prefixed by >>):

drivers/input/keyboard/ma35d1_keypad.c: In function 'ma35d1_keypad_scan_matrix':
drivers/input/keyboard/ma35d1_keypad.c:83:24: error: implicit declaration of function 'readl' [-Wimplicit-function-declaration]
83 | key_event[0] = readl(keypad->mmio_base + KPI_KPE0);
| ^~~~~
>> drivers/input/keyboard/ma35d1_keypad.c:89:9: error: implicit declaration of function 'writel' [-Wimplicit-function-declaration]
89 | writel(key_event[0], (keypad->mmio_base + KPI_KPE0));
| ^~~~~~

vim +/writel +89 drivers/input/keyboard/ma35d1_keypad.c

72
73 static void ma35d1_keypad_scan_matrix(struct ma35d1_keypad *keypad, unsigned int status)
74 {
75 struct input_dev *input_dev = keypad->input_dev;
76 u32 row_shift = get_count_order(keypad->kpi_col);
77 u32 *keymap = input_dev->keycode;
78 u32 code, key, index;
79 u32 key_event[4];
80 u64 pressed_keys = 0, released_keys = 0;
81
82 /* Read key event status */
83 key_event[0] = readl(keypad->mmio_base + KPI_KPE0);
84 key_event[1] = readl(keypad->mmio_base + KPI_KPE1);
85 key_event[2] = readl(keypad->mmio_base + KPI_KRE0);
86 key_event[3] = readl(keypad->mmio_base + KPI_KRE1);
87
88 /* Clear key event status */
> 89 writel(key_event[0], (keypad->mmio_base + KPI_KPE0));
90 writel(key_event[1], (keypad->mmio_base + KPI_KPE1));
91 writel(key_event[2], (keypad->mmio_base + KPI_KRE0));
92 writel(key_event[3], (keypad->mmio_base + KPI_KRE1));
93
94 pressed_keys = key_event[0] | ((u64)key_event[1] << 32);
95 released_keys = key_event[2] | ((u64)key_event[3] << 32);
96
97 /* Process pressed keys */
98 for_each_set_bit(index, (const unsigned long *)&pressed_keys, KEY_EVENT_BITS) {
99 code = MATRIX_SCAN_CODE(index / 8, (index % 8), row_shift);
100 key = keymap[code];
101
102 input_event(input_dev, EV_MSC, MSC_SCAN, code);
103 input_report_key(input_dev, key, 1);
104 }
105
106 /* Process released keys */
107 for_each_set_bit(index, (const unsigned long *)&released_keys, KEY_EVENT_BITS) {
108 code = MATRIX_SCAN_CODE(index / 8, (index % 8), row_shift);
109 key = keymap[code];
110
111 input_event(input_dev, EV_MSC, MSC_SCAN, code);
112 input_report_key(input_dev, key, 0);
113 }
114
115 input_sync(input_dev);
116 }
117

--
0-DAY CI Kernel Test Service