Re: [PATCH v3] scsi: ufs: core: call hibern8 notify when hibern8 cmd failed

kernel test robot
2026-05-02T13:58:15Z

Hi Hongjie,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master v7.1-rc1 next-20260430]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Hongjie-Fang/scsi-ufs-core-call-hibern8-notify-when-hibern8-cmd-failed/20260501-050358
base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link: https://lore.kernel.org/r/20260430042212.3712251-1-hongjiefang%40asrmicro.com
patch subject: [PATCH v3] scsi: ufs: core: call hibern8 notify when hibern8 cmd failed
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20260502/202605022153.181ENp5n-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260502/202605022153.181ENp5n-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605022153.181ENp5n-lkp@intel.com/

All warnings (new ones prefixed by >>):

drivers/ufs/host/ufs-qcom.c: In function 'ufs_qcom_setup_clocks':
>> drivers/ufs/host/ufs-qcom.c:1433:9: warning: enumeration value 'ROLLBACK_CHANGE' not handled in switch [-Wswitch]
1433 | switch (status) {
| ^~~~~~

vim +/ROLLBACK_CHANGE +1433 drivers/ufs/host/ufs-qcom.c

81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1401
f06fcc7155dcbc drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-10-28 1402 /**
f06fcc7155dcbc drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-10-28 1403 * ufs_qcom_setup_clocks - enables/disable clocks
f06fcc7155dcbc drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-10-28 1404 * @hba: host controller instance
f06fcc7155dcbc drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-10-28 1405 * @on: If true, enable clocks else disable them.
1e879e8fa9f62e drivers/scsi/ufs/ufs-qcom.c Subhash Jadavani 2016-10-06 1406 * @status: PRE_CHANGE or POST_CHANGE notify
f06fcc7155dcbc drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-10-28 1407 *
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1408 * There are certain clocks which comes from the PHY so it needs
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1409 * to be managed together along with controller clocks which also
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1410 * provides a better power saving. Hence keep phy_power_off/on calls
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1411 * in ufs_qcom_setup_clocks, so that PHY's regulators & clks can be
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1412 * turned on/off along with UFS's clocks.
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1413 *
3a17fefe0f1960 drivers/ufs/host/ufs-qcom.c Bart Van Assche 2023-07-27 1414 * Return: 0 on success, non-zero on failure.
f06fcc7155dcbc drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-10-28 1415 */
1e879e8fa9f62e drivers/scsi/ufs/ufs-qcom.c Subhash Jadavani 2016-10-06 1416 static int ufs_qcom_setup_clocks(struct ufs_hba *hba, bool on,
1e879e8fa9f62e drivers/scsi/ufs/ufs-qcom.c Subhash Jadavani 2016-10-06 1417 enum ufs_notify_change_status status)
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1418 {
1ce5898af55e23 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-10-28 1419 struct ufs_qcom_host *host = ufshcd_get_variant(hba);
720fa0cb59e411 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-06-23 1420 struct phy *phy;
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1421 int err;
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1422
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1423 /*
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1424 * In case ufs_qcom_init() is not yet done, simply ignore.
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1425 * This ufs_qcom_setup_clocks() shall be called from
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1426 * ufs_qcom_init() after init is done.
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1427 */
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1428 if (!host)
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1429 return 0;
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1430
720fa0cb59e411 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-06-23 1431 phy = host->generic_phy;
720fa0cb59e411 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-06-23 1432
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 @1433 switch (status) {
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1434 case PRE_CHANGE:
03ce80a1bb869f drivers/ufs/host/ufs-qcom.c Manivannan Sadhasivam 2023-07-31 1435 if (on) {
03ce80a1bb869f drivers/ufs/host/ufs-qcom.c Manivannan Sadhasivam 2023-07-31 1436 ufs_qcom_icc_update_bw(host);
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1437 if (ufs_qcom_is_link_hibern8(hba)) {
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1438 err = ufs_qcom_enable_lane_clks(host);
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1439 if (err) {
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1440 dev_err(hba->dev, "enable lane clks failed, ret=%d\n", err);
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1441 return err;
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1442 }
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1443 }
03ce80a1bb869f drivers/ufs/host/ufs-qcom.c Manivannan Sadhasivam 2023-07-31 1444 } else {
feb3d79800ece1 drivers/scsi/ufs/ufs-qcom.c Vivek Gautam 2016-11-08 1445 if (!ufs_qcom_is_link_active(hba)) {
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1446 /* disable device ref_clk */
f06fcc7155dcbc drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-10-28 1447 ufs_qcom_dev_ref_clk_ctrl(host, false);
feb3d79800ece1 drivers/scsi/ufs/ufs-qcom.c Vivek Gautam 2016-11-08 1448 }
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1449
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1450 err = phy_power_off(phy);
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1451 if (err) {
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1452 dev_err(hba->dev, "phy power off failed, ret=%d\n", err);
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1453 return err;
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1454 }
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1455 }
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1456 break;
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1457 case POST_CHANGE:
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1458 if (on) {
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1459 err = phy_power_on(phy);
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1460 if (err) {
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1461 dev_err(hba->dev, "phy power on failed, ret = %d\n", err);
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1462 return err;
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1463 }
77d2fa54a94574 drivers/ufs/host/ufs-qcom.c Nitin Rawat 2025-05-26 1464
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1465 /* enable the device ref clock for HS mode*/
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1466 if (ufshcd_is_hs_mode(&hba->pwr_info))
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1467 ufs_qcom_dev_ref_clk_ctrl(host, true);
03ce80a1bb869f drivers/ufs/host/ufs-qcom.c Manivannan Sadhasivam 2023-07-31 1468 } else {
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1469 if (ufs_qcom_is_link_hibern8(hba))
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1470 ufs_qcom_disable_lane_clks(host);
c1553fc105dff2 drivers/ufs/host/ufs-qcom.c Palash Kambar 2025-09-09 1471
03ce80a1bb869f drivers/ufs/host/ufs-qcom.c Manivannan Sadhasivam 2023-07-31 1472 ufs_qcom_icc_set_bw(host, ufs_qcom_bw_table[MODE_MIN][0][0].mem_bw,
03ce80a1bb869f drivers/ufs/host/ufs-qcom.c Manivannan Sadhasivam 2023-07-31 1473 ufs_qcom_bw_table[MODE_MIN][0][0].cfg_bw);
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1474 }
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1475 break;
8240dd97cef424 drivers/scsi/ufs/ufs-qcom.c Can Guo 2020-02-10 1476 }
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1477
c4adf171e834da drivers/scsi/ufs/ufs-qcom.c ChanWoo Lee 2021-09-07 1478 return 0;
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1479 }
81c0fc51b7a790 drivers/scsi/ufs/ufs-qcom.c Yaniv Gardi 2015-01-15 1480

--
0-DAY CI Kernel Test Service