Re: [PATCH] Input: gpio_keys_polled - keep button data constant

From: kbuild test robot
Date: Fri Feb 26 2016 - 14:31:12 EST


Hi Dmitry,

[auto build test WARNING on input/next]
[also build test WARNING on v4.5-rc5 next-20160226]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Dmitry-Torokhov/Input-gpio_keys_polled-keep-button-data-constant/20160227-025342
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: i386-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All warnings (new ones prefixed by >>):

drivers/input/keyboard/gpio_keys.c: In function 'gpio_keys_get_devtree_pdata':
>> drivers/input/keyboard/gpio_keys.c:654:10: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
button = &pdata->buttons[i++];
^

vim +/const +654 drivers/input/keyboard/gpio_keys.c

5d422f2e7 Andy Shevchenko 2014-04-25 638 sizeof(*pdata) + nbuttons * sizeof(*button),
219edc717 Alexandre Pereira da Silva 2012-07-29 639 GFP_KERNEL);
5d422f2e7 Andy Shevchenko 2014-04-25 640 if (!pdata)
5d422f2e7 Andy Shevchenko 2014-04-25 641 return ERR_PTR(-ENOMEM);
fd05d0892 David Jander 2011-07-09 642
219edc717 Alexandre Pereira da Silva 2012-07-29 643 pdata->buttons = (struct gpio_keys_button *)(pdata + 1);
219edc717 Alexandre Pereira da Silva 2012-07-29 644 pdata->nbuttons = nbuttons;
fd05d0892 David Jander 2011-07-09 645
219edc717 Alexandre Pereira da Silva 2012-07-29 646 pdata->rep = !!of_get_property(node, "autorepeat", NULL);
fd05d0892 David Jander 2011-07-09 647
c4dc5f8c9 Laxman Dewangan 2016-01-12 648 of_property_read_string(node, "label", &pdata->name);
c4dc5f8c9 Laxman Dewangan 2016-01-12 649
fd05d0892 David Jander 2011-07-09 650 i = 0;
809d9516d Laxman Dewangan 2016-01-13 651 for_each_available_child_of_node(node, pp) {
fd05d0892 David Jander 2011-07-09 652 enum of_gpio_flags flags;
fd05d0892 David Jander 2011-07-09 653
1d6a01365 Fabio Estevam 2014-12-13 @654 button = &pdata->buttons[i++];
1d6a01365 Fabio Estevam 2014-12-13 655
97d86e07b Dmitry Torokhov 2014-11-14 656 button->gpio = of_get_gpio_flags(pp, 0, &flags);
97d86e07b Dmitry Torokhov 2014-11-14 657 if (button->gpio < 0) {
97d86e07b Dmitry Torokhov 2014-11-14 658 error = button->gpio;
97d86e07b Dmitry Torokhov 2014-11-14 659 if (error != -ENOENT) {
e324ce61e Dmitry Torokhov 2012-12-24 660 if (error != -EPROBE_DEFER)
e324ce61e Dmitry Torokhov 2012-12-24 661 dev_err(dev,
e324ce61e Dmitry Torokhov 2012-12-24 662 "Failed to get gpio flags, error: %d\n",

:::::: The code at line 654 was first introduced by commit
:::::: 1d6a01365fd63fbf7c2709a183e2936728c8efad Input: gpio_keys - fix warning regarding uninitialized 'button' variable

:::::: TO: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
:::::: CC: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

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

Attachment: .config.gz
Description: Binary data