Hi Aurelien, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on char-misc/char-misc-testing] [also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus robh/for-next rockchip/for-next linus/master v6.1-rc4 next-20221111] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Aurelien-Jarno/hwrng-add-hwrng-support-for-Rockchip-RK3568/20221112-221212 patch link: https://lore.kernel.org/r/20221112141059.3802506-3-aurelien%40aurel32.net patch subject: [PATCH v1 2/3] hwrng: add Rockchip SoC hwrng driver config: arm64-randconfig-s043-20221113 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://github.com/intel-lab-lkp/linux/commit/f4e8d941eece86132a1f806b63d7b62178c094e0 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Aurelien-Jarno/hwrng-add-hwrng-support-for-Rockchip-RK3568/20221112-221212 git checkout f4e8d941eece86132a1f806b63d7b62178c094e0 # 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/char/hw_random/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/char/hw_random/rockchip-rng.c:134:37: sparse: sparse: cast to restricted __be32 >> drivers/char/hw_random/rockchip-rng.c:134:37: sparse: sparse: cast to restricted __be32 >> drivers/char/hw_random/rockchip-rng.c:134:37: sparse: sparse: cast to restricted __be32 >> drivers/char/hw_random/rockchip-rng.c:134:37: sparse: sparse: cast to restricted __be32 >> drivers/char/hw_random/rockchip-rng.c:134:37: sparse: sparse: cast to restricted __be32 >> drivers/char/hw_random/rockchip-rng.c:134:37: sparse: sparse: cast to restricted __be32 drivers/char/hw_random/rockchip-rng.c: note: in included file (through arch/arm64/include/asm/io.h, include/linux/io.h): include/asm-generic/io.h:379:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __le32 [usertype] @@ include/asm-generic/io.h:379:22: sparse: expected unsigned int [usertype] val include/asm-generic/io.h:379:22: sparse: got restricted __le32 [usertype] include/asm-generic/io.h:335:15: sparse: sparse: cast to restricted __le32 vim +134 drivers/char/hw_random/rockchip-rng.c 109 110 static int rk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) 111 { 112 struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng); 113 u32 reg; 114 int ret = 0; 115 int i; 116 117 pm_runtime_get_sync((struct device *) rk_rng->rng.priv); 118 119 /* Start collecting random data */ 120 reg = TRNG_RNG_CTL_START; 121 rk_rng_write_ctl(rk_rng, reg, reg); 122 123 ret = readl_poll_timeout(rk_rng->base + TRNG_RNG_CTL, reg, 124 !(reg & TRNG_RNG_CTL_START), 125 RK_RNG_POLL_PERIOD_US, 126 RK_RNG_POLL_TIMEOUT_US); 127 if (ret < 0) 128 goto out; 129 130 /* Read random data stored in big endian in the registers */ 131 ret = min_t(size_t, max, RK_RNG_MAX_BYTE); 132 for (i = 0; i < ret; i += 4) { 133 reg = readl_relaxed(rk_rng->base + TRNG_RNG_DOUT_0 + i); > 134 *(u32 *)(buf + i) = be32_to_cpu(reg); 135 } 136 137 out: 138 pm_runtime_mark_last_busy((struct device *) rk_rng->rng.priv); 139 pm_runtime_put_sync_autosuspend((struct device *) rk_rng->rng.priv); 140 141 return ret; 142 } 143 -- 0-DAY CI Kernel Test Service https://01.org/lkp