public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Subbaraya Sundeep <sbhatta@marvell.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Geetha sowjanya <gakula@marvell.com>,
	Sunil Goutham <sgoutham@marvell.com>
Subject: drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1964:46: sparse: sparse: cast removes address space '__iomem' of expression
Date: Sat, 12 Mar 2022 16:03:32 +0800	[thread overview]
Message-ID: <202203121536.7EHHGIrm-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   68453767131a5deec1e8f9ac92a9042f929e585d
commit: 98c5611163603d3d8012b1bf64ab48fd932cf734 octeontx2-af: cn10k: Add mbox support for CN10K platform
date:   1 year, 1 month ago
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20220312/202203121536.7EHHGIrm-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.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-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=98c5611163603d3d8012b1bf64ab48fd932cf734
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 98c5611163603d3d8012b1bf64ab48fd932cf734
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/tegra/ drivers/gpu/host1x/ drivers/hid/ drivers/irqchip/ drivers/net/ethernet/marvell/octeontx2/af/ drivers/net/ethernet/ti/ drivers/remoteproc/ drivers/scsi/hisi_sas/ security/integrity/ima/

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 >>)
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:780:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct rvu_fwdata *fwdata @@     got void [noderef] __iomem * @@
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:780:21: sparse:     expected struct rvu_fwdata *fwdata
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:780:21: sparse:     got void [noderef] __iomem *
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:786:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got struct rvu_fwdata *fwdata @@
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:786:28: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:786:28: sparse:     got struct rvu_fwdata *fwdata
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:799:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got struct rvu_fwdata *fwdata @@
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:799:28: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:799:28: sparse:     got struct rvu_fwdata *fwdata
>> drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1964:46: sparse: sparse: cast removes address space '__iomem' of expression
   drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1984:38: sparse: sparse: cast removes address space '__iomem' of expression

vim +/__iomem +1964 drivers/net/ethernet/marvell/octeontx2/af/rvu.c

  1941	
  1942	static int rvu_get_mbox_regions(struct rvu *rvu, void **mbox_addr,
  1943					int num, int type)
  1944	{
  1945		struct rvu_hwinfo *hw = rvu->hw;
  1946		int region;
  1947		u64 bar4;
  1948	
  1949		/* For cn10k platform VF mailbox regions of a PF follows after the
  1950		 * PF <-> AF mailbox region. Whereas for Octeontx2 it is read from
  1951		 * RVU_PF_VF_BAR4_ADDR register.
  1952		 */
  1953		if (type == TYPE_AFVF) {
  1954			for (region = 0; region < num; region++) {
  1955				if (hw->cap.per_pf_mbox_regs) {
  1956					bar4 = rvu_read64(rvu, BLKADDR_RVUM,
  1957							  RVU_AF_PFX_BAR4_ADDR(0)) +
  1958							  MBOX_SIZE;
  1959					bar4 += region * MBOX_SIZE;
  1960				} else {
  1961					bar4 = rvupf_read64(rvu, RVU_PF_VF_BAR4_ADDR);
  1962					bar4 += region * MBOX_SIZE;
  1963				}
> 1964				mbox_addr[region] = (void *)ioremap_wc(bar4, MBOX_SIZE);
  1965				if (!mbox_addr[region])
  1966					goto error;
  1967			}
  1968			return 0;
  1969		}
  1970	
  1971		/* For cn10k platform AF <-> PF mailbox region of a PF is read from per
  1972		 * PF registers. Whereas for Octeontx2 it is read from
  1973		 * RVU_AF_PF_BAR4_ADDR register.
  1974		 */
  1975		for (region = 0; region < num; region++) {
  1976			if (hw->cap.per_pf_mbox_regs) {
  1977				bar4 = rvu_read64(rvu, BLKADDR_RVUM,
  1978						  RVU_AF_PFX_BAR4_ADDR(region));
  1979			} else {
  1980				bar4 = rvu_read64(rvu, BLKADDR_RVUM,
  1981						  RVU_AF_PF_BAR4_ADDR);
  1982				bar4 += region * MBOX_SIZE;
  1983			}
  1984			mbox_addr[region] = (void *)ioremap_wc(bar4, MBOX_SIZE);
  1985			if (!mbox_addr[region])
  1986				goto error;
  1987		}
  1988		return 0;
  1989	
  1990	error:
  1991		while (region--)
  1992			iounmap((void __iomem *)mbox_addr[region]);
  1993		return -ENOMEM;
  1994	}
  1995	

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

             reply	other threads:[~2022-03-12  8:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-12  8:03 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-27 17:59 drivers/net/ethernet/marvell/octeontx2/af/rvu.c:1964:46: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
2022-02-21 23:30 kernel test robot

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=202203121536.7EHHGIrm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gakula@marvell.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox