[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211012207.tPHyMYzc-lkp@intel.com>
Date: Tue, 1 Nov 2022 22:18:48 +0800
From: kernel test robot <lkp@...el.com>
To: Gwan-gyeong Mun <gwan-gyeong.mun@...el.com>,
ndesaulniers@...gle.com
Cc: oe-kbuild-all@...ts.linux.dev, peterz@...radead.org,
llvm@...ts.linux.dev, ashutosh.dixit@...el.com,
andi.shyti@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bitfield: Use argument type for size comparison on
Bitfield access macros
Hi Gwan-gyeong,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.1-rc3 next-20221101]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Gwan-gyeong-Mun/bitfield-Use-argument-type-for-size-comparison-on-Bitfield-access-macros/20221029-133640
patch link: https://lore.kernel.org/r/20221029053429.38381-1-gwan-gyeong.mun%40intel.com
patch subject: [PATCH] bitfield: Use argument type for size comparison on Bitfield access macros
config: ia64-randconfig-s043-20221031
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/91f22fce5cc0639c001bcf755c9dec0913073876
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Gwan-gyeong-Mun/bitfield-Use-argument-type-for-size-comparison-on-Bitfield-access-macros/20221029-133640
git checkout 91f22fce5cc0639c001bcf755c9dec0913073876
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/pci/controller/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/pci/controller/pcie-brcmstb.c:1059:15: sparse: sparse: cast truncates bits from constant value (ffff0001 becomes 1)
drivers/pci/controller/pcie-brcmstb.c:1060:15: sparse: sparse: cast truncates bits from constant value (ffff0001 becomes 1)
vim +1059 drivers/pci/controller/pcie-brcmstb.c
0693b4207fd73c Jim Quinlan 2022-07-25 1022
0693b4207fd73c Jim Quinlan 2022-07-25 1023 static int brcm_pcie_start_link(struct brcm_pcie *pcie)
0693b4207fd73c Jim Quinlan 2022-07-25 1024 {
0693b4207fd73c Jim Quinlan 2022-07-25 1025 struct device *dev = pcie->dev;
0693b4207fd73c Jim Quinlan 2022-07-25 1026 void __iomem *base = pcie->base;
0693b4207fd73c Jim Quinlan 2022-07-25 1027 u16 nlw, cls, lnksta;
0693b4207fd73c Jim Quinlan 2022-07-25 1028 bool ssc_good = false;
0693b4207fd73c Jim Quinlan 2022-07-25 1029 u32 tmp;
0693b4207fd73c Jim Quinlan 2022-07-25 1030 int ret, i;
0693b4207fd73c Jim Quinlan 2022-07-25 1031
0693b4207fd73c Jim Quinlan 2022-07-25 1032 /* Unassert the fundamental reset */
0693b4207fd73c Jim Quinlan 2022-07-25 1033 pcie->perst_set(pcie, 0);
f4fd559de3434c Bjorn Helgaas 2022-05-11 1034
f4fd559de3434c Bjorn Helgaas 2022-05-11 1035 /*
0693b4207fd73c Jim Quinlan 2022-07-25 1036 * Give the RC/EP time to wake up, before trying to configure RC.
0693b4207fd73c Jim Quinlan 2022-07-25 1037 * Intermittently check status for link-up, up to a total of 100ms.
f4fd559de3434c Bjorn Helgaas 2022-05-11 1038 */
0693b4207fd73c Jim Quinlan 2022-07-25 1039 for (i = 0; i < 100 && !brcm_pcie_link_up(pcie); i += 5)
0693b4207fd73c Jim Quinlan 2022-07-25 1040 msleep(5);
0693b4207fd73c Jim Quinlan 2022-07-25 1041
0693b4207fd73c Jim Quinlan 2022-07-25 1042 if (!brcm_pcie_link_up(pcie)) {
0693b4207fd73c Jim Quinlan 2022-07-25 1043 dev_err(dev, "link down\n");
0693b4207fd73c Jim Quinlan 2022-07-25 1044 return -ENODEV;
0693b4207fd73c Jim Quinlan 2022-07-25 1045 }
0693b4207fd73c Jim Quinlan 2022-07-25 1046
0693b4207fd73c Jim Quinlan 2022-07-25 1047 if (pcie->gen)
0693b4207fd73c Jim Quinlan 2022-07-25 1048 brcm_pcie_set_gen(pcie, pcie->gen);
f4fd559de3434c Bjorn Helgaas 2022-05-11 1049
c0452137034bda Jim Quinlan 2019-12-16 1050 if (pcie->ssc) {
c0452137034bda Jim Quinlan 2019-12-16 1051 ret = brcm_pcie_set_ssc(pcie);
c0452137034bda Jim Quinlan 2019-12-16 1052 if (ret == 0)
c0452137034bda Jim Quinlan 2019-12-16 1053 ssc_good = true;
c0452137034bda Jim Quinlan 2019-12-16 1054 else
c0452137034bda Jim Quinlan 2019-12-16 1055 dev_err(dev, "failed attempt to enter ssc mode\n");
c0452137034bda Jim Quinlan 2019-12-16 1056 }
c0452137034bda Jim Quinlan 2019-12-16 1057
c0452137034bda Jim Quinlan 2019-12-16 1058 lnksta = readw(base + BRCM_PCIE_CAP_REGS + PCI_EXP_LNKSTA);
c0452137034bda Jim Quinlan 2019-12-16 @1059 cls = FIELD_GET(PCI_EXP_LNKSTA_CLS, lnksta);
c0452137034bda Jim Quinlan 2019-12-16 1060 nlw = FIELD_GET(PCI_EXP_LNKSTA_NLW, lnksta);
c0452137034bda Jim Quinlan 2019-12-16 1061 dev_info(dev, "link up, %s x%u %s\n",
6348a34dcb98d8 Bjorn Helgaas 2020-02-28 1062 pci_speed_string(pcie_link_speed[cls]), nlw,
6348a34dcb98d8 Bjorn Helgaas 2020-02-28 1063 ssc_good ? "(SSC)" : "(!SSC)");
c0452137034bda Jim Quinlan 2019-12-16 1064
c0452137034bda Jim Quinlan 2019-12-16 1065 /*
c0452137034bda Jim Quinlan 2019-12-16 1066 * Refclk from RC should be gated with CLKREQ# input when ASPM L0s,L1
c0452137034bda Jim Quinlan 2019-12-16 1067 * is enabled => setting the CLKREQ_DEBUG_ENABLE field to 1.
c0452137034bda Jim Quinlan 2019-12-16 1068 */
c0452137034bda Jim Quinlan 2019-12-16 1069 tmp = readl(base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
c0452137034bda Jim Quinlan 2019-12-16 1070 tmp |= PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK;
c0452137034bda Jim Quinlan 2019-12-16 1071 writel(tmp, base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
c0452137034bda Jim Quinlan 2019-12-16 1072
c0452137034bda Jim Quinlan 2019-12-16 1073 return 0;
c0452137034bda Jim Quinlan 2019-12-16 1074 }
c0452137034bda Jim Quinlan 2019-12-16 1075
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (159423 bytes)
Powered by blists - more mailing lists