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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201906250307.M3Y3iuDk%lkp@intel.com>
Date:   Tue, 25 Jun 2019 03:39:47 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Marek Vasut <marex@...x.de>
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        Marek Vasut <marex@...x.de>, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Tristram Ha <Tristram.Ha@...rochip.com>,
        Woojung Huh <Woojung.Huh@...rochip.com>
Subject: Re: [PATCH V3 07/10] net: dsa: microchip: Initial SPI regmap support

Hi Marek,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]
[also build test WARNING on v5.2-rc6 next-20190621]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Marek-Vasut/net-dsa-microchip-Convert-to-regmap/20190625-021215
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/net/dsa/microchip/ksz9477_spi.c:44:9: sparse: sparse: incorrect type in initializer (different base types) @@    expected unsigned long read_flag_mask @@    got restricted __beunsigned long read_flag_mask @@
>> drivers/net/dsa/microchip/ksz9477_spi.c:44:9: sparse:    expected unsigned long read_flag_mask
   drivers/net/dsa/microchip/ksz9477_spi.c:44:9: sparse:    got restricted __be32 [usertype]
>> drivers/net/dsa/microchip/ksz9477_spi.c:44:9: sparse: sparse: incorrect type in initializer (different base types) @@    expected unsigned long write_flag_mask @@    got restricted __beunsigned long write_flag_mask @@
>> drivers/net/dsa/microchip/ksz9477_spi.c:44:9: sparse:    expected unsigned long write_flag_mask
   drivers/net/dsa/microchip/ksz9477_spi.c:44:9: sparse:    got restricted __be32 [usertype]
   drivers/net/dsa/microchip/ksz9477_spi.c:45:9: sparse: sparse: incorrect type in initializer (different base types) @@    expected unsigned long read_flag_mask @@    got restricted __beunsigned long read_flag_mask @@
   drivers/net/dsa/microchip/ksz9477_spi.c:45:9: sparse:    expected unsigned long read_flag_mask
   drivers/net/dsa/microchip/ksz9477_spi.c:45:9: sparse:    got restricted __be32 [usertype]
   drivers/net/dsa/microchip/ksz9477_spi.c:45:9: sparse: sparse: incorrect type in initializer (different base types) @@    expected unsigned long write_flag_mask @@    got restricted __beunsigned long write_flag_mask @@
   drivers/net/dsa/microchip/ksz9477_spi.c:45:9: sparse:    expected unsigned long write_flag_mask
   drivers/net/dsa/microchip/ksz9477_spi.c:45:9: sparse:    got restricted __be32 [usertype]
   drivers/net/dsa/microchip/ksz9477_spi.c:46:9: sparse: sparse: incorrect type in initializer (different base types) @@    expected unsigned long read_flag_mask @@    got restricted __beunsigned long read_flag_mask @@
   drivers/net/dsa/microchip/ksz9477_spi.c:46:9: sparse:    expected unsigned long read_flag_mask
   drivers/net/dsa/microchip/ksz9477_spi.c:46:9: sparse:    got restricted __be32 [usertype]
   drivers/net/dsa/microchip/ksz9477_spi.c:46:9: sparse: sparse: incorrect type in initializer (different base types) @@    expected unsigned long write_flag_mask @@    got restricted __beunsigned long write_flag_mask @@
   drivers/net/dsa/microchip/ksz9477_spi.c:46:9: sparse:    expected unsigned long write_flag_mask
   drivers/net/dsa/microchip/ksz9477_spi.c:46:9: sparse:    got restricted __be32 [usertype]
   drivers/net/dsa/microchip/ksz9477_spi.c:52:31: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct regmap *map @@    got sstruct regmap *map @@
   drivers/net/dsa/microchip/ksz9477_spi.c:52:31: sparse:    expected struct regmap *map
   drivers/net/dsa/microchip/ksz9477_spi.c:52:31: sparse:    got struct regmap **
   drivers/net/dsa/microchip/ksz9477_spi.c:60:36: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct regmap *map @@    got sstruct regmap *map @@
   drivers/net/dsa/microchip/ksz9477_spi.c:60:36: sparse:    expected struct regmap *map
   drivers/net/dsa/microchip/ksz9477_spi.c:60:36: sparse:    got struct regmap **
   drivers/net/dsa/microchip/ksz9477_spi.c:63:24: sparse: sparse: cast to restricted __be16
   drivers/net/dsa/microchip/ksz9477_spi.c:63:24: sparse: sparse: cast to restricted __be16
   drivers/net/dsa/microchip/ksz9477_spi.c:63:24: sparse: sparse: cast to restricted __be16
   drivers/net/dsa/microchip/ksz9477_spi.c:63:24: sparse: sparse: cast to restricted __be16
   drivers/net/dsa/microchip/ksz9477_spi.c:70:36: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct regmap *map @@    got sstruct regmap *map @@
   drivers/net/dsa/microchip/ksz9477_spi.c:70:36: sparse:    expected struct regmap *map
   drivers/net/dsa/microchip/ksz9477_spi.c:70:36: sparse:    got struct regmap **
   drivers/net/dsa/microchip/ksz9477_spi.c:73:24: sparse: sparse: cast to restricted __be32
   drivers/net/dsa/microchip/ksz9477_spi.c:73:24: sparse: sparse: cast to restricted __be32
   drivers/net/dsa/microchip/ksz9477_spi.c:73:24: sparse: sparse: cast to restricted __be32
   drivers/net/dsa/microchip/ksz9477_spi.c:73:24: sparse: sparse: cast to restricted __be32
   drivers/net/dsa/microchip/ksz9477_spi.c:73:24: sparse: sparse: cast to restricted __be32
   drivers/net/dsa/microchip/ksz9477_spi.c:73:24: sparse: sparse: cast to restricted __be32
   drivers/net/dsa/microchip/ksz9477_spi.c:80:29: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct regmap *map @@    got sstruct regmap *map @@
   drivers/net/dsa/microchip/ksz9477_spi.c:80:29: sparse:    expected struct regmap *map
   drivers/net/dsa/microchip/ksz9477_spi.c:80:29: sparse:    got struct regmap **
   drivers/net/dsa/microchip/ksz9477_spi.c:85:15: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] value @@    got resunsigned short [usertype] value @@
   drivers/net/dsa/microchip/ksz9477_spi.c:85:15: sparse:    expected unsigned short [usertype] value
   drivers/net/dsa/microchip/ksz9477_spi.c:85:15: sparse:    got restricted __be16 [usertype]
   drivers/net/dsa/microchip/ksz9477_spi.c:86:34: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct regmap *map @@    got sstruct regmap *map @@
   drivers/net/dsa/microchip/ksz9477_spi.c:86:34: sparse:    expected struct regmap *map
   drivers/net/dsa/microchip/ksz9477_spi.c:86:34: sparse:    got struct regmap **
   drivers/net/dsa/microchip/ksz9477_spi.c:91:15: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] value @@    got restrunsigned int [usertype] value @@
   drivers/net/dsa/microchip/ksz9477_spi.c:91:15: sparse:    expected unsigned int [usertype] value
   drivers/net/dsa/microchip/ksz9477_spi.c:91:15: sparse:    got restricted __be32 [usertype]
   drivers/net/dsa/microchip/ksz9477_spi.c:92:34: sparse: sparse: incorrect type in argument 1 (different base types) @@    expected struct regmap *map @@    got sstruct regmap *map @@
   drivers/net/dsa/microchip/ksz9477_spi.c:92:34: sparse:    expected struct regmap *map
   drivers/net/dsa/microchip/ksz9477_spi.c:92:34: sparse:    got struct regmap **

vim +44 drivers/net/dsa/microchip/ksz9477_spi.c

    25	
    26	#define KS_SPIOP_FLAG_MASK(opcode)		\
    27		cpu_to_be32((opcode) << (SPI_ADDR_SHIFT + SPI_TURNAROUND_SHIFT))
    28	
    29	#define KSZ_REGMAP_COMMON(width)					\
    30		{								\
    31			.val_bits = (width),					\
    32			.reg_stride = (width) / 8,				\
    33			.reg_bits = SPI_ADDR_SHIFT + SPI_ADDR_ALIGN,		\
    34			.pad_bits = SPI_TURNAROUND_SHIFT,			\
    35			.max_register = BIT(SPI_ADDR_SHIFT) - 1,		\
    36			.cache_type = REGCACHE_NONE,				\
    37			.read_flag_mask = KS_SPIOP_FLAG_MASK(KS_SPIOP_RD),	\
    38			.write_flag_mask = KS_SPIOP_FLAG_MASK(KS_SPIOP_WR),	\
    39			.reg_format_endian = REGMAP_ENDIAN_BIG,			\
    40			.val_format_endian = REGMAP_ENDIAN_BIG			\
    41		}
    42	
    43	static const struct regmap_config ksz9477_regmap_config[] = {
  > 44		KSZ_REGMAP_COMMON(8),
    45		KSZ_REGMAP_COMMON(16),
    46		KSZ_REGMAP_COMMON(32),
    47	};
    48	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ