Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735550
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH][V2] x86/xen: clean up clang build warning |
| Date | 2017-09-20 08:30 +0200 |
| Message-ID | <urGGd-7Hy-7@gated-at.bofh.it> (permalink) |
| References | <ur0dY-47N-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 18/09/17 11:03, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> In the case where sizeof(maddr) != sizeof(long) p is initialized and
> never read and clang throws a warning on this. Move declaration of
> p to clean up the clang build warning:
>
> warning: Value stored to 'p' during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
> ---
> arch/x86/include/asm/xen/hypercall.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
> index 9606688caa4b..5ff77cb2529e 100644
> --- a/arch/x86/include/asm/xen/hypercall.h
> +++ b/arch/x86/include/asm/xen/hypercall.h
> @@ -552,13 +552,13 @@ static inline void
> MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
> struct desc_struct desc)
> {
> - u32 *p = (u32 *) &desc;
> -
> mcl->op = __HYPERVISOR_update_descriptor;
> if (sizeof(maddr) == sizeof(long)) {
> mcl->args[0] = maddr;
> mcl->args[1] = *(unsigned long *)&desc;
> } else {
> + u32 *p = (u32 *)&desc;
> +
> mcl->args[0] = maddr;
> mcl->args[1] = maddr >> 32;
> mcl->args[2] = *p++;
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH][V2] x86/xen: clean up clang build warning Colin King <colin.king@canonical.com> - 2017-09-18 11:10 +0200 Re: [PATCH][V2] x86/xen: clean up clang build warning Juergen Gross <jgross@suse.com> - 2017-09-20 08:30 +0200
csiph-web