drivers/mmc/host/sdhci_am654.c:531:23: warning: unused variable 'timing'

kernel test robot <[email protected]> Tue, 04 Aug 2026 04:38:33 +0800
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
:::::: 
:::::: Manual check reason: "bisect to a FBC not belonging to original linux-review patches: branch: linux-review/Diogo-Ivo-Schneider-Electric/mmc-sdhci_am654-Reset-command-and-data-lines-on-failed-tuning/20260803-193450, commit: 317e0b526509616b2444e79a15461c0ab9412c4b"
:::::: 

BCC: [email protected]
CC: [email protected]
TO: "Diogo Ivo (Schneider Electric)" <[email protected]>
CC: 0day robot <[email protected]>

tree:   https://github.com/intel-lab-lkp/linux/commits/Diogo-Ivo-Schneider-Electric/mmc-sdhci_am654-Reset-command-and-data-lines-on-failed-tuning/20260803-193450
head:   dc2f91ca1d31b8067b620bedbcf162d5aa07d0af
commit: 317e0b526509616b2444e79a15461c0ab9412c4b mmc: sdhci_am654: Clear ITAPDLY on tuning failure
date:   11 hours ago
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20260804/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

All warnings (new ones prefixed by >>):

   drivers/mmc/host/sdhci_am654.c: In function 'sdhci_am654_do_tuning':
>> drivers/mmc/host/sdhci_am654.c:531:23: warning: unused variable 'timing' [-Wunused-variable]
     531 |         unsigned char timing = host->mmc->ios.timing;
         |                       ^~~~~~


vim +/timing +531 drivers/mmc/host/sdhci_am654.c

6231d99dd411931 Judith Mendez                  2024-03-20  525  
901d16e462963cb Judith Mendez                  2024-09-04  526  static int sdhci_am654_do_tuning(struct sdhci_host *host,
13ebeae68ac9830 Faiz Abbas                     2020-09-23  527  				 u32 opcode)
13ebeae68ac9830 Faiz Abbas                     2020-09-23  528  {
13ebeae68ac9830 Faiz Abbas                     2020-09-23  529  	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
13ebeae68ac9830 Faiz Abbas                     2020-09-23  530  	struct sdhci_am654_data *sdhci_am654 = sdhci_pltfm_priv(pltfm_host);
387c1bf7dce0dfe Judith Mendez                  2024-03-20 @531  	unsigned char timing = host->mmc->ios.timing;
6231d99dd411931 Judith Mendez                  2024-03-20  532  	struct window fail_window[ITAPDLY_LENGTH];
cf6444ba528f043 Judith Mendez                  2024-09-04  533  	struct device *dev = mmc_dev(host->mmc);
6231d99dd411931 Judith Mendez                  2024-03-20  534  	u8 curr_pass, itap;
6231d99dd411931 Judith Mendez                  2024-03-20  535  	u8 fail_index = 0;
6231d99dd411931 Judith Mendez                  2024-03-20  536  	u8 prev_pass = 1;
6231d99dd411931 Judith Mendez                  2024-03-20  537  
6231d99dd411931 Judith Mendez                  2024-03-20  538  	memset(fail_window, 0, sizeof(fail_window));
13ebeae68ac9830 Faiz Abbas                     2020-09-23  539  
6231d99dd411931 Judith Mendez                  2024-03-20  540  	for (itap = 0; itap < ITAPDLY_LENGTH; itap++) {
317e0b526509616 Diogo Ivo (Schneider Electric  2026-07-29  541) 		sdhci_am654_write_itapdly(sdhci_am654, itap, 0x1);
13ebeae68ac9830 Faiz Abbas                     2020-09-23  542  
6231d99dd411931 Judith Mendez                  2024-03-20  543  		curr_pass = !mmc_send_tuning(host->mmc, opcode, NULL);
13ebeae68ac9830 Faiz Abbas                     2020-09-23  544  
6231d99dd411931 Judith Mendez                  2024-03-20  545  		if (!curr_pass && prev_pass)
6231d99dd411931 Judith Mendez                  2024-03-20  546  			fail_window[fail_index].start = itap;
13ebeae68ac9830 Faiz Abbas                     2020-09-23  547  
6231d99dd411931 Judith Mendez                  2024-03-20  548  		if (!curr_pass) {
6231d99dd411931 Judith Mendez                  2024-03-20  549  			fail_window[fail_index].end = itap;
6231d99dd411931 Judith Mendez                  2024-03-20  550  			fail_window[fail_index].length++;
cf6444ba528f043 Judith Mendez                  2024-09-04  551  			dev_dbg(dev, "Failed itapdly=%d\n", itap);
13ebeae68ac9830 Faiz Abbas                     2020-09-23  552  		}
6231d99dd411931 Judith Mendez                  2024-03-20  553  
6231d99dd411931 Judith Mendez                  2024-03-20  554  		if (curr_pass && !prev_pass)
6231d99dd411931 Judith Mendez                  2024-03-20  555  			fail_index++;
6231d99dd411931 Judith Mendez                  2024-03-20  556  
6231d99dd411931 Judith Mendez                  2024-03-20  557  		prev_pass = curr_pass;
6231d99dd411931 Judith Mendez                  2024-03-20  558  	}
6231d99dd411931 Judith Mendez                  2024-03-20  559  
6231d99dd411931 Judith Mendez                  2024-03-20  560  	if (fail_window[fail_index].length != 0)
6231d99dd411931 Judith Mendez                  2024-03-20  561  		fail_index++;
6231d99dd411931 Judith Mendez                  2024-03-20  562  
901d16e462963cb Judith Mendez                  2024-09-04  563  	return sdhci_am654_calculate_itap(host, fail_window, fail_index,
6231d99dd411931 Judith Mendez                  2024-03-20  564  					 sdhci_am654->dll_enable);
901d16e462963cb Judith Mendez                  2024-09-04  565  }
6231d99dd411931 Judith Mendez                  2024-03-20  566  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki