[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202211011629.WjlgB0KN-lkp@intel.com>
Date: Tue, 1 Nov 2022 16:45:05 +0800
From: kernel test robot <lkp@...el.com>
To: Arthur Simchaev <Arthur.Simchaev@....com>,
martin.petersen@...cle.com
Cc: oe-kbuild-all@...ts.linux.dev, avri.altman@....com,
Avi.Shchislowski@....com, beanhuo@...ron.com,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
Arthur Simchaev <Arthur.Simchaev@....com>
Subject: Re: [PATCH 4/4] ufs: core: Remove ufshcd_map_desc_id_to_length
function
Hi Arthur,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20221101]
[cannot apply to jejb-scsi/for-next linus/master v6.1-rc3]
[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/Arthur-Simchaev/ufs-core-Always-read-the-descriptors-with-max-length/20221101-002915
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link: https://lore.kernel.org/r/1667233524-13715-5-git-send-email-Arthur.Simchaev%40wdc.com
patch subject: [PATCH 4/4] ufs: core: Remove ufshcd_map_desc_id_to_length function
config: loongarch-randconfig-s051-20221031
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/5a36737b2cacf2691afb72cdff7ea06d2de0eaa9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Arthur-Simchaev/ufs-core-Always-read-the-descriptors-with-max-length/20221101-002915
git checkout 5a36737b2cacf2691afb72cdff7ea06d2de0eaa9
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/ufs/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/ufs/core/ufshpb.c:2391:55: sparse: sparse: incorrect type in argument 7 (different base types) @@ expected int *buf_len @@ got int @@
drivers/ufs/core/ufshpb.c:2391:55: sparse: expected int *buf_len
drivers/ufs/core/ufshpb.c:2391:55: sparse: got int
vim +2391 drivers/ufs/core/ufshpb.c
2379
2380 static int ufshpb_get_lu_info(struct ufs_hba *hba, int lun,
2381 struct ufshpb_lu_info *hpb_lu_info)
2382 {
2383 u16 max_active_rgns;
2384 u8 lu_enable;
2385 int ret;
2386 char desc_buf[QUERY_DESC_MAX_SIZE];
2387
2388 ufshcd_rpm_get_sync(hba);
2389 ret = ufshcd_query_descriptor_retry(hba, UPIU_QUERY_OPCODE_READ_DESC,
2390 QUERY_DESC_IDN_UNIT, lun, 0,
> 2391 desc_buf, QUERY_DESC_MAX_SIZE);
2392 ufshcd_rpm_put_sync(hba);
2393
2394 if (ret) {
2395 dev_err(hba->dev,
2396 "%s: idn: %d lun: %d query request failed",
2397 __func__, QUERY_DESC_IDN_UNIT, lun);
2398 return ret;
2399 }
2400
2401 lu_enable = desc_buf[UNIT_DESC_PARAM_LU_ENABLE];
2402 if (lu_enable != LU_ENABLED_HPB_FUNC)
2403 return -ENODEV;
2404
2405 max_active_rgns = get_unaligned_be16(
2406 desc_buf + UNIT_DESC_PARAM_HPB_LU_MAX_ACTIVE_RGNS);
2407 if (!max_active_rgns) {
2408 dev_err(hba->dev,
2409 "lun %d wrong number of max active regions\n", lun);
2410 return -ENODEV;
2411 }
2412
2413 hpb_lu_info->num_blocks = get_unaligned_be64(
2414 desc_buf + UNIT_DESC_PARAM_LOGICAL_BLK_COUNT);
2415 hpb_lu_info->pinned_start = get_unaligned_be16(
2416 desc_buf + UNIT_DESC_PARAM_HPB_PIN_RGN_START_OFF);
2417 hpb_lu_info->num_pinned = get_unaligned_be16(
2418 desc_buf + UNIT_DESC_PARAM_HPB_NUM_PIN_RGNS);
2419 hpb_lu_info->max_active_rgns = max_active_rgns;
2420
2421 return 0;
2422 }
2423
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (202178 bytes)
Powered by blists - more mailing lists