Message ID | 20240326112448.29332-1-ilpo.jarvinen@linux.intel.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | [1/1] cleanup: Fix sparse complaining about passing iomem ptr to no_free_ptr() | expand |
diff --git a/include/linux/cleanup.h b/include/linux/cleanup.h index c2d09bc4f976..4f4d709c3967 100644 --- a/include/linux/cleanup.h +++ b/include/linux/cleanup.h @@ -73,7 +73,7 @@ const volatile void * __must_check_fn(const volatile void *val) { return val; } #define no_free_ptr(p) \ - ((typeof(p)) __must_check_fn(__get_and_null_ptr(p))) + ((typeof(p)) __must_check_fn((__force const volatile void *)__get_and_null_ptr(p))) #define return_ptr(p) return no_free_ptr(p)