lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201910241927.naBpUe0j%lkp@intel.com>
Date:   Thu, 24 Oct 2019 19:34:17 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:     kbuild-all@...ts.01.org, Ulf Hansson <ulf.hansson@...aro.org>,
        linux-kernel@...r.kernel.org,
        Chaotian Jing <chaotian.jing@...iatek.com>,
        linux-mmc@...r.kernel.org,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: Re: [PATCH] mmc: block: remove unused variable

Hi Sudip,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc4 next-20191024]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Sudip-Mukherjee/mmc-block-remove-unused-variable/20191024-181650
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 13b86bc4cd648eae69fdcf3d04b2750c76350053
config: mips-allmodconfig (attached as .config)
compiler: mips-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=mips 

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

All errors (new ones prefixed by >>):

   drivers/mmc/core/block.c: In function '__mmc_blk_ioctl_cmd':
>> drivers/mmc/core/block.c:618:44: error: 'status' undeclared (first use in this function); did you mean 'kstatfs'?
      err = ioctl_rpmb_card_status_poll(card, &status, 5);
                                               ^~~~~~
                                               kstatfs
   drivers/mmc/core/block.c:618:44: note: each undeclared identifier is reported only once for each function it appears in

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

775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  470  
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  471  static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  472  			       struct mmc_blk_ioc_data *idata)
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  473  {
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  474  	struct mmc_command cmd = {}, sbc = {};
c7836d1593b87c drivers/mmc/core/block.c Masahiro Yamada 2016-12-19  475  	struct mmc_data data = {};
c7836d1593b87c drivers/mmc/core/block.c Masahiro Yamada 2016-12-19  476  	struct mmc_request mrq = {};
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  477  	struct scatterlist sg;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  478  	int err;
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  479  	unsigned int target_part;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  480  
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  481  	if (!card || !md || !idata)
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  482  		return -EINVAL;
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  483  
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  484  	/*
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  485  	 * The RPMB accesses comes in from the character device, so we
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  486  	 * need to target these explicitly. Else we just target the
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  487  	 * partition type for the block device the ioctl() was issued
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  488  	 * on.
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  489  	 */
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  490  	if (idata->rpmb) {
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  491  		/* Support multiple RPMB partitions */
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  492  		target_part = idata->rpmb->part_index;
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  493  		target_part |= EXT_CSD_PART_CONFIG_ACC_RPMB;
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  494  	} else {
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  495  		target_part = md->part_type;
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  496  	}
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  497  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  498  	cmd.opcode = idata->ic.opcode;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  499  	cmd.arg = idata->ic.arg;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  500  	cmd.flags = idata->ic.flags;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  501  
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  502  	if (idata->buf_bytes) {
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  503  		data.sg = &sg;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  504  		data.sg_len = 1;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  505  		data.blksz = idata->ic.blksz;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  506  		data.blocks = idata->ic.blocks;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  507  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  508  		sg_init_one(data.sg, idata->buf, idata->buf_bytes);
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  509  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  510  		if (idata->ic.write_flag)
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  511  			data.flags = MMC_DATA_WRITE;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  512  		else
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  513  			data.flags = MMC_DATA_READ;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  514  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  515  		/* data.flags must already be set before doing this. */
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  516  		mmc_set_data_timeout(&data, card);
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  517  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  518  		/* Allow overriding the timeout_ns for empirical tuning. */
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  519  		if (idata->ic.data_timeout_ns)
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  520  			data.timeout_ns = idata->ic.data_timeout_ns;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  521  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  522  		if ((cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) {
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  523  			/*
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  524  			 * Pretend this is a data transfer and rely on the
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  525  			 * host driver to compute timeout.  When all host
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  526  			 * drivers support cmd.cmd_timeout for R1B, this
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  527  			 * can be changed to:
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  528  			 *
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  529  			 *     mrq.data = NULL;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  530  			 *     cmd.cmd_timeout = idata->ic.cmd_timeout_ms;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  531  			 */
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  532  			data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  533  		}
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  534  
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  535  		mrq.data = &data;
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  536  	}
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  537  
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  538  	mrq.cmd = &cmd;
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  539  
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  540  	err = mmc_blk_part_switch(card, target_part);
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  541  	if (err)
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  542  		return err;
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  543  
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  544  	if (idata->ic.is_acmd) {
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  545  		err = mmc_app_cmd(card->host, card);
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  546  		if (err)
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  547  			return err;
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  548  	}
4d6144de8ba263 drivers/mmc/card/block.c Johan Rudholm   2011-11-23  549  
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  550  	if (idata->rpmb) {
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  551  		sbc.opcode = MMC_SET_BLOCK_COUNT;
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  552  		/*
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  553  		 * We don't do any blockcount validation because the max size
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  554  		 * may be increased by a future standard. We just copy the
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  555  		 * 'Reliable Write' bit here.
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  556  		 */
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  557  		sbc.arg = data.blocks | (idata->ic.write_flag & BIT(31));
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  558  		sbc.flags = MMC_RSP_R1 | MMC_CMD_AC;
a44f7cb937321d drivers/mmc/core/block.c Wolfram Sang    2018-11-26  559  		mrq.sbc = &sbc;
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  560  	}
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  561  
a82e484e248058 drivers/mmc/card/block.c Yaniv Gardi     2013-06-05  562  	if ((MMC_EXTRACT_INDEX_FROM_ARG(cmd.arg) == EXT_CSD_SANITIZE_START) &&
a82e484e248058 drivers/mmc/card/block.c Yaniv Gardi     2013-06-05  563  	    (cmd.opcode == MMC_SWITCH)) {
775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  564  		err = ioctl_do_sanitize(card);
775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  565  
775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  566  		if (err)
775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  567  			pr_err("%s: ioctl_do_sanitize() failed. err = %d",
775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  568  			       __func__, err);
775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  569  
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  570  		return err;
775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  571  	}
775a9362b5d7e0 drivers/mmc/card/block.c Maya Erez       2013-04-18  572  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  573  	mmc_wait_for_req(card->host, &mrq);
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  574  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  575  	if (cmd.error) {
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  576  		dev_err(mmc_dev(card->host), "%s: cmd error %d\n",
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  577  						__func__, cmd.error);
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  578  		return cmd.error;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  579  	}
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  580  	if (data.error) {
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  581  		dev_err(mmc_dev(card->host), "%s: data error %d\n",
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  582  						__func__, data.error);
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  583  		return data.error;
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  584  	}
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  585  
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  586  	/*
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  587  	 * Make sure the cache of the PARTITION_CONFIG register and
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  588  	 * PARTITION_ACCESS bits is updated in case the ioctl ext_csd write
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  589  	 * changed it successfully.
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  590  	 */
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  591  	if ((MMC_EXTRACT_INDEX_FROM_ARG(cmd.arg) == EXT_CSD_PART_CONFIG) &&
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  592  	    (cmd.opcode == MMC_SWITCH)) {
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  593  		struct mmc_blk_data *main_md = dev_get_drvdata(&card->dev);
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  594  		u8 value = MMC_EXTRACT_VALUE_FROM_ARG(cmd.arg);
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  595  
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  596  		/*
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  597  		 * Update cache so the next mmc_blk_part_switch call operates
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  598  		 * on up-to-date data.
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  599  		 */
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  600  		card->ext_csd.part_config = value;
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  601  		main_md->part_curr = value & EXT_CSD_PART_CONFIG_ACC_MASK;
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  602  	}
a0e9576634f0bc drivers/mmc/core/block.c Bastian Stender 2018-03-08  603  
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  604  	/*
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  605  	 * According to the SD specs, some commands require a delay after
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  606  	 * issuing the command.
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  607  	 */
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  608  	if (idata->ic.postsleep_min_us)
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  609  		usleep_range(idata->ic.postsleep_min_us, idata->ic.postsleep_max_us);
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  610  
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  611  	memcpy(&(idata->ic.response), cmd.resp, sizeof(cmd.resp));
cb87ea28ed9e75 drivers/mmc/card/block.c John Calixto    2011-04-26  612  
97548575bef38a drivers/mmc/core/block.c Linus Walleij   2017-09-20  613  	if (idata->rpmb) {
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  614  		/*
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  615  		 * Ensure RPMB command has completed by polling CMD13
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  616  		 * "Send Status".
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  617  		 */
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06 @618  		err = ioctl_rpmb_card_status_poll(card, &status, 5);
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  619  		if (err)
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  620  			dev_err(mmc_dev(card->host),
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  621  					"%s: Card Status=0x%08X, error %d\n",
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  622  					__func__, status, err);
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  623  	}
8d1e977da82ebd drivers/mmc/card/block.c Loic Pallardy   2012-08-06  624  
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  625  	return err;
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  626  }
a5f5774c55a2e3 drivers/mmc/card/block.c Jon Hunter      2015-09-22  627  

:::::: The code at line 618 was first introduced by commit
:::::: 8d1e977da82ebd1defd44d085edc2c0140aecc2a mmc: card: Add RPMB support in IOCTL interface

:::::: TO: Loic Pallardy <loic.pallardy-ext@...ricsson.com>
:::::: CC: Chris Ball <cjb@...top.org>

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

Download attachment ".config.gz" of type "application/gzip" (62065 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ