Hi shiyongbang,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: fb3a7131883be36037affebc26a6597087cbd012 commit: 97663f80b4826fcd792deef824b18510e139d674 [15329/21565] gpu: hibmc: Fix stuck when switch GUI to text. config: arm64-randconfig-001-20240112 (https://download.01.org/0day-ci/archive/20240123/202401230904.waKHfYdD-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240123/202401230904.waKHfYdD-lkp@i...)
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/202401230904.waKHfYdD-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:40:13: warning: no previous prototype for 'hibmc_drm_interrupt' [-Wmissing-prototypes] 40 | irqreturn_t hibmc_drm_interrupt(int irq, void *arg) | ^~~~~~~~~~~~~~~~~~~ In function 'hibmc_remove_framebuffers', inlined from 'hibmc_pci_probe' at drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:386:2:
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:66:19: warning: array subscript 0 is outside array bounds of 'struct aperture[0]' [-Warray-bounds=]
66 | ap->ranges[0].base = pci_resource_start(pdev, 0); | ~~~~~~~~~~^~~ In file included from include/drm/drm_crtc.h:31, from include/drm/drm_atomic_helper.h:31, from drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:22: include/linux/fb.h: In function 'hibmc_pci_probe': include/linux/fb.h:527:19: note: while referencing 'ranges' 527 | } ranges[0]; | ^~~~~~ In function 'hibmc_remove_framebuffers', inlined from 'hibmc_pci_probe' at drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:386:2: drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:67:19: warning: array subscript 0 is outside array bounds of 'struct aperture[0]' [-Warray-bounds=] 67 | ap->ranges[0].size = pci_resource_len(pdev, 0); | ~~~~~~~~~~^~~ include/linux/fb.h: In function 'hibmc_pci_probe': include/linux/fb.h:527:19: note: while referencing 'ranges' 527 | } ranges[0]; | ^~~~~~
vim +66 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
57 58 static void hibmc_remove_framebuffers(struct pci_dev *pdev) 59 { 60 struct apertures_struct *ap; 61 62 ap = alloc_apertures(1); 63 if (!ap) 64 return; 65
66 ap->ranges[0].base = pci_resource_start(pdev, 0);
67 ap->ranges[0].size = pci_resource_len(pdev, 0); 68 69 drm_fb_helper_remove_conflicting_framebuffers(ap, "hibmcdrmfb", false); 70 71 kfree(ap); 72 } 73