arch/sh/include/cpu-sh3/cpu/dac.h:21:13: error: implicit declaration of function '__raw_readb'

From: kernel test robot

Date: Fri Apr 03 2026 - 04:46:46 EST


Hi Thomas,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5619b098e2fbf3a23bf13d91897056a1fe238c6d
commit: 243ce64b2b371cdf2cbc39c9422cb3047cab6de7 backlight: Do not include <linux/fb.h> in header file
date: 5 months ago
config: sh-randconfig-001-20260403 (https://download.01.org/0day-ci/archive/20260403/202604030505.CPHQZWDA-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260403/202604030505.CPHQZWDA-lkp@xxxxxxxxx/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
| Fixes: 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604030505.CPHQZWDA-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from drivers/video/backlight/hp680_bl.c:20:
arch/sh/include/cpu-sh3/cpu/dac.h: In function 'sh_dac_enable':
>> arch/sh/include/cpu-sh3/cpu/dac.h:21:13: error: implicit declaration of function '__raw_readb' [-Werror=implicit-function-declaration]
21 | v = __raw_readb(DACR);
| ^~~~~~~~~~~
>> arch/sh/include/cpu-sh3/cpu/dac.h:24:9: error: implicit declaration of function '__raw_writeb'; did you mean '__raw_write_lock'? [-Werror=implicit-function-declaration]
24 | __raw_writeb(v,DACR);
| ^~~~~~~~~~~~
| __raw_write_lock
cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for OF_GPIO
Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
Selected by [y]:
- GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X || COMPILE_TEST [=y])
WARNING: unmet direct dependencies detected for I2C_K1
Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && OF [=n]
Selected by [m]:
- MFD_SPACEMIT_P1 [=m] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST [=y]) && I2C [=y]


vim +/__raw_readb +21 arch/sh/include/cpu-sh3/cpu/dac.h

^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 16
^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 17
^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 18 static __inline__ void sh_dac_enable(int channel)
^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 19 {
^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 20 unsigned char v;
9d56dd3b083a3b arch/sh/include/cpu-sh3/cpu/dac.h Paul Mundt 2010-01-26 @21 v = __raw_readb(DACR);
^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 22 if(channel) v |= DACR_DAOE1;
^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 23 else v |= DACR_DAOE0;
9d56dd3b083a3b arch/sh/include/cpu-sh3/cpu/dac.h Paul Mundt 2010-01-26 @24 __raw_writeb(v,DACR);
^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 25 }
^1da177e4c3f41 include/asm-sh/cpu-sh3/dac.h Linus Torvalds 2005-04-16 26

:::::: The code at line 21 was first introduced by commit
:::::: 9d56dd3b083a3bec56e9da35ce07baca81030b03 sh: Mass ctrl_in/outX to __raw_read/writeX conversion.

:::::: TO: Paul Mundt <lethal@xxxxxxxxxxxx>
:::::: CC: Paul Mundt <lethal@xxxxxxxxxxxx>

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