All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ionela Voinescu <ionela.voinescu@arm.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>
Subject: arch/arm64/kernel/topology.c:367:22: sparse: sparse: dereference of noderef expression
Date: Wed, 6 Jan 2021 13:50:41 +0800	[thread overview]
Message-ID: <202101061337.X7esYQdD-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
commit: 68c5debcc06d6d24f15dbf978780fc5efc147d5e arm64: implement CPPC FFH support using AMUs
date:   8 weeks ago
config: arm64-randconfig-s032-20210106 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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.3-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=68c5debcc06d6d24f15dbf978780fc5efc147d5e
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 68c5debcc06d6d24f15dbf978780fc5efc147d5e
        # 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=arm64 

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


"sparse warnings: (new ones prefixed by >>)"
>> arch/arm64/kernel/topology.c:367:22: sparse: sparse: dereference of noderef expression

vim +367 arch/arm64/kernel/topology.c

   362	
   363	int cpc_read_ffh(int cpu, struct cpc_reg *reg, u64 *val)
   364	{
   365		int ret = -EOPNOTSUPP;
   366	
 > 367		switch ((u64)reg->address) {
   368		case 0x0:
   369			ret = counters_read_on_cpu(cpu, cpu_read_corecnt, val);
   370			break;
   371		case 0x1:
   372			ret = counters_read_on_cpu(cpu, cpu_read_constcnt, val);
   373			break;
   374		}
   375	
   376		if (!ret) {
   377			*val &= GENMASK_ULL(reg->bit_offset + reg->bit_width - 1,
   378					    reg->bit_offset);
   379			*val >>= reg->bit_offset;
   380		}
   381	
   382		return ret;
   383	}
   384	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25778 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: arch/arm64/kernel/topology.c:367:22: sparse: sparse: dereference of noderef expression
Date: Wed, 06 Jan 2021 13:50:41 +0800	[thread overview]
Message-ID: <202101061337.X7esYQdD-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2139 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
commit: 68c5debcc06d6d24f15dbf978780fc5efc147d5e arm64: implement CPPC FFH support using AMUs
date:   8 weeks ago
config: arm64-randconfig-s032-20210106 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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.3-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=68c5debcc06d6d24f15dbf978780fc5efc147d5e
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 68c5debcc06d6d24f15dbf978780fc5efc147d5e
        # 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=arm64 

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


"sparse warnings: (new ones prefixed by >>)"
>> arch/arm64/kernel/topology.c:367:22: sparse: sparse: dereference of noderef expression

vim +367 arch/arm64/kernel/topology.c

   362	
   363	int cpc_read_ffh(int cpu, struct cpc_reg *reg, u64 *val)
   364	{
   365		int ret = -EOPNOTSUPP;
   366	
 > 367		switch ((u64)reg->address) {
   368		case 0x0:
   369			ret = counters_read_on_cpu(cpu, cpu_read_corecnt, val);
   370			break;
   371		case 0x1:
   372			ret = counters_read_on_cpu(cpu, cpu_read_constcnt, val);
   373			break;
   374		}
   375	
   376		if (!ret) {
   377			*val &= GENMASK_ULL(reg->bit_offset + reg->bit_width - 1,
   378					    reg->bit_offset);
   379			*val >>= reg->bit_offset;
   380		}
   381	
   382		return ret;
   383	}
   384	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25778 bytes --]

             reply	other threads:[~2021-01-06  5:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  5:50 kernel test robot [this message]
2021-01-06  5:50 ` arch/arm64/kernel/topology.c:367:22: sparse: sparse: dereference of noderef expression kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-12-17 21:00 kernel test robot
2020-12-17 21:00 ` kernel test robot
2020-12-18 10:44 ` Catalin Marinas
2020-12-18 10:44   ` Catalin Marinas
2021-01-06 15:07   ` Ionela Voinescu
2021-01-06 15:07     ` Ionela Voinescu
2021-01-06 15:21     ` Catalin Marinas
2021-01-06 15:21       ` Catalin Marinas
2021-01-06 15:52       ` Ionela Voinescu
2021-01-06 15:52         ` Ionela Voinescu
2021-01-06 16:13         ` Al Viro
2021-01-06 16:13           ` Al Viro
2021-01-06 16:47           ` Ionela Voinescu
2021-01-06 16:47             ` Ionela Voinescu
2021-01-06 17:47     ` Al Viro
2021-01-06 17:47       ` Al Viro
2021-01-06 20:12       ` Ionela Voinescu
2021-01-06 20:12         ` Ionela Voinescu
2021-01-06 20:46         ` Al Viro
2021-01-06 20:46           ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202101061337.X7esYQdD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=ionela.voinescu@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.