From: Wei Liu <wei.liu@kernel.org>
To: Michael Kelley <mikelley@microsoft.com>
Cc: sthemmin@microsoft.com, kys@microsoft.com, wei.liu@kernel.org,
decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org,
hpa@zytor.com, arnd@arndb.de, tianyu.lan@microsoft.com,
linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: Re: [PATCH 1/2] Drivers: hv: Fix definition of hypercall input & output arg variables
Date: Tue, 28 Dec 2021 14:10:17 +0000 [thread overview]
Message-ID: <20211228141017.deahhdqc3i6w4kyy@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <1640662315-22260-1-git-send-email-mikelley@microsoft.com>
On Mon, Dec 27, 2021 at 07:31:54PM -0800, Michael Kelley wrote:
> The percpu variables hyperv_pcpu_input_arg and hyperv_pcpu_output_arg
> have been incorrectly defined since their inception. The __percpu
> qualifier should be associated with the void * (i.e., a pointer), not
> with the target of the pointer. This distinction makes no difference
> to gcc and the generated code, but sparse correctly complains. Fix
> the definitions in the interest of general correctness in addition
> to making sparse happy.
>
> No functional change.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Good catch. I failed to interpret sparse's complaints.
Both patches queued to hyperv-next. Thanks.
> ---
> drivers/hv/hv_common.c | 4 ++--
> include/asm-generic/mshyperv.h | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hv/hv_common.c b/drivers/hv/hv_common.c
> index 7be173a..7477e5a 100644
> --- a/drivers/hv/hv_common.c
> +++ b/drivers/hv/hv_common.c
> @@ -44,10 +44,10 @@
> u32 hv_max_vp_index;
> EXPORT_SYMBOL_GPL(hv_max_vp_index);
>
> -void __percpu **hyperv_pcpu_input_arg;
> +void * __percpu *hyperv_pcpu_input_arg;
> EXPORT_SYMBOL_GPL(hyperv_pcpu_input_arg);
>
> -void __percpu **hyperv_pcpu_output_arg;
> +void * __percpu *hyperv_pcpu_output_arg;
> EXPORT_SYMBOL_GPL(hyperv_pcpu_output_arg);
>
> /*
> diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h
> index 3e2248ac..95b7888 100644
> --- a/include/asm-generic/mshyperv.h
> +++ b/include/asm-generic/mshyperv.h
> @@ -49,8 +49,8 @@ struct ms_hyperv_info {
> };
> extern struct ms_hyperv_info ms_hyperv;
>
> -extern void __percpu **hyperv_pcpu_input_arg;
> -extern void __percpu **hyperv_pcpu_output_arg;
> +extern void * __percpu *hyperv_pcpu_input_arg;
> +extern void * __percpu *hyperv_pcpu_output_arg;
>
> extern u64 hv_do_hypercall(u64 control, void *inputaddr, void *outputaddr);
> extern u64 hv_do_fast_hypercall8(u16 control, u64 input8);
> --
> 1.8.3.1
>
prev parent reply other threads:[~2021-12-28 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 3:31 [PATCH 1/2] Drivers: hv: Fix definition of hypercall input & output arg variables Michael Kelley
2021-12-28 3:31 ` [PATCH 2/2] x86/hyperv: Fix definition of hv_ghcb_pg variable Michael Kelley
2021-12-28 14:10 ` Wei Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211228141017.deahhdqc3i6w4kyy@liuwe-devbox-debian-v2 \
--to=wei.liu@kernel.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=hpa@zytor.com \
--cc=kys@microsoft.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=tianyu.lan@microsoft.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox