lkml.org 
[lkml]   [2020]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3e08a95294a4fb3702bb3d35ed08028433c37fe6
commit: 631e83bf7c0e801f0ab960a97a3228b2dbf9ebeb net: dsa: vsc73xx: add support for parallel mode
date: 12 months ago
config: alpha-randconfig-s031-20200624 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-dirty
git checkout 631e83bf7c0e801f0ab960a97a3228b2dbf9ebeb
# save the attached .config to linux build tree
make W=1 C=1 ARCH=alpha CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:68:16: sparse: sparse: cast to restricted __be32
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:83:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] b @@ got restricted __be32 [usertype] @@
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:83:9: sparse: expected unsigned int [usertype] b
>> drivers/net/dsa/vitesse-vsc73xx-platform.c:83:9: sparse: got restricted __be32 [usertype]
arch/alpha/include/uapi/asm/swab.h:29:14: sparse: sparse: undefined identifier '__builtin_alpha_inslh'
arch/alpha/include/uapi/asm/swab.h:30:14: sparse: sparse: undefined identifier '__builtin_alpha_inswl'
arch/alpha/include/uapi/asm/swab.h:29:14: sparse: sparse: not a function <noident>
arch/alpha/include/uapi/asm/swab.h:30:14: sparse: sparse: not a function <noident>

vim +68 drivers/net/dsa/vitesse-vsc73xx-platform.c

54
55 static int vsc73xx_platform_read(struct vsc73xx *vsc, u8 block, u8 subblock,
56 u8 reg, u32 *val)
57 {
58 struct vsc73xx_platform *vsc_platform = vsc->priv;
59 u32 offset;
60
61 if (!vsc73xx_is_addr_valid(block, subblock))
62 return -EINVAL;
63
64 offset = vsc73xx_make_addr(block, subblock, reg);
65 /* By default vsc73xx running in big-endian mode.
66 * (See "Register Addressing" section 5.5.3 in the VSC7385 manual.)
67 */
> 68 *val = ioread32be(vsc_platform->base_addr + offset);
69
70 return 0;
71 }
72
73 static int vsc73xx_platform_write(struct vsc73xx *vsc, u8 block, u8 subblock,
74 u8 reg, u32 val)
75 {
76 struct vsc73xx_platform *vsc_platform = vsc->priv;
77 u32 offset;
78
79 if (!vsc73xx_is_addr_valid(block, subblock))
80 return -EINVAL;
81
82 offset = vsc73xx_make_addr(block, subblock, reg);
> 83 iowrite32be(val, vsc_platform->base_addr + offset);
84
85 return 0;
86 }
87

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-06-24 19:52    [W:0.030 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site