* arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?
@ 2020-06-01 18:52 kbuild test robot
0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2020-06-01 18:52 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3417 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: "Kan, Liang," <kan.liang@linux.intel.com>
CC: Peter Zijlstra <peterz@infradead.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: 3442a9ecb8e72a33c28a2b969b766c659830e410 perf/x86/intel/uncore: Factor out __snr_uncore_mmio_init_box
date: 2 months ago
:::::: branch date: 19 hours ago
:::::: commit date: 2 months ago
config: x86_64-randconfig-m001-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3442a9ecb8e72a33c28a2b969b766c659830e410
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 3442a9ecb8e72a33c28a2b969b766c659830e410
vim +4394 arch/x86/events/intel/uncore_snbep.c
ee49532b38dd08 Kan Liang 2019-04-30 4382
3442a9ecb8e72a Kan Liang 2020-03-17 4383 static void __snr_uncore_mmio_init_box(struct intel_uncore_box *box,
3442a9ecb8e72a Kan Liang 2020-03-17 4384 unsigned int box_ctl, int mem_offset)
ee49532b38dd08 Kan Liang 2019-04-30 4385 {
ee49532b38dd08 Kan Liang 2019-04-30 4386 struct pci_dev *pdev = snr_uncore_get_mc_dev(box->dieid);
ee49532b38dd08 Kan Liang 2019-04-30 4387 resource_size_t addr;
ee49532b38dd08 Kan Liang 2019-04-30 4388 u32 pci_dword;
ee49532b38dd08 Kan Liang 2019-04-30 4389
ee49532b38dd08 Kan Liang 2019-04-30 4390 if (!pdev)
ee49532b38dd08 Kan Liang 2019-04-30 4391 return;
ee49532b38dd08 Kan Liang 2019-04-30 4392
ee49532b38dd08 Kan Liang 2019-04-30 4393 pci_read_config_dword(pdev, SNR_IMC_MMIO_BASE_OFFSET, &pci_dword);
ee49532b38dd08 Kan Liang 2019-04-30 @4394 addr = (pci_dword & SNR_IMC_MMIO_BASE_MASK) << 23;
ee49532b38dd08 Kan Liang 2019-04-30 4395
3442a9ecb8e72a Kan Liang 2020-03-17 4396 pci_read_config_dword(pdev, mem_offset, &pci_dword);
ee49532b38dd08 Kan Liang 2019-04-30 4397 addr |= (pci_dword & SNR_IMC_MMIO_MEM0_MASK) << 12;
ee49532b38dd08 Kan Liang 2019-04-30 4398
ee49532b38dd08 Kan Liang 2019-04-30 4399 addr += box_ctl;
ee49532b38dd08 Kan Liang 2019-04-30 4400
ee49532b38dd08 Kan Liang 2019-04-30 4401 box->io_addr = ioremap(addr, SNR_IMC_MMIO_SIZE);
ee49532b38dd08 Kan Liang 2019-04-30 4402 if (!box->io_addr)
ee49532b38dd08 Kan Liang 2019-04-30 4403 return;
ee49532b38dd08 Kan Liang 2019-04-30 4404
ee49532b38dd08 Kan Liang 2019-04-30 4405 writel(IVBEP_PMON_BOX_CTL_INT, box->io_addr);
ee49532b38dd08 Kan Liang 2019-04-30 4406 }
ee49532b38dd08 Kan Liang 2019-04-30 4407
:::::: The code at line 4394 was first introduced by commit
:::::: ee49532b38dd084650bf715eabe7e3828fb8d275 perf/x86/intel/uncore: Add IMC uncore support for Snow Ridge
:::::: TO: Kan Liang <kan.liang@linux.intel.com>
:::::: CC: Ingo Molnar <mingo@kernel.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: 37713 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?
@ 2020-06-02 10:43 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-06-02 10:43 UTC (permalink / raw)
To: kbuild, Kan, Liang,; +Cc: lkp, kbuild-all, linux-kernel, Peter Zijlstra
[-- Attachment #1: Type: text/plain, Size: 3014 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: 3442a9ecb8e72a33c28a2b969b766c659830e410 perf/x86/intel/uncore: Factor out __snr_uncore_mmio_init_box
date: 2 months ago
config: x86_64-randconfig-m001-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3442a9ecb8e72a33c28a2b969b766c659830e410
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 3442a9ecb8e72a33c28a2b969b766c659830e410
vim +4394 arch/x86/events/intel/uncore_snbep.c
3442a9ecb8e72a Kan Liang 2020-03-17 4383 static void __snr_uncore_mmio_init_box(struct intel_uncore_box *box,
3442a9ecb8e72a Kan Liang 2020-03-17 4384 unsigned int box_ctl, int mem_offset)
ee49532b38dd08 Kan Liang 2019-04-30 4385 {
ee49532b38dd08 Kan Liang 2019-04-30 4386 struct pci_dev *pdev = snr_uncore_get_mc_dev(box->dieid);
ee49532b38dd08 Kan Liang 2019-04-30 4387 resource_size_t addr;
ee49532b38dd08 Kan Liang 2019-04-30 4388 u32 pci_dword;
ee49532b38dd08 Kan Liang 2019-04-30 4389
ee49532b38dd08 Kan Liang 2019-04-30 4390 if (!pdev)
ee49532b38dd08 Kan Liang 2019-04-30 4391 return;
ee49532b38dd08 Kan Liang 2019-04-30 4392
ee49532b38dd08 Kan Liang 2019-04-30 4393 pci_read_config_dword(pdev, SNR_IMC_MMIO_BASE_OFFSET, &pci_dword);
ee49532b38dd08 Kan Liang 2019-04-30 @4394 addr = (pci_dword & SNR_IMC_MMIO_BASE_MASK) << 23;
^^^^^^^^^^^^^^^^^^^^^^
This check has a pretty high false positive rate because "pci_dword"
is unknowable but obviously SNR_IMC_MMIO_BASE_MASK << 23 is undefined.
ee49532b38dd08 Kan Liang 2019-04-30 4395
3442a9ecb8e72a Kan Liang 2020-03-17 4396 pci_read_config_dword(pdev, mem_offset, &pci_dword);
ee49532b38dd08 Kan Liang 2019-04-30 4397 addr |= (pci_dword & SNR_IMC_MMIO_MEM0_MASK) << 12;
ee49532b38dd08 Kan Liang 2019-04-30 4398
ee49532b38dd08 Kan Liang 2019-04-30 4399 addr += box_ctl;
ee49532b38dd08 Kan Liang 2019-04-30 4400
ee49532b38dd08 Kan Liang 2019-04-30 4401 box->io_addr = ioremap(addr, SNR_IMC_MMIO_SIZE);
ee49532b38dd08 Kan Liang 2019-04-30 4402 if (!box->io_addr)
ee49532b38dd08 Kan Liang 2019-04-30 4403 return;
ee49532b38dd08 Kan Liang 2019-04-30 4404
ee49532b38dd08 Kan Liang 2019-04-30 4405 writel(IVBEP_PMON_BOX_CTL_INT, box->io_addr);
ee49532b38dd08 Kan Liang 2019-04-30 4406 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37713 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?
@ 2020-06-02 10:43 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-06-02 10:43 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3068 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: 3442a9ecb8e72a33c28a2b969b766c659830e410 perf/x86/intel/uncore: Factor out __snr_uncore_mmio_init_box
date: 2 months ago
config: x86_64-randconfig-m001-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3442a9ecb8e72a33c28a2b969b766c659830e410
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 3442a9ecb8e72a33c28a2b969b766c659830e410
vim +4394 arch/x86/events/intel/uncore_snbep.c
3442a9ecb8e72a Kan Liang 2020-03-17 4383 static void __snr_uncore_mmio_init_box(struct intel_uncore_box *box,
3442a9ecb8e72a Kan Liang 2020-03-17 4384 unsigned int box_ctl, int mem_offset)
ee49532b38dd08 Kan Liang 2019-04-30 4385 {
ee49532b38dd08 Kan Liang 2019-04-30 4386 struct pci_dev *pdev = snr_uncore_get_mc_dev(box->dieid);
ee49532b38dd08 Kan Liang 2019-04-30 4387 resource_size_t addr;
ee49532b38dd08 Kan Liang 2019-04-30 4388 u32 pci_dword;
ee49532b38dd08 Kan Liang 2019-04-30 4389
ee49532b38dd08 Kan Liang 2019-04-30 4390 if (!pdev)
ee49532b38dd08 Kan Liang 2019-04-30 4391 return;
ee49532b38dd08 Kan Liang 2019-04-30 4392
ee49532b38dd08 Kan Liang 2019-04-30 4393 pci_read_config_dword(pdev, SNR_IMC_MMIO_BASE_OFFSET, &pci_dword);
ee49532b38dd08 Kan Liang 2019-04-30 @4394 addr = (pci_dword & SNR_IMC_MMIO_BASE_MASK) << 23;
^^^^^^^^^^^^^^^^^^^^^^
This check has a pretty high false positive rate because "pci_dword"
is unknowable but obviously SNR_IMC_MMIO_BASE_MASK << 23 is undefined.
ee49532b38dd08 Kan Liang 2019-04-30 4395
3442a9ecb8e72a Kan Liang 2020-03-17 4396 pci_read_config_dword(pdev, mem_offset, &pci_dword);
ee49532b38dd08 Kan Liang 2019-04-30 4397 addr |= (pci_dword & SNR_IMC_MMIO_MEM0_MASK) << 12;
ee49532b38dd08 Kan Liang 2019-04-30 4398
ee49532b38dd08 Kan Liang 2019-04-30 4399 addr += box_ctl;
ee49532b38dd08 Kan Liang 2019-04-30 4400
ee49532b38dd08 Kan Liang 2019-04-30 4401 box->io_addr = ioremap(addr, SNR_IMC_MMIO_SIZE);
ee49532b38dd08 Kan Liang 2019-04-30 4402 if (!box->io_addr)
ee49532b38dd08 Kan Liang 2019-04-30 4403 return;
ee49532b38dd08 Kan Liang 2019-04-30 4404
ee49532b38dd08 Kan Liang 2019-04-30 4405 writel(IVBEP_PMON_BOX_CTL_INT, box->io_addr);
ee49532b38dd08 Kan Liang 2019-04-30 4406 }
---
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: 37713 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?
@ 2020-06-02 10:43 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-06-02 10:43 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3068 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: 3442a9ecb8e72a33c28a2b969b766c659830e410 perf/x86/intel/uncore: Factor out __snr_uncore_mmio_init_box
date: 2 months ago
config: x86_64-randconfig-m001-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3442a9ecb8e72a33c28a2b969b766c659830e410
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 3442a9ecb8e72a33c28a2b969b766c659830e410
vim +4394 arch/x86/events/intel/uncore_snbep.c
3442a9ecb8e72a Kan Liang 2020-03-17 4383 static void __snr_uncore_mmio_init_box(struct intel_uncore_box *box,
3442a9ecb8e72a Kan Liang 2020-03-17 4384 unsigned int box_ctl, int mem_offset)
ee49532b38dd08 Kan Liang 2019-04-30 4385 {
ee49532b38dd08 Kan Liang 2019-04-30 4386 struct pci_dev *pdev = snr_uncore_get_mc_dev(box->dieid);
ee49532b38dd08 Kan Liang 2019-04-30 4387 resource_size_t addr;
ee49532b38dd08 Kan Liang 2019-04-30 4388 u32 pci_dword;
ee49532b38dd08 Kan Liang 2019-04-30 4389
ee49532b38dd08 Kan Liang 2019-04-30 4390 if (!pdev)
ee49532b38dd08 Kan Liang 2019-04-30 4391 return;
ee49532b38dd08 Kan Liang 2019-04-30 4392
ee49532b38dd08 Kan Liang 2019-04-30 4393 pci_read_config_dword(pdev, SNR_IMC_MMIO_BASE_OFFSET, &pci_dword);
ee49532b38dd08 Kan Liang 2019-04-30 @4394 addr = (pci_dword & SNR_IMC_MMIO_BASE_MASK) << 23;
^^^^^^^^^^^^^^^^^^^^^^
This check has a pretty high false positive rate because "pci_dword"
is unknowable but obviously SNR_IMC_MMIO_BASE_MASK << 23 is undefined.
ee49532b38dd08 Kan Liang 2019-04-30 4395
3442a9ecb8e72a Kan Liang 2020-03-17 4396 pci_read_config_dword(pdev, mem_offset, &pci_dword);
ee49532b38dd08 Kan Liang 2019-04-30 4397 addr |= (pci_dword & SNR_IMC_MMIO_MEM0_MASK) << 12;
ee49532b38dd08 Kan Liang 2019-04-30 4398
ee49532b38dd08 Kan Liang 2019-04-30 4399 addr += box_ctl;
ee49532b38dd08 Kan Liang 2019-04-30 4400
ee49532b38dd08 Kan Liang 2019-04-30 4401 box->io_addr = ioremap(addr, SNR_IMC_MMIO_SIZE);
ee49532b38dd08 Kan Liang 2019-04-30 4402 if (!box->io_addr)
ee49532b38dd08 Kan Liang 2019-04-30 4403 return;
ee49532b38dd08 Kan Liang 2019-04-30 4404
ee49532b38dd08 Kan Liang 2019-04-30 4405 writel(IVBEP_PMON_BOX_CTL_INT, box->io_addr);
ee49532b38dd08 Kan Liang 2019-04-30 4406 }
---
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: 37713 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-02 10:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 18:52 arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type? kbuild test robot
2020-06-02 10:43 Dan Carpenter
2020-06-02 10:43 ` Dan Carpenter
2020-06-02 10:43 ` Dan Carpenter
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.