linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [input:next 2439/2454] drivers/input/touchscreen/goodix.c:554:12: error: implicit declaration of function 'acpi_execute_simple_method'
@ 2020-03-25  1:40 kbuild test robot
  2020-03-25 10:26 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-03-25  1:40 UTC (permalink / raw)
  To: Hans de Goede; +Cc: kbuild-all, linux-input, Dmitry Torokhov, Bastien Nocera

[-- Attachment #1: Type: text/plain, Size: 2902 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
head:   10ad4845cd3d760c191ab4ecef446b99a6b2c779
commit: c5fca485320e83b1bb964ad5559ec20f14c943be [2439/2454] Input: goodix - add support for controlling the IRQ pin through ACPI methods
config: nds32-randconfig-a001-20200324 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout c5fca485320e83b1bb964ad5559ec20f14c943be
        # save the attached .config to linux build tree
        GCC_VERSION=9.2.0 make.cross ARCH=nds32 

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

All errors (new ones prefixed by >>):

   drivers/input/touchscreen/goodix.c: In function 'goodix_irq_direction_output':
>> drivers/input/touchscreen/goodix.c:554:12: error: implicit declaration of function 'acpi_execute_simple_method' [-Werror=implicit-function-declaration]
     554 |   status = acpi_execute_simple_method(ACPI_HANDLE(dev),
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/input/touchscreen/goodix.c:536:17: warning: unused variable 'dev' [-Wunused-variable]
     536 |  struct device *dev = &ts->client->dev;
         |                 ^~~
   drivers/input/touchscreen/goodix.c: In function 'goodix_irq_direction_input':
   drivers/input/touchscreen/goodix.c:564:17: warning: unused variable 'dev' [-Wunused-variable]
     564 |  struct device *dev = &ts->client->dev;
         |                 ^~~
   cc1: some warnings being treated as errors

vim +/acpi_execute_simple_method +554 drivers/input/touchscreen/goodix.c

   532	
   533	static int goodix_irq_direction_output(struct goodix_ts_data *ts,
   534					       int value)
   535	{
   536		struct device *dev = &ts->client->dev;
   537		acpi_status status;
   538	
   539		switch (ts->irq_pin_access_method) {
   540		case IRQ_PIN_ACCESS_NONE:
   541			dev_err(&ts->client->dev,
   542				"%s called without an irq_pin_access_method set\n",
   543				__func__);
   544			return -EINVAL;
   545		case IRQ_PIN_ACCESS_GPIO:
   546			return gpiod_direction_output(ts->gpiod_int, value);
   547		case IRQ_PIN_ACCESS_ACPI_GPIO:
   548			/*
   549			 * The IRQ pin triggers on a falling edge, so its gets marked
   550			 * as active-low, use output_raw to avoid the value inversion.
   551			 */
   552			return gpiod_direction_output_raw(ts->gpiod_int, value);
   553		case IRQ_PIN_ACCESS_ACPI_METHOD:
 > 554			status = acpi_execute_simple_method(ACPI_HANDLE(dev),
   555							    "INTO", value);
   556			return ACPI_SUCCESS(status) ? 0 : -EIO;
   557		}
   558	
   559		return -EINVAL; /* Never reached */
   560	}
   561	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24042 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [input:next 2439/2454] drivers/input/touchscreen/goodix.c:554:12: error: implicit declaration of function 'acpi_execute_simple_method'
  2020-03-25  1:40 [input:next 2439/2454] drivers/input/touchscreen/goodix.c:554:12: error: implicit declaration of function 'acpi_execute_simple_method' kbuild test robot
@ 2020-03-25 10:26 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2020-03-25 10:26 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, linux-input, Dmitry Torokhov, Bastien Nocera

Hi,

On 3/25/20 2:40 AM, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
> head:   10ad4845cd3d760c191ab4ecef446b99a6b2c779
> commit: c5fca485320e83b1bb964ad5559ec20f14c943be [2439/2454] Input: goodix - add support for controlling the IRQ pin through ACPI methods
> config: nds32-randconfig-a001-20200324 (attached as .config)
> compiler: nds32le-linux-gcc (GCC) 9.2.0
> reproduce:
>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>          chmod +x ~/bin/make.cross
>          git checkout c5fca485320e83b1bb964ad5559ec20f14c943be
>          # save the attached .config to linux build tree
>          GCC_VERSION=9.2.0 make.cross ARCH=nds32
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>     drivers/input/touchscreen/goodix.c: In function 'goodix_irq_direction_output':
>>> drivers/input/touchscreen/goodix.c:554:12: error: implicit declaration of function 'acpi_execute_simple_method' [-Werror=implicit-function-declaration]
>       554 |   status = acpi_execute_simple_method(ACPI_HANDLE(dev),

This is my bad, I was relying on acpi stub functions
declared in include/linux/acpi.h to deal with this.

This works for e.g. the has_acpi_companion() check we do in
goodix_get_gpio_config(), but acpi_execute_simple_method()
is not stubbed. So we will need to add some #ifdef-s.

I've prepared a patch fixing this, I will send it out
right away.

Regards,

Hans




>           |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
>     drivers/input/touchscreen/goodix.c:536:17: warning: unused variable 'dev' [-Wunused-variable]
>       536 |  struct device *dev = &ts->client->dev;
>           |                 ^~~
>     drivers/input/touchscreen/goodix.c: In function 'goodix_irq_direction_input':
>     drivers/input/touchscreen/goodix.c:564:17: warning: unused variable 'dev' [-Wunused-variable]
>       564 |  struct device *dev = &ts->client->dev;
>           |                 ^~~
>     cc1: some warnings being treated as errors
> 
> vim +/acpi_execute_simple_method +554 drivers/input/touchscreen/goodix.c
> 
>     532	
>     533	static int goodix_irq_direction_output(struct goodix_ts_data *ts,
>     534					       int value)
>     535	{
>     536		struct device *dev = &ts->client->dev;
>     537		acpi_status status;
>     538	
>     539		switch (ts->irq_pin_access_method) {
>     540		case IRQ_PIN_ACCESS_NONE:
>     541			dev_err(&ts->client->dev,
>     542				"%s called without an irq_pin_access_method set\n",
>     543				__func__);
>     544			return -EINVAL;
>     545		case IRQ_PIN_ACCESS_GPIO:
>     546			return gpiod_direction_output(ts->gpiod_int, value);
>     547		case IRQ_PIN_ACCESS_ACPI_GPIO:
>     548			/*
>     549			 * The IRQ pin triggers on a falling edge, so its gets marked
>     550			 * as active-low, use output_raw to avoid the value inversion.
>     551			 */
>     552			return gpiod_direction_output_raw(ts->gpiod_int, value);
>     553		case IRQ_PIN_ACCESS_ACPI_METHOD:
>   > 554			status = acpi_execute_simple_method(ACPI_HANDLE(dev),
>     555							    "INTO", value);
>     556			return ACPI_SUCCESS(status) ? 0 : -EIO;
>     557		}
>     558	
>     559		return -EINVAL; /* Never reached */
>     560	}
>     561	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-25 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  1:40 [input:next 2439/2454] drivers/input/touchscreen/goodix.c:554:12: error: implicit declaration of function 'acpi_execute_simple_method' kbuild test robot
2020-03-25 10:26 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).