diff options
author | Linus Walleij <[email protected]> | 2023-08-08 10:40:58 +0200 |
---|---|---|
committer | Michal Simek <[email protected]> | 2023-08-23 09:35:22 +0200 |
commit | 0d2b49479bf91c857d83608da7b64328e556dff7 (patch) | |
tree | 344c729e06a74ee0f166215611a5a8c5e393f950 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | b48edb8665fe7b90ff11b23bcc949fee95c035f0 (diff) |
microblaze: 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.
Move the function down in the file so __pa() exists in our
scope, and it compiles. This in turn requires moving __pa()
as it depends on __virt_to_phys() that was below. (Lazy macro
evaluation conflicts with strict function ordering.)
Make a symmetric change to pfn_to_virt() so we have type
checking both ways.
Due to this the <asm/page.h> file being included into some
assembly files, some further inclusion guards are needed
to make sure assembly keeps compiling.
Signed-off-by: Linus Walleij <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions