[mingo-tip:master 2294/2300] drivers/video/fbdev/bt431.h:210:17: error: implicit declaration of function 'DIV_ROUND_UP'

From: kernel test robot
Date: Sat Jan 08 2022 - 16:22:50 EST


tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git master
head: 4e348e961395297bb17f101cc63bc133d8a348e9
commit: a35948847a1e0bf875f580f821cb871ce16d4c60 [2294/2300] headers/deps: time: Optimize <linux/time64.h> dependencies, remove <linux/time64_api.h> inclusion
config: mips-decstation_defconfig (https://download.01.org/0day-ci/archive/20220109/202201090404.fXkl0j7u-lkp@xxxxxxxxx/config)
compiler: mipsel-linux-gcc (GCC) 11.2.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=a35948847a1e0bf875f580f821cb871ce16d4c60
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip master
git checkout a35948847a1e0bf875f580f821cb871ce16d4c60
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from drivers/video/fbdev/pmag-aa-fb.c:44:
drivers/video/fbdev/bt431.h: In function 'bt431_set_cursor':
>> drivers/video/fbdev/bt431.h:210:17: error: implicit declaration of function 'DIV_ROUND_UP' [-Werror=implicit-function-declaration]
210 | width = DIV_ROUND_UP(width, 8);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +/DIV_ROUND_UP +210 drivers/video/fbdev/bt431.h

^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 201
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 202 static inline void bt431_set_cursor(struct bt431_regs *regs,
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 203 const char *data, const char *mask,
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 204 u16 rop, u16 width, u16 height)
^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 205 {
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 206 u16 x, y;
^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 207 int i;
^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 208
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 209 i = 0;
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 @210 width = DIV_ROUND_UP(width, 8);
^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 211 bt431_select_reg(regs, BT431_REG_CRAM_BASE);
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 212 for (y = 0; y < BT431_CURSOR_SIZE; y++)
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 213 for (x = 0; x < BT431_CURSOR_SIZE / 8; x++) {
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 214 u16 val = 0;
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 215
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 216 if (y < height && x < width) {
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 217 val = mask[i];
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 218 if (rop == ROP_XOR)
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 219 val = (val << 8) | (val ^ data[i]);
^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 220 else
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 221 val = (val << 8) | (val & data[i]);
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 222 i++;
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 223 }
90c83176e5cfa6 drivers/video/fbdev/bt431.h Maciej W. Rozycki 2016-02-22 224 bt431_write_cmap_inc(regs, val);
^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 225 }
^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 226 }
^1da177e4c3f41 drivers/video/bt431.h Linus Torvalds 2005-04-16 227

:::::: The code at line 210 was first introduced by commit
:::::: 90c83176e5cfa666bb2e7643d74ca87e08e171cb video: fbdev: pmag-aa-fb: Adapt to current APIs

:::::: TO: Maciej W. Rozycki <macro@xxxxxxxxxxxxxx>
:::::: CC: Tomi Valkeinen <tomi.valkeinen@xxxxxx>

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