Re: [PATCH v4 1/5] hisi_acc_vfio_pci: fix XQE dma address error

kernel test robot
2025-02-27T18:01:13Z

Hi Longfang,

kernel test robot noticed the following build warnings:

[auto build test WARNING on awilliam-vfio/next]
[also build test WARNING on awilliam-vfio/for-linus linus/master v6.14-rc4 next-20250227]
[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/Longfang-Liu/hisi_acc_vfio_pci-fix-XQE-dma-address-error/20250225-143347
base: https://github.com/awilliam/linux-vfio.git next
patch link: https://lore.kernel.org/r/20250225062757.19692-2-liulongfang%40huawei.com
patch subject: [PATCH v4 1/5] hisi_acc_vfio_pci: fix XQE dma address error
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250228/202502280126.kuSX5nFF-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250228/202502280126.kuSX5nFF-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/202502280126.kuSX5nFF-lkp@intel.com/

All warnings (new ones prefixed by >>):

drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'vf_qm_version_check':
>> drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:357:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
357 | if (vf_data->major_ver < ACC_DRV_MAJOR_VER ||
| ^~
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:360:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
360 | return -EINVAL;
| ^~~~~~
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c: In function 'vf_qm_get_match_data':
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:448:30: error: 'ACC_DRV_MAR' undeclared (first use in this function)
448 | vf_data->major_ver = ACC_DRV_MAR;
| ^~~~~~~~~~~
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:448:30: note: each undeclared identifier is reported only once for each function it appears in
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c:449:30: error: 'ACC_DRV_MIN' undeclared (first use in this function)
449 | vf_data->minor_ver = ACC_DRV_MIN;
| ^~~~~~~~~~~

vim +/if +357 drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c

352
353 static int vf_qm_version_check(struct acc_vf_data *vf_data, struct device *dev)
354 {
355 switch (vf_data->acc_magic) {
356 case ACC_DEV_MAGIC_V2:
> 357 if (vf_data->major_ver < ACC_DRV_MAJOR_VER ||
358 vf_data->minor_ver < ACC_DRV_MINOR_VER)
359 dev_info(dev, "migration driver version not match!\n");
360 return -EINVAL;
361 break;
362 case ACC_DEV_MAGIC_V1:
363 /* Correct dma address */
364 vf_data->eqe_dma = vf_data->qm_eqc_dw[QM_XQC_ADDR_HIGH];
365 vf_data->eqe_dma <<= QM_XQC_ADDR_OFFSET;
366 vf_data->eqe_dma |= vf_data->qm_eqc_dw[QM_XQC_ADDR_LOW];
367 vf_data->aeqe_dma = vf_data->qm_aeqc_dw[QM_XQC_ADDR_HIGH];
368 vf_data->aeqe_dma <<= QM_XQC_ADDR_OFFSET;
369 vf_data->aeqe_dma |= vf_data->qm_aeqc_dw[QM_XQC_ADDR_LOW];
370 break;
371 default:
372 return -EINVAL;
373 }
374
375 return 0;
376 }
377

--
0-DAY CI Kernel Test Service