Re: [PATCH] mmc: block: Use .card_busy() to detect busy state in card_busy_detect

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

 



Hi Shawn,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13-rc5 next-20210607]
[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/Shawn-Lin/mmc-block-Use-card_busy-to-detect-busy-state-in-card_busy_detect/20210607-172028
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 614124bea77e452aa6df7a8714e8bc820b489922
config: alpha-randconfig-r034-20210607 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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/2224db607cd2136af3a045ca8b2b8442705f8752
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Shawn-Lin/mmc-block-Use-card_busy-to-detect-busy-state-in-card_busy_detect/20210607-172028
        git checkout 2224db607cd2136af3a045ca8b2b8442705f8752
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

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

All errors (new ones prefixed by >>):

   drivers/mmc/core/block.c: In function 'card_busy_detect':
>> drivers/mmc/core/block.c:451:1: error: label at end of compound statement
     451 | cb:
         | ^~


vim +451 drivers/mmc/core/block.c

   412	
   413	static int card_busy_detect(struct mmc_card *card, unsigned int timeout_ms,
   414				    u32 *resp_errs)
   415	{
   416		unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms);
   417		int err = 0;
   418		u32 status;
   419		bool busy;
   420	
   421		do {
   422			bool done = time_after(jiffies, timeout);
   423	
   424			if (card->host->ops->card_busy) {
   425				busy = card->host->ops->card_busy(card->host);
   426				status = busy ?	0 : R1_READY_FOR_DATA | R1_STATE_TRAN << 9;
   427				goto cb;
   428			}
   429	
   430			err = __mmc_send_status(card, &status, 5);
   431			if (err) {
   432				dev_err(mmc_dev(card->host),
   433					"error %d requesting status\n", err);
   434				return err;
   435			}
   436	
   437			/* Accumulate any response error bits seen */
   438			if (resp_errs)
   439				*resp_errs |= status;
   440	
   441			/*
   442			 * Timeout if the device never becomes ready for data and never
   443			 * leaves the program state.
   444			 */
   445			if (done) {
   446				dev_err(mmc_dev(card->host),
   447					"Card stuck in wrong state! %s status: %#x\n",
   448					 __func__, status);
   449				return -ETIMEDOUT;
   450			}
 > 451	cb:
   452		} while (!mmc_ready_for_data(status));
   453	
   454		return err;
   455	}
   456	

---
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 Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux