[openeuler:OLK-5.10 2999/2999] drivers/crypto/ccp/hygon/hct.c:1343:15: warning: no previous prototype for 'hct_pin_memory'

tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: e4755f6a2b98f251edcf63f98f416b5d76425f8c commit: b7a218b5c46200f323ac0fe07589e0bf0d648069 [2999/2999] crypto: hct: provides hygon crypto technology ccp device driver. config: x86_64-buildonly-randconfig-2004-20250702 (https://download.01.org/0day-ci/archive/20250702/202507021158.W1ajhxKz-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250702/202507021158.W1ajhxKz-lkp@i...) 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/202507021158.W1ajhxKz-lkp@intel.com/ All warnings (new ones prefixed by >>):
drivers/crypto/ccp/hygon/hct.c:1343:15: warning: no previous prototype for 'hct_pin_memory' [-Wmissing-prototypes] 1343 | struct page **hct_pin_memory(struct hct_private *private, unsigned long uaddr, | ^~~~~~~~~~~~~~
vim +/hct_pin_memory +1343 drivers/crypto/ccp/hygon/hct.c 1342
1343 struct page **hct_pin_memory(struct hct_private *private, unsigned long uaddr, 1344 unsigned long ulen, unsigned long *n) 1345 { 1346 unsigned long npages, size; 1347 int npinned; 1348 struct page **pages; 1349 unsigned long first, last; 1350 1351 if (ulen == 0 || uaddr + ulen < uaddr) 1352 return NULL; 1353 1354 first = (uaddr & PAGE_MASK) >> PAGE_SHIFT; 1355 last = ((uaddr + ulen - 1) & PAGE_MASK) >> PAGE_SHIFT; 1356 npages = (last - first + 1); 1357 1358 if (WARN_ON_ONCE(npages > INT_MAX)) 1359 return NULL; 1360 1361 size = npages * sizeof(struct page *); 1362 if (size > PAGE_SIZE) 1363 pages = vmalloc(size); 1364 else 1365 pages = kmalloc(size, GFP_KERNEL); 1366 1367 if (!pages) 1368 return NULL; 1369 1370 /* Pin the user virtual address. */ 1371 npinned = pin_user_pages_fast(uaddr, npages, FOLL_WRITE, pages); 1372 if (npinned != npages) 1373 goto err; 1374 1375 *n = npages; 1376 return pages; 1377 1378 err: 1379 if (npinned > 0) 1380 unpin_user_pages(pages, npinned); 1381 kvfree(pages); 1382 return NULL; 1383 } 1384
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot