Content-Type: multipart/mixed; boundary="===============1157190450388396258==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH] PCI: Waiting command completed in get_port_device_capability() Date: Fri, 07 Jan 2022 02:18:06 +0800 Message-ID: <202201070225.bx6V98r4-lkp@intel.com> In-Reply-To: <1641294736-96718-1-git-send-email-yaohongbo@linux.alibaba.com> List-Id: --===============1157190450388396258== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Yao, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on helgaas-pci/next] [also build test WARNING on v5.16-rc8 next-20220105] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Yao-Hongbo/PCI-Waiting-com= mand-completed-in-get_port_device_capability/20220104-191347 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: i386-randconfig-m021-20220106 (https://download.01.org/0day-ci/arch= ive/20220107/202201070225.bx6V98r4-lkp(a)intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot smatch warnings: drivers/pci/pcie/portdrv_core.c:226 pcie_port_disable_hp_interrupt() warn: = always true condition '(timeout >=3D 0) =3D> (0-u32max >=3D 0)' vim +226 drivers/pci/pcie/portdrv_core.c 193 = 194 static void pcie_port_disable_hp_interrupt(struct pci_dev *dev) 195 { 196 u16 slot_status; 197 u32 slot_cap; 198 unsigned long timeout =3D 1000; 199 = 200 = 201 pcie_capability_clear_word(dev, PCI_EXP_SLTCTL, 202 PCI_EXP_SLTCTL_CCIE | PCI_EXP_SLTCTL_HPIE); 203 = 204 /* 205 * If the command completed notification is not supported, 206 * we don't need to wait after writing to the slot ctrl register. 207 */ 208 pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, &slot_cap); 209 if (slot_cap & PCI_EXP_SLTCAP_NCCS) 210 return; 211 = 212 do { 213 pcie_capability_read_word(dev, PCI_EXP_SLTSTA, &slot_status); 214 if (slot_status =3D=3D (u16) ~0) { 215 pci_info(dev, "%s: no response from device\n", __func__); 216 return; 217 } 218 = 219 if (slot_status & PCI_EXP_SLTSTA_CC) { 220 pcie_capability_write_word(dev, PCI_EXP_SLTSTA, PCI_EXP_SLTSTA_CC= ); 221 return; 222 } 223 = 224 msleep(10); 225 timeout -=3D 10; > 226 } while (timeout >=3D 0); 227 = 228 pci_info(dev, "Timeout on hotplug disable interrupt!\n"); 229 } 230 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1157190450388396258==--