* [arnd-playground:warnings-5.10-2 49/55] drivers/gpu/drm/kmb/kmb_plane.c:128:20: warning: array subscript 3 is above array bounds of 'struct
@ 2020-11-24 20:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-24 20:27 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5827 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git warnings-5.10-2
head: 6bf755201c867bd34e151e90a111722f74bd91cf
commit: bc440d869326e303a9e77f5b9369b9b2636caf67 [49/55] Kbuild: enable more warnings by default
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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/arnd/playground.git/commit/?id=bc440d869326e303a9e77f5b9369b9b2636caf67
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground warnings-5.10-2
git checkout bc440d869326e303a9e77f5b9369b9b2636caf67
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/build_bug.h:5,
from include/linux/bits.h:22,
from include/linux/ioport.h:13,
from include/linux/acpi.h:12,
from include/linux/i2c.h:13,
from include/drm/drm_crtc.h:28,
from include/drm/drm_atomic.h:31,
from drivers/gpu/drm/kmb/kmb_plane.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra]
174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c: In function 'kmb_plane_atomic_disable':
>> drivers/gpu/drm/kmb/kmb_plane.c:128:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
128 | kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:125:20: warning: array subscript 2 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
125 | kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/kmb/kmb_plane.c:122:20: warning: array subscript 1 is above array bounds of 'struct layer_status[1]' [-Warray-bounds]
122 | kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL2_ENABLE;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
vim +128 drivers/gpu/drm/kmb/kmb_plane.c
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 107
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 108 static void kmb_plane_atomic_disable(struct drm_plane *plane,
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 109 struct drm_plane_state *state)
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 110 {
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 111 struct kmb_plane *kmb_plane = to_kmb_plane(plane);
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 112 int plane_id = kmb_plane->id;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 113 struct kmb_drm_private *kmb;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 114
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 115 kmb = to_kmb(plane->dev);
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 116
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 117 switch (plane_id) {
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 118 case LAYER_0:
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 119 kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL1_ENABLE;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 120 break;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 121 case LAYER_1:
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 122 kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL2_ENABLE;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 123 break;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 124 case LAYER_2:
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 125 kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL1_ENABLE;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 126 break;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 127 case LAYER_3:
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 @128 kmb->plane_status[plane_id].ctrl = LCD_CTRL_GL2_ENABLE;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 129 break;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 130 }
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 131
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 132 kmb->plane_status[plane_id].disable = true;
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 133 }
7f7b96a8a0a185a Anitha Chrisanthus 2020-11-04 134
:::::: The code at line 128 was first introduced by commit
:::::: 7f7b96a8a0a185ad8b15ee1cf042f75aa1430c30 drm/kmb: Add support for KeemBay Display
:::::: TO: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
:::::: CC: Sam Ravnborg <sam@ravnborg.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 59265 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-24 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 20:27 [arnd-playground:warnings-5.10-2 49/55] drivers/gpu/drm/kmb/kmb_plane.c:128:20: warning: array subscript 3 is above array bounds of 'struct kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.