diff mbox series

arm64: alternatives: make apply_alternatives_vdso() static

Message ID 20221117131650.4056636-1-mark.rutland@arm.com (mailing list archive)
State New, archived
Headers show
Series arm64: alternatives: make apply_alternatives_vdso() static | expand

Commit Message

Mark Rutland Nov. 17, 2022, 1:16 p.m. UTC
We define and use apply_alternatives_vdso() within alternative.c, and
don't provide a prototype in a header. There's no need for it to be
visible outside of alternative.c, so mark it as static.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Will Deacon <will@kernel.org>
---
 arch/arm64/kernel/alternative.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Will Deacon Nov. 18, 2022, 7:40 p.m. UTC | #1
On Thu, 17 Nov 2022 13:16:50 +0000, Mark Rutland wrote:
> We define and use apply_alternatives_vdso() within alternative.c, and
> don't provide a prototype in a header. There's no need for it to be
> visible outside of alternative.c, so mark it as static.
> 
> There should be no functional change as a result of this patch.
> 
> 
> [...]

Applied to arm64 (for-next/trivial), thanks!

[1/1] arm64: alternatives: make apply_alternatives_vdso() static
      https://git.kernel.org/arm64/c/56eea7f87fb6

Cheers,
Jisheng Zhang Dec. 2, 2022, 4:12 p.m. UTC | #2
On Thu, Nov 17, 2022 at 01:16:50PM +0000, Mark Rutland wrote:
> We define and use apply_alternatives_vdso() within alternative.c, and
> don't provide a prototype in a header. There's no need for it to be
> visible outside of alternative.c, so mark it as static.
> 
> There should be no functional change as a result of this patch.
> 
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Joey Gouly <joey.gouly@arm.com>
> Cc: Will Deacon <will@kernel.org>
> ---
>  arch/arm64/kernel/alternative.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c
> index 91263d09ea65..0f5eaa4c3a39 100644
> --- a/arch/arm64/kernel/alternative.c
> +++ b/arch/arm64/kernel/alternative.c
> @@ -196,7 +196,7 @@ static void __apply_alternatives(const struct alt_region *region,
>  	}
>  }
>  
> -void apply_alternatives_vdso(void)
> +static void apply_alternatives_vdso(void)

I found this function can be marked as __init as well.

Thanks
>  {
>  	struct alt_region region;
>  	const struct elf64_hdr *hdr;
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox series

Patch

diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c
index 91263d09ea65..0f5eaa4c3a39 100644
--- a/arch/arm64/kernel/alternative.c
+++ b/arch/arm64/kernel/alternative.c
@@ -196,7 +196,7 @@  static void __apply_alternatives(const struct alt_region *region,
 	}
 }
 
-void apply_alternatives_vdso(void)
+static void apply_alternatives_vdso(void)
 {
 	struct alt_region region;
 	const struct elf64_hdr *hdr;