All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-stable-rc:linux-4.14.y 1048/1674] drivers/i2c/busses/i2c-meson.c:443:47: sparse: sparse: cast truncates bits from constant value (3fffffffff00 becomes ffffff00)
@ 2020-12-02  6:59 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-02  6:59 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 12164 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head:   07930d77d7baeac481d5ec4b88f8b26ac810c4bd
commit: 95ee9fe59ec81b2ff3205d34bf9854bdbe56a743 [1048/1674] i2c: meson: fix clock setting overwrite
config: h8300-randconfig-s032-20201202 (attached as .config)
compiler: h8300-linux-gcc (GCC) 7.5.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.3-170-g3bc348f6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=95ee9fe59ec81b2ff3205d34bf9854bdbe56a743
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-4.14.y
        git checkout 95ee9fe59ec81b2ff3205d34bf9854bdbe56a743
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=h8300 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '<asn:2>' of expression
   arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] b @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] b
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c:146:43: sparse: sparse: cast truncates bits from constant value (3ffffffffff000 becomes fffff000)
   drivers/i2c/busses/i2c-meson.c:149:43: sparse: sparse: cast truncates bits from constant value (3ffffffff0000000 becomes f0000000)
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '<asn:2>' of expression
   arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '<asn:2>' of expression
   arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] b @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] b
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] b @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] b
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] b @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] b
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:163:22: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] b @@     got restricted __le32 [usertype] @@
   include/asm-generic/io.h:163:22: sparse:     expected unsigned int [usertype] b
   include/asm-generic/io.h:163:22: sparse:     got restricted __le32 [usertype]
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:44:11: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c: note: in included file (through arch/h8300/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   include/asm-generic/io.h:129:16: sparse: sparse: cast to restricted __le32
   drivers/i2c/busses/i2c-meson.c: note: in included file (through include/linux/io.h, include/linux/irq.h, include/asm-generic/hardirq.h, ...):
   arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '<asn:2>' of expression
   arch/h8300/include/asm/io.h:26:18: sparse: sparse: cast removes address space '<asn:2>' of expression
   drivers/i2c/busses/i2c-meson.c:283:49: sparse: sparse: cast truncates bits from constant value (ffffffffff becomes ffffffff)
>> drivers/i2c/busses/i2c-meson.c:443:47: sparse: sparse: cast truncates bits from constant value (3fffffffff00 becomes ffffff00)

vim +443 drivers/i2c/busses/i2c-meson.c

   371	
   372	static int meson_i2c_probe(struct platform_device *pdev)
   373	{
   374		struct device_node *np = pdev->dev.of_node;
   375		struct meson_i2c *i2c;
   376		struct resource *mem;
   377		struct i2c_timings timings;
   378		int irq, ret = 0;
   379	
   380		i2c = devm_kzalloc(&pdev->dev, sizeof(struct meson_i2c), GFP_KERNEL);
   381		if (!i2c)
   382			return -ENOMEM;
   383	
   384		i2c_parse_fw_timings(&pdev->dev, &timings, true);
   385	
   386		i2c->dev = &pdev->dev;
   387		platform_set_drvdata(pdev, i2c);
   388	
   389		spin_lock_init(&i2c->lock);
   390		init_completion(&i2c->done);
   391	
   392		i2c->clk = devm_clk_get(&pdev->dev, NULL);
   393		if (IS_ERR(i2c->clk)) {
   394			dev_err(&pdev->dev, "can't get device clock\n");
   395			return PTR_ERR(i2c->clk);
   396		}
   397	
   398		mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   399		i2c->regs = devm_ioremap_resource(&pdev->dev, mem);
   400		if (IS_ERR(i2c->regs))
   401			return PTR_ERR(i2c->regs);
   402	
   403		irq = platform_get_irq(pdev, 0);
   404		if (irq < 0) {
   405			dev_err(&pdev->dev, "can't find IRQ\n");
   406			return irq;
   407		}
   408	
   409		ret = devm_request_irq(&pdev->dev, irq, meson_i2c_irq, 0, NULL, i2c);
   410		if (ret < 0) {
   411			dev_err(&pdev->dev, "can't request IRQ\n");
   412			return ret;
   413		}
   414	
   415		ret = clk_prepare(i2c->clk);
   416		if (ret < 0) {
   417			dev_err(&pdev->dev, "can't prepare clock\n");
   418			return ret;
   419		}
   420	
   421		strlcpy(i2c->adap.name, "Meson I2C adapter",
   422			sizeof(i2c->adap.name));
   423		i2c->adap.owner = THIS_MODULE;
   424		i2c->adap.algo = &meson_i2c_algorithm;
   425		i2c->adap.dev.parent = &pdev->dev;
   426		i2c->adap.dev.of_node = np;
   427		i2c->adap.algo_data = i2c;
   428	
   429		/*
   430		 * A transfer is triggered when START bit changes from 0 to 1.
   431		 * Ensure that the bit is set to 0 after probe
   432		 */
   433		meson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_START, 0);
   434	
   435		ret = i2c_add_adapter(&i2c->adap);
   436		if (ret < 0) {
   437			clk_unprepare(i2c->clk);
   438			return ret;
   439		}
   440	
   441		/* Disable filtering */
   442		meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
 > 443				   REG_SLV_SDA_FILTER | REG_SLV_SCL_FILTER, 0);
   444	
   445		meson_i2c_set_clk_div(i2c, timings.bus_freq_hz);
   446	
   447		return 0;
   448	}
   449	

---
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: 19647 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-02  6:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02  6:59 [linux-stable-rc:linux-4.14.y 1048/1674] drivers/i2c/busses/i2c-meson.c:443:47: sparse: sparse: cast truncates bits from constant value (3fffffffff00 becomes ffffff00) kernel test robot

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.