aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers.c
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2023-08-10 07:27:04 +0000
committerJuergen Gross <[email protected]>2023-08-21 07:52:29 +0000
commit067e4f174f6d4ecf8872ad93d859d57bab44f7b6 (patch)
treee3ca256efdf0b85d1455569f9fc1d04eefc13ca4 /rust/helpers.c
parentxen: remove a confusing comment on auto-translated guest I/O (diff)
downloadkernel-067e4f174f6d4ecf8872ad93d859d57bab44f7b6.tar.gz
kernel-067e4f174f6d4ecf8872ad93d859d57bab44f7b6.zip
x86/xen: Make virt_to_pfn() a static inline
Making virt_to_pfn() a static inline taking a strongly typed (const void *) makes the contract of a passing a pointer of that type to the function explicit and exposes any misuse of the macro virt_to_pfn() acting polymorphic and accepting many types such as (void *), (unitptr_t) or (unsigned long) as arguments without warnings. Also fix all offending call sites to pass a (void *) rather than an unsigned long. Since virt_to_mfn() is wrapping virt_to_pfn() this function has become polymorphic as well so the usage need to be fixed up. Signed-off-by: Linus Walleij <[email protected]> Acked-by: Juergen Gross <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions