lkml.org 
[lkml]   [2020]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/input/misc/soc_button_array.c:156:4: error: implicit declaration of function 'irq_set_irq_type'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a349e4c659609fd20e4beea89e5c4a4038e33a95
commit: 78a5b53e9fb4d9a4437b6262b79278d2cd4669c9 Input: soc_button_array - work around DSDTs which modify the irqflags
date: 2 months ago
config: x86_64-randconfig-a006-20201123 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 3324fd8a7b1ab011513017ed8fd81e06928526d5)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=78a5b53e9fb4d9a4437b6262b79278d2cd4669c9
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 78a5b53e9fb4d9a4437b6262b79278d2cd4669c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/input/misc/soc_button_array.c:156:4: error: implicit declaration of function 'irq_set_irq_type' [-Werror,-Wimplicit-function-declaration]
irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
^
>> drivers/input/misc/soc_button_array.c:156:26: error: use of undeclared identifier 'IRQ_TYPE_LEVEL_LOW'
irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
^
2 errors generated.

vim +/irq_set_irq_type +156 drivers/input/misc/soc_button_array.c

107
108 static struct platform_device *
109 soc_button_device_create(struct platform_device *pdev,
110 const struct soc_button_info *button_info,
111 bool autorepeat)
112 {
113 const struct soc_button_info *info;
114 struct platform_device *pd;
115 struct gpio_keys_button *gpio_keys;
116 struct gpio_keys_platform_data *gpio_keys_pdata;
117 int error, gpio, irq;
118 int n_buttons = 0;
119
120 for (info = button_info; info->name; info++)
121 if (info->autorepeat == autorepeat)
122 n_buttons++;
123
124 gpio_keys_pdata = devm_kzalloc(&pdev->dev,
125 sizeof(*gpio_keys_pdata) +
126 sizeof(*gpio_keys) * n_buttons,
127 GFP_KERNEL);
128 if (!gpio_keys_pdata)
129 return ERR_PTR(-ENOMEM);
130
131 gpio_keys = (void *)(gpio_keys_pdata + 1);
132 n_buttons = 0;
133
134 for (info = button_info; info->name; info++) {
135 if (info->autorepeat != autorepeat)
136 continue;
137
138 error = soc_button_lookup_gpio(&pdev->dev, info->acpi_index, &gpio, &irq);
139 if (error || irq < 0) {
140 /*
141 * Skip GPIO if not present. Note we deliberately
142 * ignore -EPROBE_DEFER errors here. On some devices
143 * Intel is using so called virtual GPIOs which are not
144 * GPIOs at all but some way for AML code to check some
145 * random status bits without need a custom opregion.
146 * In some cases the resources table we parse points to
147 * such a virtual GPIO, since these are not real GPIOs
148 * we do not have a driver for these so they will never
149 * show up, therefore we ignore -EPROBE_DEFER.
150 */
151 continue;
152 }
153
154 /* See dmi_use_low_level_irq[] comment */
155 if (!autorepeat && dmi_check_system(dmi_use_low_level_irq)) {
> 156 irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
157 gpio_keys[n_buttons].irq = irq;
158 gpio_keys[n_buttons].gpio = -ENOENT;
159 } else {
160 gpio_keys[n_buttons].gpio = gpio;
161 }
162
163 gpio_keys[n_buttons].type = info->event_type;
164 gpio_keys[n_buttons].code = info->event_code;
165 gpio_keys[n_buttons].active_low = info->active_low;
166 gpio_keys[n_buttons].desc = info->name;
167 gpio_keys[n_buttons].wakeup = info->wakeup;
168 /* These devices often use cheap buttons, use 50 ms debounce */
169 gpio_keys[n_buttons].debounce_interval = 50;
170 n_buttons++;
171 }
172
173 if (n_buttons == 0) {
174 error = -ENODEV;
175 goto err_free_mem;
176 }
177
178 gpio_keys_pdata->buttons = gpio_keys;
179 gpio_keys_pdata->nbuttons = n_buttons;
180 gpio_keys_pdata->rep = autorepeat;
181
182 pd = platform_device_register_resndata(&pdev->dev, "gpio-keys",
183 PLATFORM_DEVID_AUTO, NULL, 0,
184 gpio_keys_pdata,
185 sizeof(*gpio_keys_pdata));
186 error = PTR_ERR_OR_ZERO(pd);
187 if (error) {
188 dev_err(&pdev->dev,
189 "failed registering gpio-keys: %d\n", error);
190 goto err_free_mem;
191 }
192
193 return pd;
194
195 err_free_mem:
196 devm_kfree(&pdev->dev, gpio_keys_pdata);
197 return ERR_PTR(error);
198 }
199

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-11-22 23:03    [W:0.028 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site