lkml.org 
[lkml]   [2020]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/4] kvm x86/mmu: Make struct kernel_param_ops definitions const
On Sat, Oct 3, 2020 at 5:18 PM Joe Perches <joe@perches.com> wrote:
>
> These should be const, so make it so.
>
> Signed-off-by: Joe Perches <joe@perches.com>

Reviewed-by: Ben Gardon <bgardon@google.com>

> ---
> arch/x86/kvm/mmu/mmu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 71aa3da2a0b7..6500dd681750 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -64,12 +64,12 @@ static uint __read_mostly nx_huge_pages_recovery_ratio = 60;
> static int set_nx_huge_pages(const char *val, const struct kernel_param *kp);
> static int set_nx_huge_pages_recovery_ratio(const char *val, const struct kernel_param *kp);
>
> -static struct kernel_param_ops nx_huge_pages_ops = {
> +static const struct kernel_param_ops nx_huge_pages_ops = {
> .set = set_nx_huge_pages,
> .get = param_get_bool,
> };
>
> -static struct kernel_param_ops nx_huge_pages_recovery_ratio_ops = {
> +static const struct kernel_param_ops nx_huge_pages_recovery_ratio_ops = {
> .set = set_nx_huge_pages_recovery_ratio,
> .get = param_get_uint,
> };
> --
> 2.26.0
>

\
 
 \ /
  Last update: 2020-10-05 19:15    [W:0.155 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site