Hi Fengnan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on jejb-scsi/for-next v5.15 next-20211110]
[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/Fengnan-Chang/scsi-ufs-add-quirk...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: nios2-buildonly-randconfig-r006-20211111 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.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/d62a8caeaf6fc77b0e717c94db58080d3...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Fengnan-Chang/scsi-ufs-add-quirk-to-keep-write-booster-on/20211111-120016
git checkout d62a8caeaf6fc77b0e717c94db58080d3f1edb68
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
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 >>):
drivers/scsi/ufs/ufshcd.c: In function 'ufshcd_devfreq_scale':
> drivers/scsi/ufs/ufshcd.c:1260:17: error: implicit declaration of
function 'ufshcd_wb_ctrl'; did you mean 'ufshcd_writel'?
[-Werror=implicit-function-declaration]
1260 |
ufshcd_wb_ctrl(hba, scale_up);
| ^~~~~~~~~~~~~~
| ufshcd_writel
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SERIAL_CORE_CONSOLE
Depends on TTY && HAS_IOMEM
Selected by
- EARLY_PRINTK
vim +1260 drivers/scsi/ufs/ufshcd.c
1211
1212 /**
1213 * ufshcd_devfreq_scale - scale up/down UFS clocks and gear
1214 * @hba: per adapter instance
1215 * @scale_up: True for scaling up and false for scalin down
1216 *
1217 * Returns 0 for success,
1218 * Returns -EBUSY if scaling can't happen at this time
1219 * Returns non-zero for any other errors
1220 */
1221 static int ufshcd_devfreq_scale(struct ufs_hba *hba, bool scale_up)
1222 {
1223 int ret = 0;
1224 bool is_writelock = true;
1225
1226 ret = ufshcd_clock_scaling_prepare(hba);
1227 if (ret)
1228 return ret;
1229
1230 /* scale down the gear before scaling down clocks */
1231 if (!scale_up) {
1232 ret = ufshcd_scale_gear(hba, false);
1233 if (ret)
1234 goto out_unprepare;
1235 }
1236
1237 ret = ufshcd_scale_clks(hba, scale_up);
1238 if (ret) {
1239 if (!scale_up)
1240 ufshcd_scale_gear(hba, true);
1241 goto out_unprepare;
1242 }
1243
1244 /* scale up the gear after scaling up clocks */
1245 if (scale_up) {
1246 ret = ufshcd_scale_gear(hba, true);
1247 if (ret) {
1248 ufshcd_scale_clks(hba, false);
1249 goto out_unprepare;
1250 }
1251 }
1252
1253 /*
1254 * if no need UFS_DEVICE_QUIRK_KEEP_ON_WB, Enable Write
1255 * Booster if we have scaled up else disable it
1256 */
1257 if (!(hba->dev_quirks & UFS_DEVICE_QUIRK_KEEP_ON_WB)) {
1258 downgrade_write(&hba->clk_scaling_lock);
1259 is_writelock = false;
1260 ufshcd_wb_ctrl(hba, scale_up);
1261 }
1262
1263 out_unprepare:
1264 ufshcd_clock_scaling_unprepare(hba, is_writelock);
1265 return ret;
1266 }
1267
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org