Re: [PATCH] [v2] HID: intel-ish-hid: fix endian-conversion
From: kernel test robot
Date: Sat Jun 01 2024 - 01:19:17 EST
Hi Arnd,
kernel test robot noticed the following build warnings:
[auto build test WARNING on hid/for-next]
[also build test WARNING on next-20240531]
[cannot apply to linus/master v6.10-rc1]
[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/Arnd-Bergmann/HID-intel-ish-hid-fix-endian-conversion/20240601-003303
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link: https://lore.kernel.org/r/20240531162836.157891-1-arnd%40kernel.org
patch subject: [PATCH] [v2] HID: intel-ish-hid: fix endian-conversion
config: x86_64-buildonly-randconfig-002-20240601 (https://download.01.org/0day-ci/archive/20240601/202406011319.hk4MAysc-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240601/202406011319.hk4MAysc-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406011319.hk4MAysc-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
>> drivers/hid/intel-ish-hid/ishtp/loader.c:170: warning: Function parameter or struct member 'fragment_count' not described in 'prepare_dma_bufs'
vim +170 drivers/hid/intel-ish-hid/ishtp/loader.c
579a267e4617d7 Zhang Lixu 2024-05-06 155
579a267e4617d7 Zhang Lixu 2024-05-06 156 /**
579a267e4617d7 Zhang Lixu 2024-05-06 157 * prepare_dma_bufs() - Prepare the DMA buffer for transferring firmware fragments
579a267e4617d7 Zhang Lixu 2024-05-06 158 * @dev: The ISHTP device
579a267e4617d7 Zhang Lixu 2024-05-06 159 * @ish_fw: The ISH firmware
579a267e4617d7 Zhang Lixu 2024-05-06 160 * @fragment: The ISHTP firmware fragment descriptor
579a267e4617d7 Zhang Lixu 2024-05-06 161 * @dma_bufs: The array of DMA fragment buffers
579a267e4617d7 Zhang Lixu 2024-05-06 162 * @fragment_size: The size of a single DMA fragment
579a267e4617d7 Zhang Lixu 2024-05-06 163 *
579a267e4617d7 Zhang Lixu 2024-05-06 164 * Return: 0 on success, negative error code on failure
579a267e4617d7 Zhang Lixu 2024-05-06 165 */
579a267e4617d7 Zhang Lixu 2024-05-06 166 static int prepare_dma_bufs(struct ishtp_device *dev,
579a267e4617d7 Zhang Lixu 2024-05-06 167 const struct firmware *ish_fw,
579a267e4617d7 Zhang Lixu 2024-05-06 168 struct loader_xfer_dma_fragment *fragment,
5180be24abbcc0 Arnd Bergmann 2024-05-31 169 void **dma_bufs, u32 fragment_size, u32 fragment_count)
579a267e4617d7 Zhang Lixu 2024-05-06 @170 {
2360497238261f Zhang Lixu 2024-05-23 171 dma_addr_t dma_addr;
579a267e4617d7 Zhang Lixu 2024-05-06 172 u32 offset = 0;
5180be24abbcc0 Arnd Bergmann 2024-05-31 173 u32 length;
579a267e4617d7 Zhang Lixu 2024-05-06 174 int i;
579a267e4617d7 Zhang Lixu 2024-05-06 175
5180be24abbcc0 Arnd Bergmann 2024-05-31 176 for (i = 0; i < fragment_count && offset < ish_fw->size; i++) {
2360497238261f Zhang Lixu 2024-05-23 177 dma_bufs[i] = dma_alloc_coherent(dev->devc, fragment_size, &dma_addr, GFP_KERNEL);
579a267e4617d7 Zhang Lixu 2024-05-06 178 if (!dma_bufs[i])
579a267e4617d7 Zhang Lixu 2024-05-06 179 return -ENOMEM;
579a267e4617d7 Zhang Lixu 2024-05-06 180
2360497238261f Zhang Lixu 2024-05-23 181 fragment->fragment_tbl[i].ddr_adrs = cpu_to_le64(dma_addr);
5180be24abbcc0 Arnd Bergmann 2024-05-31 182 length = clamp(ish_fw->size - offset, 0, fragment_size);
5180be24abbcc0 Arnd Bergmann 2024-05-31 183 fragment->fragment_tbl[i].length = cpu_to_le32(length);
5180be24abbcc0 Arnd Bergmann 2024-05-31 184 fragment->fragment_tbl[i].fw_off = cpu_to_le32(offset);
5180be24abbcc0 Arnd Bergmann 2024-05-31 185 memcpy(dma_bufs[i], ish_fw->data + offset, length);
579a267e4617d7 Zhang Lixu 2024-05-06 186 clflush_cache_range(dma_bufs[i], fragment_size);
579a267e4617d7 Zhang Lixu 2024-05-06 187
5180be24abbcc0 Arnd Bergmann 2024-05-31 188 offset += length;
579a267e4617d7 Zhang Lixu 2024-05-06 189 }
579a267e4617d7 Zhang Lixu 2024-05-06 190
579a267e4617d7 Zhang Lixu 2024-05-06 191 return 0;
579a267e4617d7 Zhang Lixu 2024-05-06 192 }
579a267e4617d7 Zhang Lixu 2024-05-06 193
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki