[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202212221338.0UroUcVq-lkp@intel.com>
Date: Thu, 22 Dec 2022 14:00:23 +0800
From: kernel test robot <lkp@...el.com>
To: Maxime Ripard <maxime@...no.tech>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Florian Fainelli <f.fainelli@...il.com>
Subject: drivers/firmware/raspberrypi.c:234:17: sparse: sparse: incorrect
type in initializer (different base types)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d2f6060fe4c3b49d0cdc1dce1c99296f33379c8
commit: 40c31955e4e9ff268d21c0a8009e35f4cfaa167c firmware: raspberrypi: Provide a helper to query a clock max rate
date: 8 weeks ago
config: arm64-randconfig-s042-20221218
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=40c31955e4e9ff268d21c0a8009e35f4cfaa167c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 40c31955e4e9ff268d21c0a8009e35f4cfaa167c
# 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 olddefconfig
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/
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/raspberrypi.c:234:17: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __le32 [usertype] id @@ got unsigned int id @@
drivers/firmware/raspberrypi.c:234:17: sparse: expected restricted __le32 [usertype] id
drivers/firmware/raspberrypi.c:234:17: sparse: got unsigned int id
vim +234 drivers/firmware/raspberrypi.c
230
231 unsigned int rpi_firmware_clk_get_max_rate(struct rpi_firmware *fw, unsigned int id)
232 {
233 struct rpi_firmware_clk_rate_request msg =
> 234 RPI_FIRMWARE_CLK_RATE_REQUEST(id);
235 int ret;
236
237 ret = rpi_firmware_property(fw, RPI_FIRMWARE_GET_MAX_CLOCK_RATE,
238 &msg, sizeof(msg));
239 if (ret)
240 /*
241 * If our firmware doesn't support that operation, or fails, we
242 * assume the maximum clock rate is absolute maximum we can
243 * store over our type.
244 */
245 return UINT_MAX;
246
247 return le32_to_cpu(msg.rate);
248 }
249 EXPORT_SYMBOL_GPL(rpi_firmware_clk_get_max_rate);
250
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (184831 bytes)
Powered by blists - more mailing lists