diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-03-10 15:21:58 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-10 22:02:14 +0300 |
commit | 366fef794bd2b7c2e9df933f6828dd9739bfba84 (patch) | |
tree | 0f34ba78f5bbe8f08bc9fe9dbd93d242903ac74c /tools/perf/scripts/python/task-analyzer.py | |
parent | 80e54e84911a923c40d7bee33a34c1b4be148d7a (diff) | |
download | linux-366fef794bd2b7c2e9df933f6828dd9739bfba84.tar.xz |
<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 <lkp@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250310122158.20966-1-ilpo.jarvinen@linux.intel.com
Closes: https://lore.kernel.org/oe-kbuild-all/202403050547.qnZtuNlN-lkp@intel.com/
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions