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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202305152352.U3u7fVpS-lkp@intel.com>
Date:   Tue, 16 May 2023 00:25:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Orlando Chamberlain <orlandoch.dev@...il.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Hans de Goede <hdegoede@...hat.com>
Subject: drivers/platform/x86/apple-gmux.c:276:15: sparse: sparse: cast to
 restricted __be32

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6
commit: 0c18184de990e63f708b090bcb9fc6c0fbc427cd platform/x86: apple-gmux: support MMIO gmux on T2 Macs
date:   9 weeks ago
config: i386-randconfig-s001-20230515
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c18184de990e63f708b090bcb9fc6c0fbc427cd
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 0c18184de990e63f708b090bcb9fc6c0fbc427cd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 olddefconfig
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305152352.U3u7fVpS-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/platform/x86/apple-gmux.c:224:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:224:48: sparse:     expected void const [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:224:48: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:227:53: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:227:53: sparse:     expected void const [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:227:53: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:241:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:241:55: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:241:55: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:243:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:243:39: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:243:39: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:245:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned char [usertype] *[noderef] iomem_base @@
   drivers/platform/x86/apple-gmux.c:245:32: sparse:     expected void const [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:245:32: sparse:     got unsigned char [usertype] *[noderef] iomem_base
   drivers/platform/x86/apple-gmux.c:256:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] *[noderef] iomem_base @@
   drivers/platform/x86/apple-gmux.c:256:32: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:256:32: sparse:     got unsigned char [usertype] *[noderef] iomem_base
   drivers/platform/x86/apple-gmux.c:258:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:258:53: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:258:53: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:260:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:260:39: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:260:39: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:272:55: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:272:55: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:272:55: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:274:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:274:39: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:274:39: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:276:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned char [usertype] *[noderef] iomem_base @@
   drivers/platform/x86/apple-gmux.c:276:15: sparse:     expected void const [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:276:15: sparse:     got unsigned char [usertype] *[noderef] iomem_base
>> drivers/platform/x86/apple-gmux.c:276:15: sparse: sparse: cast to restricted __be32
>> drivers/platform/x86/apple-gmux.c:286:19: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/platform/x86/apple-gmux.c:286:19: sparse:     expected unsigned int [usertype]
   drivers/platform/x86/apple-gmux.c:286:19: sparse:     got restricted __be32 [usertype]
   drivers/platform/x86/apple-gmux.c:286:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] *[noderef] iomem_base @@
   drivers/platform/x86/apple-gmux.c:286:46: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:286:46: sparse:     got unsigned char [usertype] *[noderef] iomem_base
   drivers/platform/x86/apple-gmux.c:287:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:287:53: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:287:53: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:289:39: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem * @@     got unsigned char [usertype] * @@
   drivers/platform/x86/apple-gmux.c:289:39: sparse:     expected void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:289:39: sparse:     got unsigned char [usertype] *
   drivers/platform/x86/apple-gmux.c:739:39: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned char [usertype] *[noderef] iomem_base @@     got void [noderef] __iomem * @@
   drivers/platform/x86/apple-gmux.c:739:39: sparse:     expected unsigned char [usertype] *[noderef] iomem_base
   drivers/platform/x86/apple-gmux.c:739:39: sparse:     got void [noderef] __iomem *
   drivers/platform/x86/apple-gmux.c:889:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned char [usertype] *[noderef] iomem_base @@
   drivers/platform/x86/apple-gmux.c:889:34: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/platform/x86/apple-gmux.c:889:34: sparse:     got unsigned char [usertype] *[noderef] iomem_base
   drivers/platform/x86/apple-gmux.c:916:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned char [usertype] *[noderef] iomem_base @@
   drivers/platform/x86/apple-gmux.c:916:34: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/platform/x86/apple-gmux.c:916:34: sparse:     got unsigned char [usertype] *[noderef] iomem_base
   drivers/platform/x86/apple-gmux.c:224:26: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:227:31: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:241:33: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:243:17: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:245:23: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:256:23: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:258:31: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:260:17: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:272:33: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:274:17: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:276:15: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:286:37: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:287:31: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:289:17: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c: note: in included file:
   include/linux/apple-gmux.h:69:41: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned char [usertype] *[noderef] __iomem iomem_base @@     got void [noderef] __iomem * @@
   include/linux/apple-gmux.h:69:41: sparse:     expected unsigned char [usertype] *[noderef] __iomem iomem_base
   include/linux/apple-gmux.h:69:41: sparse:     got void [noderef] __iomem *
   include/linux/apple-gmux.h:80:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const [noderef] __iomem * @@     got unsigned char [usertype] * @@
   include/linux/apple-gmux.h:80:34: sparse:     expected void const [noderef] __iomem *
   include/linux/apple-gmux.h:80:34: sparse:     got unsigned char [usertype] *
   include/linux/apple-gmux.h:81:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned char [usertype] *[noderef] __iomem iomem_base @@
   include/linux/apple-gmux.h:81:17: sparse:     expected void volatile [noderef] __iomem *addr
   include/linux/apple-gmux.h:81:17: sparse:     got unsigned char [usertype] *[noderef] __iomem iomem_base
   include/linux/apple-gmux.h:72:14: sparse: sparse: dereference of noderef expression
   include/linux/apple-gmux.h:80:23: sparse: sparse: dereference of noderef expression
   include/linux/apple-gmux.h:81:17: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:740:22: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:888:13: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:889:25: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:915:13: sparse: sparse: dereference of noderef expression
   drivers/platform/x86/apple-gmux.c:916:25: sparse: sparse: dereference of noderef expression

vim +276 drivers/platform/x86/apple-gmux.c

   265	
   266	static u32 gmux_mmio_read32(struct apple_gmux_data *gmux_data, int port)
   267	{
   268		u32 val;
   269	
   270		mutex_lock(&gmux_data->index_lock);
   271		gmux_mmio_wait(gmux_data);
   272		iowrite8((port & 0xff), gmux_data->iomem_base + GMUX_MMIO_PORT_SELECT);
   273		iowrite8(GMUX_MMIO_READ | sizeof(val),
   274			gmux_data->iomem_base + GMUX_MMIO_COMMAND_SEND);
   275		gmux_mmio_wait(gmux_data);
 > 276		val = be32_to_cpu(ioread32(gmux_data->iomem_base));
   277		mutex_unlock(&gmux_data->index_lock);
   278	
   279		return val;
   280	}
   281	
   282	static void gmux_mmio_write32(struct apple_gmux_data *gmux_data, int port,
   283				       u32 val)
   284	{
   285		mutex_lock(&gmux_data->index_lock);
 > 286		iowrite32(cpu_to_be32(val), gmux_data->iomem_base);
   287		iowrite8(port & 0xff, gmux_data->iomem_base + GMUX_MMIO_PORT_SELECT);
   288		iowrite8(GMUX_MMIO_WRITE | sizeof(val),
   289			gmux_data->iomem_base + GMUX_MMIO_COMMAND_SEND);
   290		gmux_mmio_wait(gmux_data);
   291		mutex_unlock(&gmux_data->index_lock);
   292	}
   293	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

View attachment "config" of type "text/plain" (150064 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ