[gpio:gpio-descriptors-extcon-cleanup 3/4] drivers/extcon/extcon-gpio.c:85:12: error: no member named 'extcon_id' in 'struct gpio_extcon_data'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-extcon-cleanup
head:   c85fda5dfe98dcadd69c4a6d56b17be80720305a
commit: 6163a0709c08de75c5fe5f4e1583e83a7638f038 [3/4] extcon: gpio: Get connector type from device property
config: arm-randconfig-r024-20200828 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c10e63677f5d20f18010f8f68c631ddc97546f7d)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        git checkout 6163a0709c08de75c5fe5f4e1583e83a7638f038
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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.

# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?id=6163a0709c08de75c5fe5f4e1583e83a7638f038
git remote add gpio https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
git fetch --no-tags gpio gpio-descriptors-extcon-cleanup
git checkout 6163a0709c08de75c5fe5f4e1583e83a7638f038
vim +85 drivers/extcon/extcon-gpio.c

be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   63  
44f34fd4a7f8043 drivers/extcon/extcon-gpio.c Bill Pemberton 2012-11-19   64  static int gpio_extcon_probe(struct platform_device *pdev)
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   65  {
60f9b9e65c82cc6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   66  	struct gpio_extcon_data *data;
d368e7de5e8bac3 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   67  	struct device *dev = &pdev->dev;
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   68  	unsigned long irq_flags;
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   69  	u32 debounce_usecs;
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24   70  	u32 connector_type;
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   71  	int irq;
1073514b11c2210 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-08-29   72  	int ret;
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   73  
d368e7de5e8bac3 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   74  	data = devm_kzalloc(dev, sizeof(struct gpio_extcon_data), GFP_KERNEL);
60f9b9e65c82cc6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29   75  	if (!data)
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20   76  		return -ENOMEM;
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   77  
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   78  	/*
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   79  	 * FIXME: extcon_id represents the unique identifier of external
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   80  	 * connectors such as EXTCON_USB, EXTCON_DISP_HDMI and so on. extcon_id
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   81  	 * is necessary to register the extcon device. But, it's not yet
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   82  	 * developed to get the extcon id from device-tree or others.
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   83  	 * On later, it have to be solved.
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   84  	 */
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  @85  	if (data->extcon_id > EXTCON_NONE)
a62300d99f15c4b drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   86  		return -EINVAL;
60cd62d4f7d681a drivers/extcon/extcon-gpio.c Chanwoo Choi   2014-04-21   87  
d368e7de5e8bac3 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   88  	data->gpiod = devm_gpiod_get(dev, "extcon", GPIOD_IN);
d368e7de5e8bac3 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   89  	if (IS_ERR(data->gpiod))
d368e7de5e8bac3 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12   90  		return PTR_ERR(data->gpiod);
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   91  	irq = gpiod_to_irq(data->gpiod);
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   92  	if (irq <= 0)
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   93  		return irq;
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   94  
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   95  	/*
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   96  	 * It is unlikely that this is an acknowledged interrupt that goes
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   97  	 * away after handling, what we are looking for are falling edges
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   98  	 * if the signal is active low, and rising edges if the signal is
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30   99  	 * active high.
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  100  	 */
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  101  	if (gpiod_is_active_low(data->gpiod))
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  102  		irq_flags = IRQF_TRIGGER_FALLING;
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  103  	else
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  104  		irq_flags = IRQF_TRIGGER_RISING;
4288d9b8edcec72 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-11-22  105  
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  106  	ret = device_property_read_u32(dev, "extcon-connector-types", &connector_type);
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  107  	if (ret || !connector_type) {
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  108  		dev_err(dev, "illegal cable type or undefined cable type\n");
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  109  		return -EINVAL;
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  110  	}
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  111  	data->connector_type[0] = connector_type;
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  112  	data->connector_type[1] = EXTCON_NONE;
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  113  
de992acb93df41f drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  114  	/* Allocate the memory of extcon devie and register extcon device */
6163a0709c08de7 drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  115  	data->edev = devm_extcon_dev_allocate(dev, data->connector_type);
de992acb93df41f drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  116  	if (IS_ERR(data->edev)) {
d368e7de5e8bac3 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  117  		dev_err(dev, "failed to allocate extcon device\n");
de992acb93df41f drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  118  		return -ENOMEM;
338de0ca682ca95 drivers/extcon/extcon-gpio.c Guenter Roeck  2013-09-10  119  	}
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  120  
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  121  	ret = device_property_read_u32(dev, "input-debounce", &debounce_usecs);
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  122  	if (ret || !debounce_usecs) {
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  123  		dev_err(dev, "illegal debounce value, set to 20 ms\n");
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  124  		debounce_usecs = 20000;
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  125  	}
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  126  	ret = gpiod_set_debounce(data->gpiod, debounce_usecs);
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  127  	if (ret)
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  128  		data->debounce_jiffies = msecs_to_jiffies(debounce_usecs * 1000);
6f73f45a89eb7ad drivers/extcon/extcon-gpio.c Linus Walleij  2017-09-24  129  
d368e7de5e8bac3 drivers/extcon/extcon-gpio.c Linus Walleij  2018-02-12  130  	ret = devm_extcon_dev_register(dev, data->edev);
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  131  	if (ret < 0)
01eaf2458773b27 drivers/extcon/extcon_gpio.c Axel Lin       2012-06-16  132  		return ret;
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  133  
60f9b9e65c82cc6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  134  	INIT_DELAYED_WORK(&data->work, gpio_extcon_work);
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  135  
de992acb93df41f drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  136  	/*
b51b387020ee1c2 drivers/extcon/extcon-gpio.c Moritz Fischer 2015-12-23  137  	 * Request the interrupt of gpio to detect whether external connector
de992acb93df41f drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  138  	 * is attached or detached.
de992acb93df41f drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-30  139  	 */
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  140  	ret = devm_request_any_context_irq(dev, irq,
8bc4810b435a333 drivers/extcon/extcon-gpio.c Linus Walleij  2019-05-30  141  					gpio_irq_handler, irq_flags,
60f9b9e65c82cc6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  142  					pdev->name, data);
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  143  	if (ret < 0)
d92c2f12f8a9404 drivers/extcon/extcon-gpio.c Sangjung Woo   2014-04-21  144  		return ret;
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  145  
60f9b9e65c82cc6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  146  	platform_set_drvdata(pdev, data);
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  147  	/* Perform initial detection */
60f9b9e65c82cc6 drivers/extcon/extcon-gpio.c Chanwoo Choi   2015-09-29  148  	gpio_extcon_work(&data->work.work);
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  149  
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  150  	return 0;
be48308a24c7651 drivers/extcon/extcon_gpio.c MyungJoo Ham   2012-04-20  151  }
be48308a24c7651 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


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux