* [PATCH] kvmclock: remove redundant variable 'size'
@ 2018-07-02 7:06 Colin King
2018-07-02 15:57 ` Liam Merwick
2018-07-04 21:43 ` David Hildenbrand
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-07-02 7:06 UTC (permalink / raw)
To: Paolo Bonzini, Radim Krčmář,
Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86, kvm
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable size is being assigned but is never used hence it is redundant
and can be removed.
Cleans up clang warning:
warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
arch/x86/kernel/kvmclock.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index bf8d1eb7fca3..45c22ce941c1 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -354,13 +354,10 @@ int __init kvm_setup_vsyscall_timeinfo(void)
int cpu;
u8 flags;
struct pvclock_vcpu_time_info *vcpu_time;
- unsigned int size;
if (!hv_clock)
return 0;
- size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS);
-
cpu = get_cpu();
vcpu_time = &hv_clock[cpu].pvti;
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kvmclock: remove redundant variable 'size'
2018-07-02 7:06 [PATCH] kvmclock: remove redundant variable 'size' Colin King
@ 2018-07-02 15:57 ` Liam Merwick
2018-07-04 21:43 ` David Hildenbrand
1 sibling, 0 replies; 3+ messages in thread
From: Liam Merwick @ 2018-07-02 15:57 UTC (permalink / raw)
To: Colin King, Paolo Bonzini, Radim Krčmář,
Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86, kvm
Cc: kernel-janitors, linux-kernel
On 02/07/18 08:06, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable size is being assigned but is never used hence it is redundant
> and can be removed.
>
> Cleans up clang warning:
> warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
>
Is it worth adding
Fixes: cc1e24fdb064 ("x86/vdso: Remove pvclock fixmap machinery")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
either way
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
> ---
> arch/x86/kernel/kvmclock.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
> index bf8d1eb7fca3..45c22ce941c1 100644
> --- a/arch/x86/kernel/kvmclock.c
> +++ b/arch/x86/kernel/kvmclock.c
> @@ -354,13 +354,10 @@ int __init kvm_setup_vsyscall_timeinfo(void)
> int cpu;
> u8 flags;
> struct pvclock_vcpu_time_info *vcpu_time;
> - unsigned int size;
>
> if (!hv_clock)
> return 0;
>
> - size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS);
> -
> cpu = get_cpu();
>
> vcpu_time = &hv_clock[cpu].pvti;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kvmclock: remove redundant variable 'size'
2018-07-02 7:06 [PATCH] kvmclock: remove redundant variable 'size' Colin King
2018-07-02 15:57 ` Liam Merwick
@ 2018-07-04 21:43 ` David Hildenbrand
1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2018-07-04 21:43 UTC (permalink / raw)
To: Colin King, Paolo Bonzini, Radim Krčmář,
Thomas Gleixner, Ingo Molnar, H . Peter Anvin, x86, kvm
Cc: kernel-janitors, linux-kernel
On 02.07.2018 09:06, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable size is being assigned but is never used hence it is redundant
> and can be removed.
>
> Cleans up clang warning:
> warning: variable ‘size’ set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> arch/x86/kernel/kvmclock.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
> index bf8d1eb7fca3..45c22ce941c1 100644
> --- a/arch/x86/kernel/kvmclock.c
> +++ b/arch/x86/kernel/kvmclock.c
> @@ -354,13 +354,10 @@ int __init kvm_setup_vsyscall_timeinfo(void)
> int cpu;
> u8 flags;
> struct pvclock_vcpu_time_info *vcpu_time;
> - unsigned int size;
>
> if (!hv_clock)
> return 0;
>
> - size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS);
> -
> cpu = get_cpu();
>
> vcpu_time = &hv_clock[cpu].pvti;
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-04 21:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 7:06 [PATCH] kvmclock: remove redundant variable 'size' Colin King
2018-07-02 15:57 ` Liam Merwick
2018-07-04 21:43 ` David Hildenbrand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®