[linux-next:master 202/6320] drivers/soc/aspeed/aspeed-xdma.c:453:39: sparse: sparse: incorrect type in argument 1 (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>


"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@xxxxxxxxxxxxx>
:::::: CC: Joel Stanley <joel@xxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux