Skip to content

Commit 525077a

Browse files
Baoquan Hebp3tk0v
authored andcommitted
x86/ioremap: Remove unused size parameter in remapping functions
The size parameter of functions memremap_is_efi_data(), memremap_is_setup_data() and early_memremap_is_setup_data() is not used. Remove it. [ bp: Massage commit message. ] Signed-off-by: Baoquan He <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 095ac6f commit 525077a

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

arch/x86/mm/ioremap.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,7 @@ static bool memremap_should_map_decrypted(resource_size_t phys_addr,
593593
* Examine the physical address to determine if it is EFI data. Check
594594
* it against the boot params structure and EFI tables and memory types.
595595
*/
596-
static bool memremap_is_efi_data(resource_size_t phys_addr,
597-
unsigned long size)
596+
static bool memremap_is_efi_data(resource_size_t phys_addr)
598597
{
599598
u64 paddr;
600599

@@ -705,14 +704,12 @@ static bool __ref __memremap_is_setup_data(resource_size_t phys_addr, bool early
705704
return false;
706705
}
707706

708-
static bool memremap_is_setup_data(resource_size_t phys_addr,
709-
unsigned long size)
707+
static bool memremap_is_setup_data(resource_size_t phys_addr)
710708
{
711709
return __memremap_is_setup_data(phys_addr, false);
712710
}
713711

714-
static bool __init early_memremap_is_setup_data(resource_size_t phys_addr,
715-
unsigned long size)
712+
static bool __init early_memremap_is_setup_data(resource_size_t phys_addr)
716713
{
717714
return __memremap_is_setup_data(phys_addr, true);
718715
}
@@ -735,8 +732,8 @@ bool arch_memremap_can_ram_remap(resource_size_t phys_addr, unsigned long size,
735732
return false;
736733

737734
if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT)) {
738-
if (memremap_is_setup_data(phys_addr, size) ||
739-
memremap_is_efi_data(phys_addr, size))
735+
if (memremap_is_setup_data(phys_addr) ||
736+
memremap_is_efi_data(phys_addr))
740737
return false;
741738
}
742739

@@ -761,8 +758,8 @@ pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr,
761758
encrypted_prot = true;
762759

763760
if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT)) {
764-
if (early_memremap_is_setup_data(phys_addr, size) ||
765-
memremap_is_efi_data(phys_addr, size))
761+
if (early_memremap_is_setup_data(phys_addr) ||
762+
memremap_is_efi_data(phys_addr))
766763
encrypted_prot = false;
767764
}
768765

0 commit comments

Comments
 (0)