From patchwork Mon Sep 18 09:03:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 9955755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA0B260208 for ; Mon, 18 Sep 2017 09:05:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9EDD28BFD for ; Mon, 18 Sep 2017 09:05:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D25228C06; Mon, 18 Sep 2017 09:05:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 309F528BFD for ; Mon, 18 Sep 2017 09:05:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtrxf-000163-TJ; Mon, 18 Sep 2017 09:03:27 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtrxe-00015w-6q for xen-devel@lists.xenproject.org; Mon, 18 Sep 2017 09:03:26 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id F2/56-02226-DDB8FB95; Mon, 18 Sep 2017 09:03:25 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeJIrShJLcpLzFFi42KJ3htZoHune3+ kwa12Q4vvWyYzOTB6HP5whSWAMYo1My8pvyKBNePzgovsBXc5Kg5N+87WwLiOvYuRi0NIoJFJ Yv76Q2xdjJwcbALaEvuftbCBJEQEPjBK/D2/nAkkwSzgJPHnawdrFyMHh7CAlcTWh6EgYRYBV Ykzs48zg9i8ArYS65ues4DYEgLyEuce3IaKC0qcnPmEBaSVWUBTYv0ufYiJ8hLNW2czT2Dkno WkahZC1SwkVQsYmVcxahSnFpWlFukaG+glFWWmZ5TkJmbm6BoaGOvlphYXJ6an5iQmFesl5+d uYgSGSD0DA+MOxs4TfocYJTmYlER5RSP3RwrxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4P3UBZQT LEpNT61Iy8wBBitMWoKDR0mE1xIYsEK8xQWJucWZ6RCpU4y6HB037/5hEmLJy89LlRLn/Q8yQ wCkKKM0D24ELHIuMcpKCfMyMjAwCPEUpBblZpagyr9iFOdgVBLm/QoyhSczrwRu0yugI5iAjm jZsQfkiJJEhJRUA6OrzJWmvqz1ESsEEmPXH/8gOTnUTdjrt8Gjr8Ju4SeXRjjxz7HQSilVP74 tT/SjqhNXKMf6e6puq77cURQ3YJ6Sto7x3cYWobBlYfNdBaR8djHdP7Hj7OOcTUYm399IaP99 5ve9sK9svl7/MQsLnt05MVZzrHf86LSfECy5jEepjuNkzGz1PCWW4oxEQy3mouJEACDqkM2XA gAA X-Env-Sender: colin.king@canonical.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1505725404!84393466!1 X-Originating-IP: [91.189.89.112] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 38896 invoked from network); 18 Sep 2017 09:03:24 -0000 Received: from youngberry.canonical.com (HELO youngberry.canonical.com) (91.189.89.112) by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP; 18 Sep 2017 09:03:24 -0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1dtrxQ-0002Wk-Ef; Mon, 18 Sep 2017 09:03:12 +0000 From: Colin King To: Boris Ostrovsky , Juergen Gross , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, xen-devel@lists.xenproject.org Date: Mon, 18 Sep 2017 10:03:12 +0100 Message-Id: <20170918090312.27283-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Xen-devel] [PATCH][V2] x86/xen: clean up clang build warning X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 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; + mcl->args[0] = maddr; mcl->args[1] = maddr >> 32; mcl->args[2] = *p++;