diff mbox series

[2/4] kvm x86/mmu: Make struct kernel_param_ops definitions const

Message ID ed95eef4f10fc1317b66936c05bc7dd8f943a6d5.1601770305.git.joe@perches.com (mailing list archive)
State New, archived
Headers show
Series treewide: Make definitions of struct kernel_param_ops const | expand

Commit Message

Joe Perches Oct. 4, 2020, 12:18 a.m. UTC
These should be const, so make it so.

Signed-off-by: Joe Perches <joe@perches.com>
---
 arch/x86/kvm/mmu/mmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ben Gardon Oct. 5, 2020, 5:14 p.m. UTC | #1
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
>
Paolo Bonzini Oct. 19, 2020, 3:50 p.m. UTC | #2
On 05/10/20 19:14, Ben Gardon wrote:
> Reviewed-by: Ben Gardon <bgardon@google.com>

Queued, thanks.

Paolo
diff mbox series

Patch

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,
 };