From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbdIRIn1 (ORCPT ); Mon, 18 Sep 2017 04:43:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:55788 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750813AbdIRInZ (ORCPT ); Mon, 18 Sep 2017 04:43:25 -0400 Subject: Re: [PATCH] x86/xen: clean up clang build warning To: Colin King , Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, xen-devel@lists.xenproject.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170918083817.26870-1-colin.king@canonical.com> From: Juergen Gross Message-ID: <681e7853-f71b-e092-e56b-1d0a2c1ddefe@suse.com> Date: Mon, 18 Sep 2017 10:43:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170918083817.26870-1-colin.king@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/09/17 10:38, Colin King wrote: > From: Colin Ian King > > 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 With the code style issue pointed out below fixed: Reviewed-by: Juergen Gross > --- > 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; Please omit the space here ^ Juergen > + > mcl->args[0] = maddr; > mcl->args[1] = maddr >> 32; > mcl->args[2] = *p++; >