Re: [PATCH v2] staging: rts5208: Fix checkpath warning

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

 



Hi SAI,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190830]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/P-SAI-PRASANTH/staging-rts5208-Fix-checkpath-warning/20190831-034841
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/staging//rts5208/rtsx_transport.c: In function 'rtsx_transfer_sglist_adma':
>> drivers/staging//rts5208/rtsx_transport.c:548:4: error: expected ';' before 'rtsx_add_sg_tbl'
       rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option);
       ^~~~~~~~~~~~~~~

vim +548 drivers/staging//rts5208/rtsx_transport.c

fa590c222fbaa4 Micky Ching       2013-11-12  479  
fa590c222fbaa4 Micky Ching       2013-11-12  480  static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card,
fa590c222fbaa4 Micky Ching       2013-11-12  481  				     struct scatterlist *sg, int num_sg,
d1303c1a9a68e5 Shaun Ren         2016-02-15  482  				     enum dma_data_direction dma_dir,
d1303c1a9a68e5 Shaun Ren         2016-02-15  483  				     int timeout)
fa590c222fbaa4 Micky Ching       2013-11-12  484  {
fa590c222fbaa4 Micky Ching       2013-11-12  485  	struct rtsx_dev *rtsx = chip->rtsx;
fa590c222fbaa4 Micky Ching       2013-11-12  486  	struct completion trans_done;
fa590c222fbaa4 Micky Ching       2013-11-12  487  	u8 dir;
fa590c222fbaa4 Micky Ching       2013-11-12  488  	int buf_cnt, i;
fa590c222fbaa4 Micky Ching       2013-11-12  489  	int err = 0;
fa590c222fbaa4 Micky Ching       2013-11-12  490  	long timeleft;
fa590c222fbaa4 Micky Ching       2013-11-12  491  	struct scatterlist *sg_ptr;
fa590c222fbaa4 Micky Ching       2013-11-12  492  
50dcad2a2c85d5 Shaun Ren         2016-02-15  493  	if (!sg || (num_sg <= 0))
fa590c222fbaa4 Micky Ching       2013-11-12  494  		return -EIO;
fa590c222fbaa4 Micky Ching       2013-11-12  495  
fa590c222fbaa4 Micky Ching       2013-11-12  496  	if (dma_dir == DMA_TO_DEVICE)
fa590c222fbaa4 Micky Ching       2013-11-12  497  		dir = HOST_TO_DEVICE;
fa590c222fbaa4 Micky Ching       2013-11-12  498  	else if (dma_dir == DMA_FROM_DEVICE)
fa590c222fbaa4 Micky Ching       2013-11-12  499  		dir = DEVICE_TO_HOST;
fa590c222fbaa4 Micky Ching       2013-11-12  500  	else
fa590c222fbaa4 Micky Ching       2013-11-12  501  		return -ENXIO;
fa590c222fbaa4 Micky Ching       2013-11-12  502  
fa590c222fbaa4 Micky Ching       2013-11-12  503  	if (card == SD_CARD)
fa590c222fbaa4 Micky Ching       2013-11-12  504  		rtsx->check_card_cd = SD_EXIST;
fa590c222fbaa4 Micky Ching       2013-11-12  505  	else if (card == MS_CARD)
fa590c222fbaa4 Micky Ching       2013-11-12  506  		rtsx->check_card_cd = MS_EXIST;
fa590c222fbaa4 Micky Ching       2013-11-12  507  	else if (card == XD_CARD)
fa590c222fbaa4 Micky Ching       2013-11-12  508  		rtsx->check_card_cd = XD_EXIST;
fa590c222fbaa4 Micky Ching       2013-11-12  509  	else
fa590c222fbaa4 Micky Ching       2013-11-12  510  		rtsx->check_card_cd = 0;
fa590c222fbaa4 Micky Ching       2013-11-12  511  
fa590c222fbaa4 Micky Ching       2013-11-12  512  	spin_lock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  513  
fa590c222fbaa4 Micky Ching       2013-11-12  514  	/* set up data structures for the wakeup system */
fa590c222fbaa4 Micky Ching       2013-11-12  515  	rtsx->done = &trans_done;
fa590c222fbaa4 Micky Ching       2013-11-12  516  
fa590c222fbaa4 Micky Ching       2013-11-12  517  	rtsx->trans_state = STATE_TRANS_SG;
fa590c222fbaa4 Micky Ching       2013-11-12  518  	rtsx->trans_result = TRANS_NOT_READY;
fa590c222fbaa4 Micky Ching       2013-11-12  519  
fa590c222fbaa4 Micky Ching       2013-11-12  520  	spin_unlock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  521  
69e3bc543c5610 Shaun Ren         2016-02-15  522  	buf_cnt = dma_map_sg(&rtsx->pci->dev, sg, num_sg, dma_dir);
fa590c222fbaa4 Micky Ching       2013-11-12  523  
fa590c222fbaa4 Micky Ching       2013-11-12  524  	sg_ptr = sg;
fa590c222fbaa4 Micky Ching       2013-11-12  525  
fa590c222fbaa4 Micky Ching       2013-11-12  526  	for (i = 0; i <= buf_cnt / (HOST_SG_TBL_BUF_LEN / 8); i++) {
fa590c222fbaa4 Micky Ching       2013-11-12  527  		u32 val = TRIG_DMA;
fa590c222fbaa4 Micky Ching       2013-11-12  528  		int sg_cnt, j;
fa590c222fbaa4 Micky Ching       2013-11-12  529  
fa590c222fbaa4 Micky Ching       2013-11-12  530  		if (i == buf_cnt / (HOST_SG_TBL_BUF_LEN / 8))
fa590c222fbaa4 Micky Ching       2013-11-12  531  			sg_cnt = buf_cnt % (HOST_SG_TBL_BUF_LEN / 8);
fa590c222fbaa4 Micky Ching       2013-11-12  532  		else
9fd4af8ab48a14 Tina Johnson      2014-10-25  533  			sg_cnt = HOST_SG_TBL_BUF_LEN / 8;
fa590c222fbaa4 Micky Ching       2013-11-12  534  
fa590c222fbaa4 Micky Ching       2013-11-12  535  		chip->sgi = 0;
fa590c222fbaa4 Micky Ching       2013-11-12  536  		for (j = 0; j < sg_cnt; j++) {
fa590c222fbaa4 Micky Ching       2013-11-12  537  			dma_addr_t addr = sg_dma_address(sg_ptr);
fa590c222fbaa4 Micky Ching       2013-11-12  538  			unsigned int len = sg_dma_len(sg_ptr);
fa590c222fbaa4 Micky Ching       2013-11-12  539  			u8 option;
fa590c222fbaa4 Micky Ching       2013-11-12  540  
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  541  			dev_dbg(rtsx_dev(chip), "DMA addr: 0x%x, Len: 0x%x\n",
fa590c222fbaa4 Micky Ching       2013-11-12  542  				(unsigned int)addr, len);
fa590c222fbaa4 Micky Ching       2013-11-12  543  
b5d013bc09e9e7 Arnd Bergmann     2018-03-01  544  			option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;
da59abd45efc2a P SAI PRASANTH    2019-08-30  545  			if (j == (sg_cnt - 1))
da59abd45efc2a P SAI PRASANTH    2019-08-30  546  				option |= RTSX_SG_END
fa590c222fbaa4 Micky Ching       2013-11-12  547  
fa590c222fbaa4 Micky Ching       2013-11-12 @548  			rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option);
fa590c222fbaa4 Micky Ching       2013-11-12  549  
fa590c222fbaa4 Micky Ching       2013-11-12  550  			sg_ptr = sg_next(sg_ptr);
fa590c222fbaa4 Micky Ching       2013-11-12  551  		}
fa590c222fbaa4 Micky Ching       2013-11-12  552  
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  553  		dev_dbg(rtsx_dev(chip), "SG table count = %d\n", chip->sgi);
fa590c222fbaa4 Micky Ching       2013-11-12  554  
fa590c222fbaa4 Micky Ching       2013-11-12  555  		val |= (u32)(dir & 0x01) << 29;
fa590c222fbaa4 Micky Ching       2013-11-12  556  		val |= ADMA_MODE;
fa590c222fbaa4 Micky Ching       2013-11-12  557  
fa590c222fbaa4 Micky Ching       2013-11-12  558  		spin_lock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  559  
fa590c222fbaa4 Micky Ching       2013-11-12  560  		init_completion(&trans_done);
fa590c222fbaa4 Micky Ching       2013-11-12  561  
fa590c222fbaa4 Micky Ching       2013-11-12  562  		rtsx_writel(chip, RTSX_HDBAR, chip->host_sg_tbl_addr);
fa590c222fbaa4 Micky Ching       2013-11-12  563  		rtsx_writel(chip, RTSX_HDBCTLR, val);
fa590c222fbaa4 Micky Ching       2013-11-12  564  
fa590c222fbaa4 Micky Ching       2013-11-12  565  		spin_unlock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  566  
fa590c222fbaa4 Micky Ching       2013-11-12  567  		timeleft = wait_for_completion_interruptible_timeout(
9df56d9bdeeae1 Nicholas Mc Guire 2015-01-23  568  			&trans_done, msecs_to_jiffies(timeout));
fa590c222fbaa4 Micky Ching       2013-11-12  569  		if (timeleft <= 0) {
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  570  			dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n",
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  571  				__func__, __LINE__);
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  572  			dev_dbg(rtsx_dev(chip), "chip->int_reg = 0x%x\n",
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  573  				chip->int_reg);
fa590c222fbaa4 Micky Ching       2013-11-12  574  			err = -ETIMEDOUT;
fa590c222fbaa4 Micky Ching       2013-11-12  575  			goto out;
fa590c222fbaa4 Micky Ching       2013-11-12  576  		}
fa590c222fbaa4 Micky Ching       2013-11-12  577  
fa590c222fbaa4 Micky Ching       2013-11-12  578  		spin_lock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  579  		if (rtsx->trans_result == TRANS_RESULT_FAIL) {
fa590c222fbaa4 Micky Ching       2013-11-12  580  			err = -EIO;
fa590c222fbaa4 Micky Ching       2013-11-12  581  			spin_unlock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  582  			goto out;
fa590c222fbaa4 Micky Ching       2013-11-12  583  		}
fa590c222fbaa4 Micky Ching       2013-11-12  584  		spin_unlock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  585  
fa590c222fbaa4 Micky Ching       2013-11-12  586  		sg_ptr += sg_cnt;
fa590c222fbaa4 Micky Ching       2013-11-12  587  	}
fa590c222fbaa4 Micky Ching       2013-11-12  588  
fa590c222fbaa4 Micky Ching       2013-11-12  589  	/* Wait for TRANS_OK_INT */
fa590c222fbaa4 Micky Ching       2013-11-12  590  	spin_lock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  591  	if (rtsx->trans_result == TRANS_NOT_READY) {
fa590c222fbaa4 Micky Ching       2013-11-12  592  		init_completion(&trans_done);
fa590c222fbaa4 Micky Ching       2013-11-12  593  		spin_unlock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  594  		timeleft = wait_for_completion_interruptible_timeout(
9df56d9bdeeae1 Nicholas Mc Guire 2015-01-23  595  			&trans_done, msecs_to_jiffies(timeout));
fa590c222fbaa4 Micky Ching       2013-11-12  596  		if (timeleft <= 0) {
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  597  			dev_dbg(rtsx_dev(chip), "Timeout (%s %d)\n",
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  598  				__func__, __LINE__);
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  599  			dev_dbg(rtsx_dev(chip), "chip->int_reg = 0x%x\n",
bf6c0d110e0b7a Fabio Falzoi      2014-07-30  600  				chip->int_reg);
fa590c222fbaa4 Micky Ching       2013-11-12  601  			err = -ETIMEDOUT;
fa590c222fbaa4 Micky Ching       2013-11-12  602  			goto out;
fa590c222fbaa4 Micky Ching       2013-11-12  603  		}
fa590c222fbaa4 Micky Ching       2013-11-12  604  	} else {
fa590c222fbaa4 Micky Ching       2013-11-12  605  		spin_unlock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  606  	}
fa590c222fbaa4 Micky Ching       2013-11-12  607  
fa590c222fbaa4 Micky Ching       2013-11-12  608  	spin_lock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  609  	if (rtsx->trans_result == TRANS_RESULT_FAIL)
fa590c222fbaa4 Micky Ching       2013-11-12  610  		err = -EIO;
fa590c222fbaa4 Micky Ching       2013-11-12  611  	else if (rtsx->trans_result == TRANS_RESULT_OK)
fa590c222fbaa4 Micky Ching       2013-11-12  612  		err = 0;
fa590c222fbaa4 Micky Ching       2013-11-12  613  
fa590c222fbaa4 Micky Ching       2013-11-12  614  	spin_unlock_irq(&rtsx->reg_lock);
fa590c222fbaa4 Micky Ching       2013-11-12  615  
fa590c222fbaa4 Micky Ching       2013-11-12  616  out:
fa590c222fbaa4 Micky Ching       2013-11-12  617  	rtsx->done = NULL;
fa590c222fbaa4 Micky Ching       2013-11-12  618  	rtsx->trans_state = STATE_TRANS_NONE;
69e3bc543c5610 Shaun Ren         2016-02-15  619  	dma_unmap_sg(&rtsx->pci->dev, sg, num_sg, dma_dir);
fa590c222fbaa4 Micky Ching       2013-11-12  620  
fa590c222fbaa4 Micky Ching       2013-11-12  621  	if (err < 0)
fa590c222fbaa4 Micky Ching       2013-11-12  622  		rtsx_stop_cmd(chip, card);
fa590c222fbaa4 Micky Ching       2013-11-12  623  
fa590c222fbaa4 Micky Ching       2013-11-12  624  	return err;
fa590c222fbaa4 Micky Ching       2013-11-12  625  }
fa590c222fbaa4 Micky Ching       2013-11-12  626  

:::::: The code at line 548 was first introduced by commit
:::::: fa590c222fbaa428edb2ce2194638906cea1400a staging: rts5208: add support for rts5208 and rts5288

:::::: TO: Micky Ching <micky_ching@xxxxxxxxxxxxxx>
:::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux