From patchwork Mon May 29 13:01:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9753189 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 F3CAC60249 for ; Mon, 29 May 2017 13:03:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D797427853 for ; Mon, 29 May 2017 13:03:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC0392841C; Mon, 29 May 2017 13:03:37 +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 656CD27853 for ; Mon, 29 May 2017 13:03:37 +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 1dFKIg-0003JE-2a; Mon, 29 May 2017 13:01:34 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFKIe-0003J7-91 for xen-devel@lists.xenproject.org; Mon, 29 May 2017 13:01:32 +0000 Received: from [193.109.254.147] by server-7.bemta-6.messagelabs.com id 85/75-03620-BAB1C295; Mon, 29 May 2017 13:01:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRWlGSWpSXmKPExsVy0+OAp+5qaZ1 Ig+63jBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aZxn3sBQu5Ko7PXsXSwPibo4uRi0NIYBuj xIE3+5i6GDk52ASUJV4fncIKYosI6Etsut3IDlLELLCSUeL7489gCWEBK4mNr3tYQGwWAVWJz /3f2UBsXgFjiWt9Z5hBbAkBOYmG8/eZQZolBD4zSnRtXsEG4Wxjk9jUs5p5AiPXAkaGVYwaxa lFZalFuoYWeklFmekZJbmJmTm6hgZmermpxcWJ6ak5iUnFesn5uZsYgd5kAIIdjDc3BhxilOR gUhLlXbdeO1KILyk/pTIjsTgjvqg0J7X4EKMMB4eSBO9zCZ1IIcGi1PTUirTMHGBYwaQlOHiU RHj3SQKleYsLEnOLM9MhUqcYdTk2rF7/hUmIJS8/L1VKnNdfCqhIAKQoozQPbgQsxC8xykoJ8 zICHSXEU5BalJtZgir/ilGcg1FJmLcZZApPZl4J3KZXQEcwAR2xa4c2yBEliQgpqQbGzBfKM6 QPhzxkOvv+3dPJZ13vOpTaO894+YqpJ61KrFLGav9S2X9K/Qtvvfdt+2mw+aXuLHa2uXtMjjy 7p8DAl1174eOcxDPsyV/eJWlOnScq0f8keOllo4R/WnwX571qupO24mnlbU3p7KzjGzfl3t/S Il1fx3GscM37AhvFN2rWxxKPqYnfV2Ipzkg01GIuKk4EAG0DDlZsAgAA X-Env-Sender: arnd@arndb.de X-Msg-Ref: server-2.tower-27.messagelabs.com!1496062890!45374338!1 X-Originating-IP: [217.72.192.73] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17019 invoked from network); 29 May 2017 13:01:31 -0000 Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (217.72.192.73) by server-2.tower-27.messagelabs.com with DHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 29 May 2017 13:01:30 -0000 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0LheU5-1dkYJK41qr-00moe5; Mon, 29 May 2017 15:01:28 +0200 From: Arnd Bergmann To: Stefano Stabellini Date: Mon, 29 May 2017 15:01:14 +0200 Message-Id: <20170529130125.307182-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:clBqVf39XIDuNzHLgv3YlaXFKqy19yi/nABp+vAuj8pQU0Z9H1A m1SNhtJpotjknHIMYjEmc+id7+3djy/vaAFbrBMg6Vi0+XXkbflC9RiGRVFMwNhi/LQnSqN /lLsgi7GkQ0oHgGRH6Mgp16L5nKeMhOkQpzsnXhp0qrTlVgWEXTXqpBd8PoWiVhLTZCAIMS oJPD5B/rUa+/j+rI80vyQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:HlgR3ixdWFQ=:BgKkWleTdc0Ld7C+PHrhxn /h2okGphY3y73d/2JcufuuEEN5DsUaCe91FiWFtpEgvgqvwGRzNa7XIUXCUE4FTe0IBhWGdOv Bdj8YuUWysf3pJQkElzOwiaNJxvXqh8ox0omV3G6+EqRoI/tx5+XzroCk3z1wbztCSTLCzMGD yKQFyMqIUI0NwN92tSQNW9jUCZvlfEuhy9C+5JftuxzLxj/M/uzQXsW3/1pLr9Vjf7/NhG+1m J7AcUaLVMGn/q95Qb7iEXFpv0Uqz78Opku6Xmk3682FupCIHWqsQZCbWdnzDgs9Z+ZGK5CdUR 6B9/Cer6CkO4xuO0xP7bxI0hIGcgJmVILbr1KKOMn8bhzzG3dCx0/E880cvj7EGbLBQuGSF2g hyAIEqPXXZtCGynNgjK+lZRKetEkiG7Xggx1dqTC2zH1b2Yi/YTiEsYvYasy00W56MErETrvl Y2AHw9STehC9rnPhWBNqCzBSpfn0RLt4QzXGS6f7CqleRt2+7N+6wpEBXhNgHrUsApDiRPX/i mXdDzsoeiNaxxZQMKq8Shim3Udp0THWiGySyOAHL4vrARMgCzrltAQoHSZKv2IL/oRhd4DjXt f49uGzAYrckFbEalo6Nk0mjotxH0gEGI1XfBCd8l4vdHPgOhKpsD3Pt97rmv4X8JMwDhpnuM3 SJBb3Uf6Yfv5uz5Fn2v87LuSFOEnROjJZ5TfITBskPbDFh+J+oMhiwDyoNEidiB5hwAU= Cc: xen-devel@lists.xenproject.org, Ian Abbott , linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [Xen-devel] [PATCH] xen: avoid type warning in xchg_xen_ulong 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The improved type-checking version of container_of() triggers a warning for xchg_xen_ulong, pointing out that 'xen_ulong_t' is unsigned, but atomic64_t contains a signed value: drivers/xen/events/events_2l.c: In function 'evtchn_2l_handle_events': arch/x86/include/asm/cmpxchg.h:87:21: error: 'pending_words' is used uninitialized in this function [-Werror=uninitialized] This adds a cast to work around the warning Cc: Ian Abbott Fixes: 85323a991d40 ("xen: arm: mandate EABI and use generic atomic operations.") Fixes: daa2ac80834d ("kernel.h: handle pointers to arrays better in container_of()") Signed-off-by: Arnd Bergmann --- arch/arm/include/asm/xen/events.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/xen/events.h b/arch/arm/include/asm/xen/events.h index 71e473d05fcc..620dc75362e5 100644 --- a/arch/arm/include/asm/xen/events.h +++ b/arch/arm/include/asm/xen/events.h @@ -16,7 +16,7 @@ static inline int xen_irqs_disabled(struct pt_regs *regs) return raw_irqs_disabled_flags(regs->ARM_cpsr); } -#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((ptr), \ +#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((long long*)(ptr),\ atomic64_t, \ counter), (val))