tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/msi-fixes-6.2 head: 3113a942aa6ffe63ed5ba9920d27904ec112deff commit: 7851bc057c9237e8101ddb819a37b88c61529adc [1/2] genirq/msi: Check for the presence of an irq domain when validating msi_ctrl config: x86_64-rhel-8.3-bpf compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=7851bc057c9237e8101ddb819a37b88c61529adc git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git git fetch --no-tags arm-platforms irq/msi-fixes-6.2 git checkout 7851bc057c9237e8101ddb819a37b88c61529adc # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 olddefconfig make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/irq/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): kernel/irq/msi.c: In function 'msi_ctrl_valid': kernel/irq/msi.c:170:17: error: expected ')' before 'return' 170 | return false; | ^~~~~~ kernel/irq/msi.c:167:12: note: to match this '(' 167 | if (WARN_ON_ONCE(ctrl->domid >= MSI_MAX_DEVICE_IRQDOMAINS || | ^ kernel/irq/msi.c:178:1: error: expected expression before '}' token 178 | } | ^ >> kernel/irq/msi.c:165:22: warning: unused variable 'hwsize' [-Wunused-variable] 165 | unsigned int hwsize; | ^~~~~~ kernel/irq/msi.c:178:1: error: no return statement in function returning non-void [-Werror=return-type] 178 | } | ^ cc1: some warnings being treated as errors vim +/hwsize +165 kernel/irq/msi.c 602905253607ba Thomas Gleixner 2021-12-06 162 377712c5a45f6d Thomas Gleixner 2022-11-25 163 static bool msi_ctrl_valid(struct device *dev, struct msi_ctrl *ctrl) 377712c5a45f6d Thomas Gleixner 2022-11-25 164 { 36db3d9003ea85 Thomas Gleixner 2022-11-25 @165 unsigned int hwsize; 36db3d9003ea85 Thomas Gleixner 2022-11-25 166 377712c5a45f6d Thomas Gleixner 2022-11-25 167 if (WARN_ON_ONCE(ctrl->domid >= MSI_MAX_DEVICE_IRQDOMAINS || 7851bc057c9237 Marc Zyngier 2022-12-16 168 (dev->msi.domain && 36db3d9003ea85 Thomas Gleixner 2022-11-25 169 !dev->msi.data->__domains[ctrl->domid].domain)) 36db3d9003ea85 Thomas Gleixner 2022-11-25 170 return false; 36db3d9003ea85 Thomas Gleixner 2022-11-25 171 36db3d9003ea85 Thomas Gleixner 2022-11-25 172 hwsize = msi_domain_get_hwsize(dev, ctrl->domid); 36db3d9003ea85 Thomas Gleixner 2022-11-25 173 if (WARN_ON_ONCE(ctrl->first > ctrl->last || 36db3d9003ea85 Thomas Gleixner 2022-11-25 174 ctrl->first >= hwsize || 36db3d9003ea85 Thomas Gleixner 2022-11-25 175 ctrl->last >= hwsize)) 377712c5a45f6d Thomas Gleixner 2022-11-25 176 return false; 377712c5a45f6d Thomas Gleixner 2022-11-25 177 return true; 377712c5a45f6d Thomas Gleixner 2022-11-25 178 } 377712c5a45f6d Thomas Gleixner 2022-11-25 179 :::::: The code at line 165 was first introduced by commit :::::: 36db3d9003ea85217b357a658cf7b37920c2c38e genirq/msi: Add range checking to msi_insert_desc() :::::: TO: Thomas Gleixner :::::: CC: Thomas Gleixner -- 0-DAY CI Kernel Test Service https://01.org/lkp