mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb'
@ 2025-10-24  0:05 kernel test robot
  2025-10-24  5:49 ` Cryolitia PukNgae
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2025-10-24  0:05 UTC (permalink / raw)
  To: Cryolitia PukNgae; +Cc: oe-kbuild-all, linux-kernel, Guenter Roeck

Hi Cryolitia,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   266ee584e55eed108583ab4f45b5de734522502d
commit: 0ab88e2394392f475b8857ac82c0c987841217f8 hwmon: add GPD devices sensor driver
date:   6 weeks ago
config: i386-buildonly-randconfig-002-20251024 (https://download.01.org/0day-ci/archive/20251024/202510240817.vt3eQ3qL-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251024/202510240817.vt3eQ3qL-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510240817.vt3eQ3qL-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/hwmon/gpd-fan.c: In function 'gpd_ecram_read':
>> drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb' [-Wimplicit-function-declaration]
     231 |         outb(0x2E, addr_port);
         |         ^~~~
>> drivers/hwmon/gpd-fan.c:244:16: error: implicit declaration of function 'inb' [-Wimplicit-function-declaration]
     244 |         *val = inb(data_port);
         |                ^~~


vim +/outb +231 drivers/hwmon/gpd-fan.c

   224	
   225	// Helper functions to handle EC read/write
   226	static void gpd_ecram_read(u16 offset, u8 *val)
   227	{
   228		u16 addr_port = gpd_driver_priv.drvdata->addr_port;
   229		u16 data_port = gpd_driver_priv.drvdata->data_port;
   230	
 > 231		outb(0x2E, addr_port);
   232		outb(0x11, data_port);
   233		outb(0x2F, addr_port);
   234		outb((u8)((offset >> 8) & 0xFF), data_port);
   235	
   236		outb(0x2E, addr_port);
   237		outb(0x10, data_port);
   238		outb(0x2F, addr_port);
   239		outb((u8)(offset & 0xFF), data_port);
   240	
   241		outb(0x2E, addr_port);
   242		outb(0x12, data_port);
   243		outb(0x2F, addr_port);
 > 244		*val = inb(data_port);
   245	}
   246	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb'
  2025-10-24  0:05 drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb' kernel test robot
@ 2025-10-24  5:49 ` Cryolitia PukNgae
  2025-10-27 10:22   ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Cryolitia PukNgae @ 2025-10-24  5:49 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel, Guenter Roeck


> Hi Cryolitia,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   266ee584e55eed108583ab4f45b5de734522502d
> commit: 0ab88e2394392f475b8857ac82c0c987841217f8 hwmon: add GPD devices sensor driver
> date:   6 weeks ago
> config: i386-buildonly-randconfig-002-20251024 (https://download.01.org/0day-ci/archive/20251024/202510240817.vt3eQ3qL-lkp@intel.com/config)
> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251024/202510240817.vt3eQ3qL-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202510240817.vt3eQ3qL-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/hwmon/gpd-fan.c: In function 'gpd_ecram_read':
>>> drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb' [-Wimplicit-function-declaration]
>      231 |         outb(0x2E, addr_port);
>          |         ^~~~
>>> drivers/hwmon/gpd-fan.c:244:16: error: implicit declaration of function 'inb' [-Wimplicit-function-declaration]
>      244 |         *val = inb(data_port);
>          |                ^~~
> 

I don't understand...... I have already added CONFIG_HAS_IOPORT to depends. If this is not enough, what else should I do?

> 
> vim +/outb +231 drivers/hwmon/gpd-fan.c
> 
>    224	
>    225	// Helper functions to handle EC read/write
>    226	static void gpd_ecram_read(u16 offset, u8 *val)
>    227	{
>    228		u16 addr_port = gpd_driver_priv.drvdata->addr_port;
>    229		u16 data_port = gpd_driver_priv.drvdata->data_port;
>    230	
>  > 231		outb(0x2E, addr_port);
>    232		outb(0x11, data_port);
>    233		outb(0x2F, addr_port);
>    234		outb((u8)((offset >> 8) & 0xFF), data_port);
>    235	
>    236		outb(0x2E, addr_port);
>    237		outb(0x10, data_port);
>    238		outb(0x2F, addr_port);
>    239		outb((u8)(offset & 0xFF), data_port);
>    240	
>    241		outb(0x2E, addr_port);
>    242		outb(0x12, data_port);
>    243		outb(0x2F, addr_port);
>  > 244		*val = inb(data_port);
>    245	}
>    246	
> 



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

* Re: drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb'
  2025-10-24  5:49 ` Cryolitia PukNgae
@ 2025-10-27 10:22   ` Geert Uytterhoeven
  2025-10-28  2:13     ` Cryolitia PukNgae
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-10-27 10:22 UTC (permalink / raw)
  To: Cryolitia PukNgae
  Cc: kernel test robot, oe-kbuild-all, linux-kernel, Guenter Roeck

Hi Cryolitia,

On Sat, 25 Oct 2025 at 15:49, Cryolitia PukNgae <cryolitia@uniontech.com> wrote:
> > FYI, the error/warning still remains.
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   266ee584e55eed108583ab4f45b5de734522502d
> > commit: 0ab88e2394392f475b8857ac82c0c987841217f8 hwmon: add GPD devices sensor driver
> > date:   6 weeks ago
> > config: i386-buildonly-randconfig-002-20251024 (https://download.01.org/0day-ci/archive/20251024/202510240817.vt3eQ3qL-lkp@intel.com/config)
> > compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251024/202510240817.vt3eQ3qL-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202510240817.vt3eQ3qL-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> >    drivers/hwmon/gpd-fan.c: In function 'gpd_ecram_read':
> >>> drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb' [-Wimplicit-function-declaration]
> >      231 |         outb(0x2E, addr_port);
> >          |         ^~~~
> >>> drivers/hwmon/gpd-fan.c:244:16: error: implicit declaration of function 'inb' [-Wimplicit-function-declaration]
> >      244 |         *val = inb(data_port);
> >          |                ^~~
> >
>
> I don't understand...... I have already added CONFIG_HAS_IOPORT to depends. If this is not enough, what else should I do?

Missing #include <linux/io.h>?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb'
  2025-10-27 10:22   ` Geert Uytterhoeven
@ 2025-10-28  2:13     ` Cryolitia PukNgae
  0 siblings, 0 replies; 4+ messages in thread
From: Cryolitia PukNgae @ 2025-10-28  2:13 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: kernel test robot, oe-kbuild-all, linux-kernel, Guenter Roeck

> Hi Cryolitia,
> 
> On Sat, 25 Oct 2025 at 15:49, Cryolitia PukNgae <cryolitia@uniontech.com> wrote:
>>> FYI, the error/warning still remains.
>>>
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head:   266ee584e55eed108583ab4f45b5de734522502d
>>> commit: 0ab88e2394392f475b8857ac82c0c987841217f8 hwmon: add GPD devices sensor driver
>>> date:   6 weeks ago
>>> config: i386-buildonly-randconfig-002-20251024 (https://download.01.org/0day-ci/archive/20251024/202510240817.vt3eQ3qL-lkp@intel.com/config)
>>> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251024/202510240817.vt3eQ3qL-lkp@intel.com/reproduce)
>>>
>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>> the same patch/commit), kindly add following tags
>>> | Reported-by: kernel test robot <lkp@intel.com>
>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202510240817.vt3eQ3qL-lkp@intel.com/
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>    drivers/hwmon/gpd-fan.c: In function 'gpd_ecram_read':
>>>>> drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb' [-Wimplicit-function-declaration]
>>>      231 |         outb(0x2E, addr_port);
>>>          |         ^~~~
>>>>> drivers/hwmon/gpd-fan.c:244:16: error: implicit declaration of function 'inb' [-Wimplicit-function-declaration]
>>>      244 |         *val = inb(data_port);
>>>          |                ^~~
>>>
>>
>> I don't understand...... I have already added CONFIG_HAS_IOPORT to depends. If this is not enough, what else should I do?
> 
> Missing #include <linux/io.h>?
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 

It has been fixed[1] a little earlier, thanks for your help

1. https://lore.kernel.org/all/20251024202042.752160-1-krishnagopi487@gmail.com/

Greetings,
Cryolitia


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

end of thread, other threads:[~2025-10-28  2:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-24  0:05 drivers/hwmon/gpd-fan.c:231:9: error: implicit declaration of function 'outb' kernel test robot
2025-10-24  5:49 ` Cryolitia PukNgae
2025-10-27 10:22   ` Geert Uytterhoeven
2025-10-28  2:13     ` Cryolitia PukNgae

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®