All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 1/2] mmc: Add SD/SDIO driver for Sunplus SP7021
Date: Wed, 29 Dec 2021 00:43:18 +0800	[thread overview]
Message-ID: <202112290015.gY5j9jw5-lkp@intel.com> (raw)
In-Reply-To: <d42857a0150442d9df70308db370614764647d4a.1640325539.git.lhjeff911@gmail.com>

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

Hi Li-hao,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pza/reset/next]
[also build test WARNING on robh/for-next ulf-hansson-mmc-mirror/next linus/master v5.16-rc7 next-20211224]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Li-hao-Kuo/Add-SD-SDIO-control-driver-for-Sunplus-SP7021-SoC/20211224-140704
base:   https://git.pengutronix.de/git/pza/linux reset/next
config: parisc-randconfig-c004-20211228 (https://download.01.org/0day-ci/archive/20211229/202112290015.gY5j9jw5-lkp(a)intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/16ea62b9e9561c6054da687edb9f8603d1e7a158
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Li-hao-Kuo/Add-SD-SDIO-control-driver-for-Sunplus-SP7021-SoC/20211224-140704
        git checkout 16ea62b9e9561c6054da687edb9f8603d1e7a158
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

   drivers/mmc/host/sunplus_sd2.c: In function 'spsdc_set_bus_timing':
   drivers/mmc/host/sunplus_sd2.c:280:15: warning: variable 'timing_name' set but not used [-Wunused-but-set-variable]
     280 |         char *timing_name;
         |               ^~~~~~~~~~~
   drivers/mmc/host/sunplus_sd2.c: In function 'spsdc_set_bus_width':
   drivers/mmc/host/sunplus_sd2.c:300:13: warning: variable 'bus_width' set but not used [-Wunused-but-set-variable]
     300 |         int bus_width;
         |             ^~~~~~~~~
   drivers/mmc/host/sunplus_sd2.c: At top level:
   drivers/mmc/host/sunplus_sd2.c:743:13: warning: no previous prototype for 'spsdc_irq' [-Wmissing-prototypes]
     743 | irqreturn_t spsdc_irq(int irq, void *dev_id)
         |             ^~~~~~~~~
   drivers/mmc/host/sunplus_sd2.c:849:5: warning: no previous prototype for 'spsdc_get_cd' [-Wmissing-prototypes]
     849 | int spsdc_get_cd(struct mmc_host *mmc)
         |     ^~~~~~~~~~~~
   drivers/mmc/host/sunplus_sd2.c: In function 'spsdc_request':
>> drivers/mmc/host/sunplus_sd2.c:775:9: warning: ignoring return value of 'mutex_lock_interruptible' declared with attribute 'warn_unused_result' [-Wunused-result]
     775 |         mutex_lock_interruptible(&host->mrq_lock);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +775 drivers/mmc/host/sunplus_sd2.c

   767	
   768	static void spsdc_request(struct mmc_host *mmc, struct mmc_request *mrq)
   769	{
   770		struct spsdc_host *host = mmc_priv(mmc);
   771		struct mmc_command *cmd;
   772		struct mmc_data *data;
   773		int bus_width = mmc->ios.bus_width;
   774	
 > 775		mutex_lock_interruptible(&host->mrq_lock);
   776		host->mrq = mrq;
   777		data = mrq->data;
   778		cmd = mrq->cmd;
   779	
   780		if (cmd->opcode == SD_IO_RW_EXTENDED && bus_width ==
   781				MMC_BUS_WIDTH_4 && data->blocks * data->blksz <= 4) {
   782			if (__switch_sdio_bus_width(host, MMC_BUS_WIDTH_1)) {
   783				cmd->error = -1;
   784				host->mrq = NULL;
   785				mutex_unlock(&host->mrq_lock);
   786				mmc_request_done(host->mmc, mrq);
   787				return;
   788			}
   789			host->restore_4bit_sdio_bus = 1;
   790		}
   791	
   792		spsdc_prepare_cmd(host, cmd);
   793		/* we need manually read response R2. */
   794		if (unlikely(cmd->flags & MMC_RSP_136)) {
   795			spsdc_trigger_transaction(host);
   796			spsdc_get_rsp(host, cmd);
   797			spsdc_wait_finish(host);
   798			spsdc_check_error(host, mrq);
   799			host->mrq = NULL;
   800			mutex_unlock(&host->mrq_lock);
   801			mmc_request_done(host->mmc, mrq);
   802		} else {
   803			if (data)
   804				spsdc_prepare_data(host, data);
   805	
   806			if ((host->dmapio_mode && data) ==  SPSDC_PIO_MODE) {
   807				u32 value;
   808				/* pio data transfer do not use interrupt */
   809				value = readl(host->base + SPSD2_SD_INT_REG);
   810				value &= ~SPSDC_SDINT_SDCMPEN;
   811				writel(value, host->base + SPSD2_SD_INT_REG);
   812				spsdc_trigger_transaction(host);
   813				spsdc_xfer_data_pio(host, data);
   814				spsdc_wait_finish(host);
   815				spsdc_finish_request(host, mrq);
   816			} else {
   817				if (!(host->use_int || host->dma_use_int)) {
   818					spsdc_trigger_transaction(host);
   819					spsdc_wait_finish(host);
   820					spsdc_finish_request(host, mrq);
   821				} else {
   822					spsdc_trigger_transaction(host);
   823				}
   824			}
   825		}
   826	}
   827	

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

  reply	other threads:[~2021-12-28 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  6:05 [PATCH v3 0/2] Add SD/SDIO control driver for Sunplus SP7021 SoC Li-hao Kuo
2021-12-24  6:05 ` [PATCH v3 1/2] mmc: Add SD/SDIO driver for Sunplus SP7021 Li-hao Kuo
2021-12-28 16:43   ` kernel test robot [this message]
2021-12-29 18:08   ` kernel test robot
2021-12-24  6:05 ` [PATCH v3 2/2] devicetree bindings mmc Add bindings doc " Li-hao Kuo
2022-01-04 20:36   ` Rob Herring

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=202112290015.gY5j9jw5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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.