kernel/dma/mapping.c:922: warning: expecting prototype for dma_addressing_limited(). Prototype was for __dma_addressing_limited() instead
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: bc8aa6cdadcc00862f2b5720e5de2e17f696a081 commit: 2042c352e21d19eaf5f9e22fb6afce72293ef28c [3573/4779] dma/mapping.c: dev_dbg support for dma_addressing_limited config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20250419/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250419/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> kernel/dma/mapping.c:922: warning: expecting prototype for dma_addressing_limited(). Prototype was for __dma_addressing_limited() instead
vim +922 kernel/dma/mapping.c
8ddbe5943c0b12 Christoph Hellwig 2018-12-06 912
8ae0e970319ac0 Jia He 2023-10-28 913 /**
8ae0e970319ac0 Jia He 2023-10-28 914 * dma_addressing_limited - return if the device is addressing limited
8ae0e970319ac0 Jia He 2023-10-28 915 * @dev: device to check
8ae0e970319ac0 Jia He 2023-10-28 916 *
8ae0e970319ac0 Jia He 2023-10-28 917 * Return %true if the devices DMA mask is too small to address all memory in
8ae0e970319ac0 Jia He 2023-10-28 918 * the system, else %false. Lack of addressing bits is the prime reason for
8ae0e970319ac0 Jia He 2023-10-28 919 * bounce buffering, but might not be the only one.
8ae0e970319ac0 Jia He 2023-10-28 920 */
2042c352e21d19 Balbir Singh 2025-04-14 921 static bool __dma_addressing_limited(struct device *dev)
8ae0e970319ac0 Jia He 2023-10-28 @922 {
a409d9600959f3 Jia He 2023-10-28 923 const struct dma_map_ops *ops = get_dma_ops(dev);
a409d9600959f3 Jia He 2023-10-28 924
a409d9600959f3 Jia He 2023-10-28 925 if (min_not_zero(dma_get_mask(dev), dev->bus_dma_limit) <
a409d9600959f3 Jia He 2023-10-28 926 dma_get_required_mask(dev))
a409d9600959f3 Jia He 2023-10-28 927 return true;
a409d9600959f3 Jia He 2023-10-28 928
b348b6d17fd1d5 Leon Romanovsky 2024-09-22 929 if (unlikely(ops) || use_dma_iommu(dev))
a409d9600959f3 Jia He 2023-10-28 930 return false;
a409d9600959f3 Jia He 2023-10-28 931 return !dma_direct_all_ram_mapped(dev);
8ae0e970319ac0 Jia He 2023-10-28 932 }
2042c352e21d19 Balbir Singh 2025-04-14 933 :::::: The code at line 922 was first introduced by commit
:::::: 8ae0e970319ac0b516d285650a744bab4ed3dd37 dma-mapping: move dma_addressing_limited() out of line
:::::: TO: Jia He <[email protected]>
:::::: CC: Christoph Hellwig <[email protected]>
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 42 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: bc8aa6cdadcc00862f2b5720e5de2e17f696a081 commit: 2042c352e21d19eaf5f9e22fb6afce72293ef28c [3573/4779] dma/mapping.c: dev_dbg support for dma_addressing_limited config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20250419/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250419/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All warnings (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
kernel/dma/mapping.c:922: warning: expecting prototype fordma_addressing_limited(). Prototype was for__dma_addressing_limited()insteadvim +922
kernel/dma/mapping.c8ddbe5943c0b12 Christoph Hellwig 2018-12-06 912 8ae0e970319ac0 Jia He 2023-10-28 913 /** 8ae0e970319ac0 Jia He 2023-10-28 914 * dma_addressing_limited - return if the device is addressing limited 8ae0e970319ac0 Jia He 2023-10-28 915 * @dev: device to check 8ae0e970319ac0 Jia He 2023-10-28 916 * 8ae0e970319ac0 Jia He 2023-10-28 917 * Return %true if the devices DMA mask is too small to address all memory in 8ae0e970319ac0 Jia He 2023-10-28 918 * the system, else %false. Lack of addressing bits is the prime reason for 8ae0e970319ac0 Jia He 2023-10-28 919 * bounce buffering, but might not be the only one. 8ae0e970319ac0 Jia He 2023-10-28 920 */ 2042c352e21d19 Balbir Singh 2025-04-14 921 static bool __dma_addressing_limited(struct device *dev) 8ae0e970319ac0 Jia He 2023-10-28 @922 { a409d9600959f3 Jia He 2023-10-28 923 const struct dma_map_ops *ops = get_dma_ops(dev); a409d9600959f3 Jia He 2023-10-28 924 a409d9600959f3 Jia He 2023-10-28 925 if (min_not_zero(dma_get_mask(dev), dev->bus_dma_limit) < a409d9600959f3 Jia He 2023-10-28 926 dma_get_required_mask(dev)) a409d9600959f3 Jia He 2023-10-28 927 return true; a409d9600959f3 Jia He 2023-10-28 928 b348b6d17fd1d5 Leon Romanovsky 2024-09-22 929 if (unlikely(ops) || use_dma_iommu(dev)) a409d9600959f3 Jia He 2023-10-28 930 return false; a409d9600959f3 Jia He 2023-10-28 931 return !dma_direct_all_ram_mapped(dev); 8ae0e970319ac0 Jia He 2023-10-28 932 } 2042c352e21d19 Balbir Singh 2025-04-14 933
Quoted 6 lines
:::::: The code at line 922 was first introduced by commit
::::::8ae0e970319ac0b516d285650a744bab4ed3dd37dma-mapping: movedma_addressing_limited()out of line:::::: TO: Jia He <[email protected]>
:::::: CC: Christoph Hellwig <[email protected]>
I can't reproduce this warning with gcc 14.2.1 on my system with W=1. Assuming that the warning is for the kerneldoc, I can send a patch out to move it to the right function
Balbir Singh
Quoted 45 lines · Balbir Singh
Quoted 44 lines · kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: bc8aa6cdadcc00862f2b5720e5de2e17f696a081 commit: 2042c352e21d19eaf5f9e22fb6afce72293ef28c [3573/4779] dma/mapping.c: dev_dbg support for dma_addressing_limited config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20250419/[email protected]/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250419/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All warnings (new ones prefixed by >>):
Quoted 1 line
Quoted 1 line
kernel/dma/mapping.c:922: warning: expecting prototype fordma_addressing_limited(). Prototype was for__dma_addressing_limited()insteadvim +922
kernel/dma/mapping.c8ddbe5943c0b12 Christoph Hellwig 2018-12-06 912 8ae0e970319ac0 Jia He 2023-10-28 913 /** 8ae0e970319ac0 Jia He 2023-10-28 914 * dma_addressing_limited - return if the device is addressing limited 8ae0e970319ac0 Jia He 2023-10-28 915 * @dev: device to check 8ae0e970319ac0 Jia He 2023-10-28 916 * 8ae0e970319ac0 Jia He 2023-10-28 917 * Return %true if the devices DMA mask is too small to address all memory in 8ae0e970319ac0 Jia He 2023-10-28 918 * the system, else %false. Lack of addressing bits is the prime reason for 8ae0e970319ac0 Jia He 2023-10-28 919 * bounce buffering, but might not be the only one. 8ae0e970319ac0 Jia He 2023-10-28 920 */ 2042c352e21d19 Balbir Singh 2025-04-14 921 static bool __dma_addressing_limited(struct device *dev) 8ae0e970319ac0 Jia He 2023-10-28 @922 { a409d9600959f3 Jia He 2023-10-28 923 const struct dma_map_ops *ops = get_dma_ops(dev); a409d9600959f3 Jia He 2023-10-28 924 a409d9600959f3 Jia He 2023-10-28 925 if (min_not_zero(dma_get_mask(dev), dev->bus_dma_limit) < a409d9600959f3 Jia He 2023-10-28 926 dma_get_required_mask(dev)) a409d9600959f3 Jia He 2023-10-28 927 return true; a409d9600959f3 Jia He 2023-10-28 928 b348b6d17fd1d5 Leon Romanovsky 2024-09-22 929 if (unlikely(ops) || use_dma_iommu(dev)) a409d9600959f3 Jia He 2023-10-28 930 return false; a409d9600959f3 Jia He 2023-10-28 931 return !dma_direct_all_ram_mapped(dev); 8ae0e970319ac0 Jia He 2023-10-28 932 } 2042c352e21d19 Balbir Singh 2025-04-14 933:::::: The code at line 922 was first introduced by commit
::::::8ae0e970319ac0b516d285650a744bab4ed3dd37dma-mapping: movedma_addressing_limited()out of line
Quoted 6 lines
Quoted 3 lines
:::::: TO: Jia He <[email protected]>
:::::: CC: Christoph Hellwig <[email protected]>I can't reproduce this warning with gcc 14.2.1 on my system with W=1. Assuming that the warning is for the kerneldoc, I can send a patch out to move it to the right function
Well, the warnings might depend on the installed plugins. Please move the kerneldoc to the right function.
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland