lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 15 Mar 2019 23:49:56 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Andrey Smirnov <andrew.smirnov@...il.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Subject: drivers/pci/controller/dwc/pcie-designware.c:309:52: sparse: cast
 truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f261c4e529dac5608a604d3dd3ae1cd2adf23c89
commit: 0e11faa48b07a063289d65363015a3d51ca4c337 PCI: dwc: Make use of BIT() in constant definitions
date:   2 weeks ago
reproduce:
        # apt-get install sparse
        git checkout 0e11faa48b07a063289d65363015a3d51ca4c337
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'


sparse warnings: (new ones prefixed by >>)

>> drivers/pci/controller/dwc/pcie-designware.c:309:52: sparse: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)

vim +309 drivers/pci/controller/dwc/pcie-designware.c

   291	
   292	void dw_pcie_disable_atu(struct dw_pcie *pci, int index,
   293				 enum dw_pcie_region_type type)
   294	{
   295		int region;
   296	
   297		switch (type) {
   298		case DW_PCIE_REGION_INBOUND:
   299			region = PCIE_ATU_REGION_INBOUND;
   300			break;
   301		case DW_PCIE_REGION_OUTBOUND:
   302			region = PCIE_ATU_REGION_OUTBOUND;
   303			break;
   304		default:
   305			return;
   306		}
   307	
   308		dw_pcie_writel_dbi(pci, PCIE_ATU_VIEWPORT, region | index);
 > 309		dw_pcie_writel_dbi(pci, PCIE_ATU_CR2, (u32)~PCIE_ATU_ENABLE);
   310	}
   311	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists