Hi Lee,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on scsi/for-next]
[also build test ERROR on mkp-scsi/for-next v5.8-rc4 next-20200709]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Lee-Sang-Hyun/scsi-ufs-set-STATE...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:14,
from include/linux/list.h:9,
from include/linux/async.h:12,
from drivers/scsi/ufs/ufshcd.c:12:
drivers/scsi/ufs/ufshcd.c: In function 'ufshcd_probe_hba':
> drivers/scsi/ufs/ufshcd.c:7436:43: error: 'flags'
undeclared (first use in this function)
7436 |
spin_lock_irqsave(hba->host->host_lock, flags);
| ^~~~~
include/linux/typecheck.h:11:9: note: in definition of macro 'typecheck'
11 | typeof(x) __dummy2; \
| ^
include/linux/spinlock.h:383:2: note: in expansion of macro
'raw_spin_lock_irqsave'
383 | raw_spin_lock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:7436:3: note: in expansion of macro
'spin_lock_irqsave'
7436 | spin_lock_irqsave(hba->host->host_lock, flags);
| ^~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:7436:43: note: each undeclared identifier is reported only
once for each function it appears in
7436 | spin_lock_irqsave(hba->host->host_lock, flags);
| ^~~~~
include/linux/typecheck.h:11:9: note: in definition of macro 'typecheck'
11 | typeof(x) __dummy2; \
| ^
include/linux/spinlock.h:383:2: note: in expansion of macro
'raw_spin_lock_irqsave'
383 | raw_spin_lock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:7436:3: note: in expansion of macro
'spin_lock_irqsave'
7436 | spin_lock_irqsave(hba->host->host_lock, flags);
| ^~~~~~~~~~~~~~~~~
include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a
cast
12 | (void)(&__dummy == &__dummy2); \
| ^~
include/linux/spinlock.h:250:3: note: in expansion of macro 'typecheck'
250 | typecheck(unsigned long, flags); \
| ^~~~~~~~~
include/linux/spinlock.h:383:2: note: in expansion of macro
'raw_spin_lock_irqsave'
383 | raw_spin_lock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~
drivers/scsi/ufs/ufshcd.c:7436:3: note: in expansion of macro
'spin_lock_irqsave'
7436 | spin_lock_irqsave(hba->host->host_lock, flags);
| ^~~~~~~~~~~~~~~~~
vim +/flags +7436 drivers/scsi/ufs/ufshcd.c
7352
7353 /**
7354 * ufshcd_probe_hba - probe hba to detect device and initialize
7355 * @hba: per-adapter instance
7356 * @async: asynchronous execution or not
7357 *
7358 * Execute link-startup and verify device initialization
7359 */
7360 static int ufshcd_probe_hba(struct ufs_hba *hba, bool async)
7361 {
7362 int ret;
7363 ktime_t start = ktime_get();
7364
7365 ret = ufshcd_link_startup(hba);
7366 if (ret)
7367 goto out;
7368
7369 /* Debug counters initialization */
7370 ufshcd_clear_dbg_ufs_stats(hba);
7371
7372 /* UniPro link is active now */
7373 ufshcd_set_link_active(hba);
7374
7375 /* Verify device initialization by sending NOP OUT UPIU */
7376 ret = ufshcd_verify_dev_init(hba);
7377 if (ret)
7378 goto out;
7379
7380 /* Initiate UFS initialization, and waiting until completion */
7381 ret = ufshcd_complete_dev_init(hba);
7382 if (ret)
7383 goto out;
7384
7385 /*
7386 * Initialize UFS device parameters used by driver, these
7387 * parameters are associated with UFS descriptors.
7388 */
7389 if (async) {
7390 ret = ufshcd_device_params_init(hba);
7391 if (ret)
7392 goto out;
7393 }
7394
7395 ufshcd_tune_unipro_params(hba);
7396
7397 /* UFS device is also active now */
7398 ufshcd_set_ufs_dev_active(hba);
7399 ufshcd_force_reset_auto_bkops(hba);
7400 hba->wlun_dev_clr_ua = true;
7401
7402 /* Gear up to HS gear if supported */
7403 if (hba->max_pwr_info.is_valid) {
7404 /*
7405 * Set the right value to bRefClkFreq before attempting to
7406 * switch to HS gears.
7407 */
7408 if (hba->dev_ref_clk_freq != REF_CLK_FREQ_INVAL)
7409 ufshcd_set_dev_ref_clk(hba);
7410 ret = ufshcd_config_pwr_mode(hba, &hba->max_pwr_info.info);
7411 if (ret) {
7412 dev_err(hba->dev, "%s: Failed setting power mode, err = %d\n",
7413 __func__, ret);
7414 goto out;
7415 }
7416 ufshcd_print_pwr_info(hba);
7417 }
7418
7419 /*
7420 * bActiveICCLevel is volatile for UFS device (as per latest v2.1 spec)
7421 * and for removable UFS card as well, hence always set the parameter.
7422 * Note: Error handler may issue the device reset hence resetting
7423 * bActiveICCLevel as well so it is always safe to set this here.
7424 */
7425 ufshcd_set_active_icc_lvl(hba);
7426
7427 /* set the state as operational after switching to desired gear */
7428 hba->ufshcd_state = UFSHCD_STATE_OPERATIONAL;
7429
7430 ufshcd_wb_config(hba);
7431 /* Enable Auto-Hibernate if configured */
7432 ufshcd_auto_hibern8_enable(hba);
7433
7434 out:
7435 if (ret) {
7436 spin_lock_irqsave(hba->host->host_lock, flags);
7437 hba->ufshcd_state = UFSHCD_STATE_ERROR;
7438 spin_unlock_irqrestore(hba->host->host_lock, flags);
7439 }
7440
7441 trace_ufshcd_init(dev_name(hba->dev), ret,
7442 ktime_to_us(ktime_sub(ktime_get(), start)),
7443 hba->curr_dev_pwr_mode, hba->uic_link_state);
7444 return ret;
7445 }
7446
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org