diff options
| author | Ilpo Järvinen <[email protected]> | 2025-03-10 12:21:58 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2025-03-10 19:02:14 +0000 |
| commit | 366fef794bd2b7c2e9df933f6828dd9739bfba84 (patch) | |
| tree | 0f34ba78f5bbe8f08bc9fe9dbd93d242903ac74c /tools/testing/selftests/net/lib/py/utils.py | |
| parent | Linux 6.14-rc6 (diff) | |
| download | kernel-366fef794bd2b7c2e9df933f6828dd9739bfba84.tar.gz kernel-366fef794bd2b7c2e9df933f6828dd9739bfba84.zip | |
<linux/cleanup.h>: Allow the passing of both iomem and non-iomem pointers to no_free_ptr()
Calling no_free_ptr() for an __iomem pointer results in Sparse
complaining about the types:
warning: incorrect type in argument 1 (different address spaces)
expected void const volatile *val
got void [noderef] __iomem *__val
[ The example is from drivers/platform/x86/intel/pmc/core_ssram.c:283 ]
The problem is caused by the signature of __must_check_fn() added in:
85be6d842447 ("cleanup: Make no_free_ptr() __must_check")
... to enforce that the return value is always used.
Use __force to allow both iomem and non-iomem pointers to be given for
no_free_ptr().
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Reviewed-by: Dan Williams <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
