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>] [day] [month] [year] [list]
Message-ID: <202207301723.oloLOHki-lkp@intel.com>
Date:   Sat, 30 Jul 2022 17:26:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Thierry Reding <treding@...dia.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/firmware/tegra/bpmp.c:505:53: sparse: sparse: incorrect type
 in initializer (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e65c6a46df94c8d76ea1129eb2d4564670c6f214
commit: bd778b893963d67d7eb01f49d84ffcd3eaf229dd firmware: tegra: bpmp: Fix Tegra234-only builds
date:   1 year, 2 months ago
config: arm64-randconfig-s051-20220730 (https://download.01.org/0day-ci/archive/20220730/202207301723.oloLOHki-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bd778b893963d67d7eb01f49d84ffcd3eaf229dd
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout bd778b893963d67d7eb01f49d84ffcd3eaf229dd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/firmware/tegra/

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

sparse warnings: (new ones prefixed by >>)
>> drivers/firmware/tegra/bpmp.c:505:53: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] mrq @@     got restricted __le32 [usertype] @@
   drivers/firmware/tegra/bpmp.c:505:53: sparse:     expected unsigned int [usertype] mrq
   drivers/firmware/tegra/bpmp.c:505:53: sparse:     got restricted __le32 [usertype]

vim +505 drivers/firmware/tegra/bpmp.c

983de5f97169ab5 Thierry Reding 2016-08-19  502  
d78b5bde0ffc33d Timo Alho      2018-10-22  503  bool tegra_bpmp_mrq_is_supported(struct tegra_bpmp *bpmp, unsigned int mrq)
d78b5bde0ffc33d Timo Alho      2018-10-22  504  {
d78b5bde0ffc33d Timo Alho      2018-10-22 @505  	struct mrq_query_abi_request req = { .mrq = cpu_to_le32(mrq) };
d78b5bde0ffc33d Timo Alho      2018-10-22  506  	struct mrq_query_abi_response resp;
d78b5bde0ffc33d Timo Alho      2018-10-22  507  	struct tegra_bpmp_message msg = {
d78b5bde0ffc33d Timo Alho      2018-10-22  508  		.mrq = MRQ_QUERY_ABI,
d78b5bde0ffc33d Timo Alho      2018-10-22  509  		.tx = {
d78b5bde0ffc33d Timo Alho      2018-10-22  510  			.data = &req,
d78b5bde0ffc33d Timo Alho      2018-10-22  511  			.size = sizeof(req),
d78b5bde0ffc33d Timo Alho      2018-10-22  512  		},
d78b5bde0ffc33d Timo Alho      2018-10-22  513  		.rx = {
d78b5bde0ffc33d Timo Alho      2018-10-22  514  			.data = &resp,
d78b5bde0ffc33d Timo Alho      2018-10-22  515  			.size = sizeof(resp),
d78b5bde0ffc33d Timo Alho      2018-10-22  516  		},
d78b5bde0ffc33d Timo Alho      2018-10-22  517  	};
edb2bca2ac48ad5 Jon Hunter     2020-07-12  518  	int err;
d78b5bde0ffc33d Timo Alho      2018-10-22  519  
edb2bca2ac48ad5 Jon Hunter     2020-07-12  520  	err = tegra_bpmp_transfer(bpmp, &msg);
edb2bca2ac48ad5 Jon Hunter     2020-07-12  521  	if (err || msg.rx.ret)
d78b5bde0ffc33d Timo Alho      2018-10-22  522  		return false;
d78b5bde0ffc33d Timo Alho      2018-10-22  523  
d78b5bde0ffc33d Timo Alho      2018-10-22  524  	return resp.status == 0;
d78b5bde0ffc33d Timo Alho      2018-10-22  525  }
d78b5bde0ffc33d Timo Alho      2018-10-22  526  EXPORT_SYMBOL_GPL(tegra_bpmp_mrq_is_supported);
d78b5bde0ffc33d Timo Alho      2018-10-22  527  

:::::: The code at line 505 was first introduced by commit
:::::: d78b5bde0ffc33d20f014b3ad4d7aaac8b79d34e firmware: tegra: Add helper to check for supported MRQs

:::::: TO: Timo Alho <talho@...dia.com>
:::::: CC: Thierry Reding <treding@...dia.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ