tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-extcon-cleanup head: d6cb89d185311c4f5f3847afa77ce99b189da4ff commit: fa2df1657cf2abfbd2405a286bb9960655a556ed [3/4] extcon: gpio: Get connector type from device property config: x86_64-allyesconfig (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project ee3620643dfc88a178fa4ca116cf83014e4ee547) 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 git checkout fa2df1657cf2abfbd2405a286bb9960655a556ed # 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@xxxxxxxxx> All errors (new ones prefixed by >>): >> drivers/extcon/extcon-gpio.c:85:12: error: no member named 'extcon_id' in 'struct gpio_extcon_data' if (data->extcon_id > EXTCON_NONE) ~~~~ ^ 1 error generated. vim +85 drivers/extcon/extcon-gpio.c be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 63 44f34fd4a7f804 drivers/extcon/extcon-gpio.c Bill Pemberton 2012-11-19 64 static int gpio_extcon_probe(struct platform_device *pdev) be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 65 { 60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-29 66 struct gpio_extcon_data *data; d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 67 struct device *dev = &pdev->dev; 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 68 unsigned long irq_flags; 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 69 u32 debounce_usecs; fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 70 u32 connector_type; 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 71 int irq; 1073514b11c221 drivers/extcon/extcon-gpio.c Guenter Roeck 2013-08-29 72 int ret; be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 73 d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 74 data = devm_kzalloc(dev, sizeof(struct gpio_extcon_data), GFP_KERNEL); 60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-29 75 if (!data) be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 76 return -ENOMEM; a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 77 a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 78 /* a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 79 * FIXME: extcon_id represents the unique identifier of external a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 80 * connectors such as EXTCON_USB, EXTCON_DISP_HDMI and so on. extcon_id a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 81 * is necessary to register the extcon device. But, it's not yet a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 82 * developed to get the extcon id from device-tree or others. a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 83 * On later, it have to be solved. a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 84 */ 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 @85 if (data->extcon_id > EXTCON_NONE) a62300d99f15c4 drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 86 return -EINVAL; 60cd62d4f7d681 drivers/extcon/extcon-gpio.c Chanwoo Choi 2014-04-21 87 d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 88 data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN); d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 89 if (IS_ERR(data->gpiod)) d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 90 return PTR_ERR(data->gpiod); 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 91 irq = gpiod_to_irq(data->gpiod); 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 92 if (irq <= 0) 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 93 return irq; 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 94 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 95 /* 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 96 * It is unlikely that this is an acknowledged interrupt that goes 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 97 * away after handling, what we are looking for are falling edges 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 98 * if the signal is active low, and rising edges if the signal is 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 99 * active high. 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 100 */ 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 101 if (gpiod_is_active_low(data->gpiod)) 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 102 irq_flags = IRQF_TRIGGER_FALLING; 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 103 else 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 104 irq_flags = IRQF_TRIGGER_RISING; 4288d9b8edcec7 drivers/extcon/extcon-gpio.c Guenter Roeck 2013-11-22 105 fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 106 ret = device_property_read_u32(dev, "extcon-connector-types", &connector_type); fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 107 if (ret || !connector_type) { fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 108 dev_err(dev, "illegal cable type or undefined cable type\n"); fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 109 return -EINVAL; fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 110 } fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 111 data->connector_type[0] = connector_type; fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 112 data->connector_type[1] = EXTCON_NONE; fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 113 de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-30 114 /* Allocate the memory of extcon devie and register extcon device */ fa2df1657cf2ab drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 115 data->edev = devm_extcon_dev_allocate(dev, data->connector_type); de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-30 116 if (IS_ERR(data->edev)) { d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 117 dev_err(dev, "failed to allocate extcon device\n"); de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-30 118 return -ENOMEM; 338de0ca682ca9 drivers/extcon/extcon-gpio.c Guenter Roeck 2013-09-10 119 } be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 120 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 121 ret = device_property_read_u32(dev, "input-debounce", &debounce_usecs); 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 122 if (ret || !debounce_usecs) { 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 123 dev_err(dev, "illegal debounce value, set to 20 ms\n"); 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 124 debounce_usecs = 20000; 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 125 } 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 126 ret = gpiod_set_debounce(data->gpiod, debounce_usecs); 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 127 if (ret) 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 128 data->debounce_jiffies = msecs_to_jiffies(debounce_usecs * 1000); 9e6be56d8597c3 drivers/extcon/extcon-gpio.c Linus Walleij 2017-09-24 129 d368e7de5e8bac drivers/extcon/extcon-gpio.c Linus Walleij 2018-02-12 130 ret = devm_extcon_dev_register(dev, data->edev); be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 131 if (ret < 0) 01eaf2458773b2 drivers/extcon/extcon_gpio.c Axel Lin 2012-06-16 132 return ret; be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 133 60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-29 134 INIT_DELAYED_WORK(&data->work, gpio_extcon_work); be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 135 de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-30 136 /* b51b387020ee1c drivers/extcon/extcon-gpio.c Moritz Fischer 2015-12-23 137 * Request the interrupt of gpio to detect whether external connector de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-30 138 * is attached or detached. de992acb93df41 drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-30 139 */ 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 140 ret = devm_request_any_context_irq(dev, irq, 8bc4810b435a33 drivers/extcon/extcon-gpio.c Linus Walleij 2019-05-30 141 gpio_irq_handler, irq_flags, 60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-29 142 pdev->name, data); be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 143 if (ret < 0) d92c2f12f8a940 drivers/extcon/extcon-gpio.c Sangjung Woo 2014-04-21 144 return ret; be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 145 60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-29 146 platform_set_drvdata(pdev, data); be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 147 /* Perform initial detection */ 60f9b9e65c82cc drivers/extcon/extcon-gpio.c Chanwoo Choi 2015-09-29 148 gpio_extcon_work(&data->work.work); be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 149 be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 150 return 0; be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 151 } be48308a24c765 drivers/extcon/extcon_gpio.c MyungJoo Ham 2012-04-20 152 :::::: The code at line 85 was first introduced by commit :::::: 8bc4810b435a3338346efd70e94c4d6fd0863635 extcon: gpio: Request reasonable interrupts :::::: TO: Linus Walleij <linus.walleij@xxxxxxxxxx> :::::: CC: Chanwoo Choi <cw00.choi@xxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip