[PATCH v2 3/3] riscv: Add cache information in AUX vector

kernel test robot lkp at intel.com
Fri Aug 28 00:45:47 EDT 2020

Hi Zong,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc2 next-20200827]
[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

url:    https://github.com/0day-ci/linux/commits/Zong-Li/Get-cache-information-from-userland/20200827-162439
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 15bc20c6af4ceee97a1f90b43c0e386643c071b4
config: riscv-randconfig-s032-20200827 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
        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.2-191-g10164920-dirty
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

sparse warnings: (new ones prefixed by >>)

>> arch/riscv/kernel/cacheinfo.c:39:16: sparse: sparse: Using plain integer as NULL pointer

# https://github.com/0day-ci/linux/commit/a51c248ba0626069792c3f84c8879f685f4a1ff6
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zong-Li/Get-cache-information-from-userland/20200827-162439
git checkout a51c248ba0626069792c3f84c8879f685f4a1ff6
vim +39 arch/riscv/kernel/cacheinfo.c

    27	static struct cacheinfo *get_cacheinfo(u32 level, enum cache_type type)
    28	{
    29		struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(smp_processor_id());
    30		struct cacheinfo *this_leaf;
    31		int index;
    33		for (index = 0; index < this_cpu_ci->num_leaves; index++) {
    34			this_leaf = this_cpu_ci->info_list + index;
    35			if (this_leaf->level == level && this_leaf->type == type)
    36				return this_leaf;
    37		}
  > 39		return 0;
    40	}

0-DAY CI Kernel Test Service, Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29407 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20200828/0c0d2870/attachment.gz>

More information about the linux-riscv mailing list