[arm-platforms:irq/gpio-immutable 21/29] drivers/gpio/gpio-mt7621.c:255:32: error: use of undeclared identifier 'mediatek_gpio_irq_print_chip'; did you mean 'mediatek_irq_print_chip'?
kernel test robot
lkp at intel.com
Fri Feb 11 09:58:03 PST 2022
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/gpio-immutable
head: 5bcef0d59c643b8a70398229d4e3b264d3079c48
commit: a464bf5adf64dc347b1c786351be4a8df88dcf8d [21/29] gpio: mt7621: Switch to dynamic chip name output
config: riscv-randconfig-c006-20220211 (https://download.01.org/0day-ci/archive/20220211/202202112125.cRFqhKb1-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project f6685f774697c85d6a352dcea013f46a99f9fe31)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=a464bf5adf64dc347b1c786351be4a8df88dcf8d
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms irq/gpio-immutable
git checkout a464bf5adf64dc347b1c786351be4a8df88dcf8d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/gpio/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpio/gpio-mt7621.c:255:32: error: use of undeclared identifier 'mediatek_gpio_irq_print_chip'; did you mean 'mediatek_irq_print_chip'?
rg->irq_chip.irq_print_chip = mediatek_gpio_irq_print_chip;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
mediatek_irq_print_chip
drivers/gpio/gpio-mt7621.c:192:13: note: 'mediatek_irq_print_chip' declared here
static void mediatek_irq_print_chip(struct irq_data *d, struct seq_file *p)
^
1 error generated.
vim +255 drivers/gpio/gpio-mt7621.c
216
217 static int
218 mediatek_gpio_bank_probe(struct device *dev, int bank)
219 {
220 struct mtk *mtk = dev_get_drvdata(dev);
221 struct mtk_gc *rg;
222 void __iomem *dat, *set, *ctrl, *diro;
223 int ret;
224
225 rg = &mtk->gc_map[bank];
226 memset(rg, 0, sizeof(*rg));
227
228 spin_lock_init(&rg->lock);
229 rg->bank = bank;
230
231 dat = mtk->base + GPIO_REG_DATA + (rg->bank * GPIO_BANK_STRIDE);
232 set = mtk->base + GPIO_REG_DSET + (rg->bank * GPIO_BANK_STRIDE);
233 ctrl = mtk->base + GPIO_REG_DCLR + (rg->bank * GPIO_BANK_STRIDE);
234 diro = mtk->base + GPIO_REG_CTRL + (rg->bank * GPIO_BANK_STRIDE);
235
236 ret = bgpio_init(&rg->chip, dev, 4, dat, set, ctrl, diro, NULL,
237 BGPIOF_NO_SET_ON_INPUT);
238 if (ret) {
239 dev_err(dev, "bgpio_init() failed\n");
240 return ret;
241 }
242
243 rg->chip.of_gpio_n_cells = 2;
244 rg->chip.of_xlate = mediatek_gpio_xlate;
245 rg->chip.label = devm_kasprintf(dev, GFP_KERNEL, "%s-bank%d",
246 dev_name(dev), bank);
247 if (!rg->chip.label)
248 return -ENOMEM;
249
250 rg->chip.offset = bank * MTK_BANK_WIDTH;
251 rg->irq_chip.irq_unmask = mediatek_gpio_irq_unmask;
252 rg->irq_chip.irq_mask = mediatek_gpio_irq_mask;
253 rg->irq_chip.irq_mask_ack = mediatek_gpio_irq_mask;
254 rg->irq_chip.irq_set_type = mediatek_gpio_irq_type;
> 255 rg->irq_chip.irq_print_chip = mediatek_gpio_irq_print_chip;
256
257 if (mtk->gpio_irq) {
258 struct gpio_irq_chip *girq;
259
260 /*
261 * Directly request the irq here instead of passing
262 * a flow-handler because the irq is shared.
263 */
264 ret = devm_request_irq(dev, mtk->gpio_irq,
265 mediatek_gpio_irq_handler, IRQF_SHARED,
266 rg->chip.label, &rg->chip);
267
268 if (ret) {
269 dev_err(dev, "Error requesting IRQ %d: %d\n",
270 mtk->gpio_irq, ret);
271 return ret;
272 }
273
274 girq = &rg->chip.irq;
275 girq->chip = &rg->irq_chip;
276 /* This will let us handle the parent IRQ in the driver */
277 girq->parent_handler = NULL;
278 girq->num_parents = 0;
279 girq->parents = NULL;
280 girq->default_type = IRQ_TYPE_NONE;
281 girq->handler = handle_simple_irq;
282 }
283
284 ret = devm_gpiochip_add_data(dev, &rg->chip, mtk);
285 if (ret < 0) {
286 dev_err(dev, "Could not register gpio %d, ret=%d\n",
287 rg->chip.ngpio, ret);
288 return ret;
289 }
290
291 /* set polarity to low for all gpios */
292 mtk_gpio_w32(rg, GPIO_REG_POL, 0);
293
294 dev_info(dev, "registering %d gpios\n", rg->chip.ngpio);
295
296 return 0;
297 }
298
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
More information about the linux-arm-kernel
mailing list