All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eddie James <eajames@linux.ibm.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>
Subject: [linux-next:master 202/6320] drivers/soc/aspeed/aspeed-xdma.c:453:39: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Wed, 18 Nov 2020 05:57:06 +0800	[thread overview]
Message-ID: <202011180500.Otra2iLc-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7c8ca8129ee9724cb1527895fe6dec942ef07f19
commit: 86609baa421735ab27c3b08db5bf18a96cc2132f [202/6320] soc: aspeed: xdma: Add user interface
config: alpha-randconfig-s031-20201117 (attached as .config)
compiler: alpha-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-107-gaf3512a6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=86609baa421735ab27c3b08db5bf18a96cc2132f
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 86609baa421735ab27c3b08db5bf18a96cc2132f
        # 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=alpha 

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/soc/aspeed/aspeed-xdma.c:453:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem * @@     got struct aspeed_xdma_cmd * @@
>> drivers/soc/aspeed/aspeed-xdma.c:453:39: sparse:     expected void volatile [noderef] __iomem *
   drivers/soc/aspeed/aspeed-xdma.c:453:39: sparse:     got struct aspeed_xdma_cmd *

vim +453 drivers/soc/aspeed/aspeed-xdma.c

0f6a7063f38520a Eddie James 2020-05-05  422  
0f6a7063f38520a Eddie James 2020-05-05  423  static int aspeed_xdma_start(struct aspeed_xdma *ctx, unsigned int num_cmds,
0f6a7063f38520a Eddie James 2020-05-05  424  			     struct aspeed_xdma_cmd cmds[2], bool upstream,
0f6a7063f38520a Eddie James 2020-05-05  425  			     struct aspeed_xdma_client *client)
0f6a7063f38520a Eddie James 2020-05-05  426  {
0f6a7063f38520a Eddie James 2020-05-05  427  	unsigned int i;
0f6a7063f38520a Eddie James 2020-05-05  428  	int rc = -EBUSY;
0f6a7063f38520a Eddie James 2020-05-05  429  	unsigned long flags;
0f6a7063f38520a Eddie James 2020-05-05  430  
0f6a7063f38520a Eddie James 2020-05-05  431  	spin_lock_irqsave(&ctx->engine_lock, flags);
0f6a7063f38520a Eddie James 2020-05-05  432  	if (ctx->in_reset)
0f6a7063f38520a Eddie James 2020-05-05  433  		goto unlock;
0f6a7063f38520a Eddie James 2020-05-05  434  
0f6a7063f38520a Eddie James 2020-05-05  435  	spin_lock(&ctx->client_lock);
0f6a7063f38520a Eddie James 2020-05-05  436  	if (ctx->current_client) {
0f6a7063f38520a Eddie James 2020-05-05  437  		spin_unlock(&ctx->client_lock);
0f6a7063f38520a Eddie James 2020-05-05  438  		goto unlock;
0f6a7063f38520a Eddie James 2020-05-05  439  	}
0f6a7063f38520a Eddie James 2020-05-05  440  
0f6a7063f38520a Eddie James 2020-05-05  441  	client->error = false;
0f6a7063f38520a Eddie James 2020-05-05  442  	client->in_progress = true;
0f6a7063f38520a Eddie James 2020-05-05  443  	ctx->current_client = client;
0f6a7063f38520a Eddie James 2020-05-05  444  	spin_unlock(&ctx->client_lock);
0f6a7063f38520a Eddie James 2020-05-05  445  
0f6a7063f38520a Eddie James 2020-05-05  446  	ctx->upstream = upstream;
0f6a7063f38520a Eddie James 2020-05-05  447  	for (i = 0; i < num_cmds; ++i) {
0f6a7063f38520a Eddie James 2020-05-05  448  		/*
0f6a7063f38520a Eddie James 2020-05-05  449  		 * Use memcpy_toio here to get some barriers before starting
0f6a7063f38520a Eddie James 2020-05-05  450  		 * the operation. The command(s) need to be in physical memory
0f6a7063f38520a Eddie James 2020-05-05  451  		 * before the XDMA engine starts.
0f6a7063f38520a Eddie James 2020-05-05  452  		 */
0f6a7063f38520a Eddie James 2020-05-05 @453  		memcpy_toio(&ctx->cmdq[ctx->cmd_idx], &cmds[i],
0f6a7063f38520a Eddie James 2020-05-05  454  			    sizeof(struct aspeed_xdma_cmd));
0f6a7063f38520a Eddie James 2020-05-05  455  		ctx->cmd_idx = (ctx->cmd_idx + 1) % XDMA_NUM_CMDS;
0f6a7063f38520a Eddie James 2020-05-05  456  	}
0f6a7063f38520a Eddie James 2020-05-05  457  
0f6a7063f38520a Eddie James 2020-05-05  458  	aspeed_xdma_writel(ctx, ctx->chip->regs.bmc_cmdq_writep,
0f6a7063f38520a Eddie James 2020-05-05  459  			   ctx->cmd_idx * ctx->chip->queue_entry_size);
0f6a7063f38520a Eddie James 2020-05-05  460  	rc = 0;
0f6a7063f38520a Eddie James 2020-05-05  461  
0f6a7063f38520a Eddie James 2020-05-05  462  unlock:
0f6a7063f38520a Eddie James 2020-05-05  463  	spin_unlock_irqrestore(&ctx->engine_lock, flags);
0f6a7063f38520a Eddie James 2020-05-05  464  	return rc;
0f6a7063f38520a Eddie James 2020-05-05  465  }
0f6a7063f38520a Eddie James 2020-05-05  466  

:::::: The code at line 453 was first introduced by commit
:::::: 0f6a7063f38520a50bd2c9ed02f00e3d8646c2ad soc: aspeed: Add XDMA Engine Driver

:::::: TO: Eddie James <eajames@linux.ibm.com>
:::::: CC: Joel Stanley <joel@jms.id.au>

---
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: 34526 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 202/6320] drivers/soc/aspeed/aspeed-xdma.c:453:39: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Wed, 18 Nov 2020 05:57:06 +0800	[thread overview]
Message-ID: <202011180500.Otra2iLc-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7c8ca8129ee9724cb1527895fe6dec942ef07f19
commit: 86609baa421735ab27c3b08db5bf18a96cc2132f [202/6320] soc: aspeed: xdma: Add user interface
config: alpha-randconfig-s031-20201117 (attached as .config)
compiler: alpha-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-107-gaf3512a6-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=86609baa421735ab27c3b08db5bf18a96cc2132f
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 86609baa421735ab27c3b08db5bf18a96cc2132f
        # 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=alpha 

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/soc/aspeed/aspeed-xdma.c:453:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem * @@     got struct aspeed_xdma_cmd * @@
>> drivers/soc/aspeed/aspeed-xdma.c:453:39: sparse:     expected void volatile [noderef] __iomem *
   drivers/soc/aspeed/aspeed-xdma.c:453:39: sparse:     got struct aspeed_xdma_cmd *

vim +453 drivers/soc/aspeed/aspeed-xdma.c

0f6a7063f38520a Eddie James 2020-05-05  422  
0f6a7063f38520a Eddie James 2020-05-05  423  static int aspeed_xdma_start(struct aspeed_xdma *ctx, unsigned int num_cmds,
0f6a7063f38520a Eddie James 2020-05-05  424  			     struct aspeed_xdma_cmd cmds[2], bool upstream,
0f6a7063f38520a Eddie James 2020-05-05  425  			     struct aspeed_xdma_client *client)
0f6a7063f38520a Eddie James 2020-05-05  426  {
0f6a7063f38520a Eddie James 2020-05-05  427  	unsigned int i;
0f6a7063f38520a Eddie James 2020-05-05  428  	int rc = -EBUSY;
0f6a7063f38520a Eddie James 2020-05-05  429  	unsigned long flags;
0f6a7063f38520a Eddie James 2020-05-05  430  
0f6a7063f38520a Eddie James 2020-05-05  431  	spin_lock_irqsave(&ctx->engine_lock, flags);
0f6a7063f38520a Eddie James 2020-05-05  432  	if (ctx->in_reset)
0f6a7063f38520a Eddie James 2020-05-05  433  		goto unlock;
0f6a7063f38520a Eddie James 2020-05-05  434  
0f6a7063f38520a Eddie James 2020-05-05  435  	spin_lock(&ctx->client_lock);
0f6a7063f38520a Eddie James 2020-05-05  436  	if (ctx->current_client) {
0f6a7063f38520a Eddie James 2020-05-05  437  		spin_unlock(&ctx->client_lock);
0f6a7063f38520a Eddie James 2020-05-05  438  		goto unlock;
0f6a7063f38520a Eddie James 2020-05-05  439  	}
0f6a7063f38520a Eddie James 2020-05-05  440  
0f6a7063f38520a Eddie James 2020-05-05  441  	client->error = false;
0f6a7063f38520a Eddie James 2020-05-05  442  	client->in_progress = true;
0f6a7063f38520a Eddie James 2020-05-05  443  	ctx->current_client = client;
0f6a7063f38520a Eddie James 2020-05-05  444  	spin_unlock(&ctx->client_lock);
0f6a7063f38520a Eddie James 2020-05-05  445  
0f6a7063f38520a Eddie James 2020-05-05  446  	ctx->upstream = upstream;
0f6a7063f38520a Eddie James 2020-05-05  447  	for (i = 0; i < num_cmds; ++i) {
0f6a7063f38520a Eddie James 2020-05-05  448  		/*
0f6a7063f38520a Eddie James 2020-05-05  449  		 * Use memcpy_toio here to get some barriers before starting
0f6a7063f38520a Eddie James 2020-05-05  450  		 * the operation. The command(s) need to be in physical memory
0f6a7063f38520a Eddie James 2020-05-05  451  		 * before the XDMA engine starts.
0f6a7063f38520a Eddie James 2020-05-05  452  		 */
0f6a7063f38520a Eddie James 2020-05-05 @453  		memcpy_toio(&ctx->cmdq[ctx->cmd_idx], &cmds[i],
0f6a7063f38520a Eddie James 2020-05-05  454  			    sizeof(struct aspeed_xdma_cmd));
0f6a7063f38520a Eddie James 2020-05-05  455  		ctx->cmd_idx = (ctx->cmd_idx + 1) % XDMA_NUM_CMDS;
0f6a7063f38520a Eddie James 2020-05-05  456  	}
0f6a7063f38520a Eddie James 2020-05-05  457  
0f6a7063f38520a Eddie James 2020-05-05  458  	aspeed_xdma_writel(ctx, ctx->chip->regs.bmc_cmdq_writep,
0f6a7063f38520a Eddie James 2020-05-05  459  			   ctx->cmd_idx * ctx->chip->queue_entry_size);
0f6a7063f38520a Eddie James 2020-05-05  460  	rc = 0;
0f6a7063f38520a Eddie James 2020-05-05  461  
0f6a7063f38520a Eddie James 2020-05-05  462  unlock:
0f6a7063f38520a Eddie James 2020-05-05  463  	spin_unlock_irqrestore(&ctx->engine_lock, flags);
0f6a7063f38520a Eddie James 2020-05-05  464  	return rc;
0f6a7063f38520a Eddie James 2020-05-05  465  }
0f6a7063f38520a Eddie James 2020-05-05  466  

:::::: The code at line 453 was first introduced by commit
:::::: 0f6a7063f38520a50bd2c9ed02f00e3d8646c2ad soc: aspeed: Add XDMA Engine Driver

:::::: TO: Eddie James <eajames@linux.ibm.com>
:::::: CC: Joel Stanley <joel@jms.id.au>

---
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: 34526 bytes --]

             reply	other threads:[~2020-11-17 21:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 21:57 kernel test robot [this message]
2020-11-17 21:57 ` [linux-next:master 202/6320] drivers/soc/aspeed/aspeed-xdma.c:453:39: sparse: sparse: incorrect type in argument 1 (different address spaces) 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=202011180500.Otra2iLc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@aj.id.au \
    --cc=eajames@linux.ibm.com \
    --cc=joel@jms.id.au \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    /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.