From patchwork Thu Jun 8 08:53:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9774243 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 C155E60350 for ; Thu, 8 Jun 2017 08:55:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF0D928536 for ; Thu, 8 Jun 2017 08:55:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A24B328548; Thu, 8 Jun 2017 08:55:57 +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 0B77A28536 for ; Thu, 8 Jun 2017 08:55:56 +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 1dItCA-0006sA-RL; Thu, 08 Jun 2017 08:53:34 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dItCA-0006s4-2n for xen-devel@lists.xenproject.org; Thu, 08 Jun 2017 08:53:34 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id C4/C3-19466-D8019395; Thu, 08 Jun 2017 08:53:33 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRWlGSWpSXmKPExsVy5bEgl26ngGW kwdKn2hbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bk9S2MBS3cFQu+/WBpYDzP2cXIxSEksI1R out5H3sXIycHm4CyxOujU1hBbBEBfYlNtxvZQYqYBS4wSmx5t5MRJCEsYCuxtGE+E4jNIqAq8 XrtLzCbV8BEYt6efcwgtoSAnETD+fvMIM0SAp8ZJdpudEM529gkju9azTSBkWsBI8MqRo3i1K Ky1CJdQyO9pKLM9IyS3MTMHF1DA1O93NTi4sT01JzEpGK95PzcTYxAbzIAwQ7GvlnOhxglOZi URHldHltECvEl5adUZiQWZ8QXleakFh9ilOHgUJLg/clvGSkkWJSanlqRlpkDDCuYtAQHj5II 708uoDRvcUFibnFmOkTqFKMux4bV678wCbHk5eelSonzPgOZIQBSlFGaBzcCFuKXGGWlhHkZg Y4S4ilILcrNLEGVf8UozsGoJMzbBDKFJzOvBG7TK6AjmICOWPLOAuSIkkSElFQDoyATc277Ik /eky6vHHeUP5r7nXtq0VRl+0XBF3YemZhlLP7UoXXiyZvRv378Kb+o5Lnw+jKTvLbrO9h152R HrZNcuiL/gEnZbJP4XyVrp+eWlhRWB0o/Lf5uoF4exa+7fF5C9LNlybMLnSy3TZQ5LKdd2JFm +qhY/PnCh5tV+ozaEl+YPNuYpsRSnJFoqMVcVJwIAAJ2G6lsAgAA X-Env-Sender: arnd@arndb.de X-Msg-Ref: server-13.tower-206.messagelabs.com!1496912009!86901832!1 X-Originating-IP: [212.227.17.10] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: QmFkIElQOiAyMTIuMjI3LjE3LjEwID0+IDY3OTMx\n,sa_preprocessor: QmFkIElQOiAyMTIuMjI3LjE3LjEwID0+IDY3OTMx\n X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4414 invoked from network); 8 Jun 2017 08:53:29 -0000 Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.17.10) by server-13.tower-206.messagelabs.com with DHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 8 Jun 2017 08:53:29 -0000 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MeShL-1dVKbx3vu3-00QEc1; Thu, 08 Jun 2017 10:53:27 +0200 From: Arnd Bergmann To: Stefano Stabellini Date: Thu, 8 Jun 2017 10:53:10 +0200 Message-Id: <20170608085323.2209174-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:oSNnLxiyNH4sEUDT4c9jtuzh9PHksObS3u+X2D5Kq3hHtAqwvZ7 GrxvP1YI7gbQF20vTeROObUyHcH84HFQ12f02MWyzEsIq0GaLqX0CbAOoCXOksHntVnzIS5 B/+h/YiJhnVp0eLm95ob0imPxzdhhSwtQrJWUcgzUqF05Avk2gwBe8Se3X6vRFCpr2ZcAIW 2G0S1/WIO5uBwZQj/cCIQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:sovHbH8vNew=:vfJiQ6lHF5ej+V1RHVPAxn aw0hjSTwx5Dbmxjvk0SK5b7ck4GvQ/5gmlfaG8FF6++l0wiI2vtl7NelnUDgYf6+w3aVCXYZm x8noFjfLjpaW8JNDd7IGBmrCRlwxaqzQG/BDg+x5UCGOIPEPG7n4U28wvVHkKIFIYVfkhNWtF uWkEKeaEvSn5WHslVzxr/Pi3Qe3grg1yGtH6JQWCUNIZ3AD9PrQYrKlCCPGW2/4d6iBEUuP97 xwrNcbS6MCN+nFmwcu5U81Mxy7Scmxq/h9IUx/kZy7WRifXNsGmy49WzxfQdn4iQ4zHyfj+7b lZIk7yikgsIt1daTf3R4gxQ1Dci/JFQDp9hWNn3zaPAr7jPFJbpeD8NnWQOyP+gReNY84IoVT E8zw01fUTH4/Hi3lEEM6DG6bHkbMhwvYbxafJVlU419SFOKcDC69Inm4eJWkVBKSAZnbMNYfD jJWZ+aNOFgBCgAZyLvP7dO9oGT+OE4GgvKK8I77tzRvoWGy4lKDBS7qxyx/SWqPVZalb/JeAD t2KsEPrJbJEfwXgFRl01vwh5G72CBuaI3savlgsMdgPp0FE5qUHsRkSVo04RymOIKiD40DcVd 9i9r1suuTc2YCcgF0ZpRM2jYVoqs57shA+zyadQm7Q5ruKhGcWXLql7nAOH/Tf2e3N9dB0yo8 YbLylGtG9yTNB5m3AI122P5yjRJpwWxYzMKK2lhz1j248Aoi6DSs5TfV07iEfNUhnPZE= Cc: Arnd Bergmann , Russell King , linux-kernel@vger.kernel.org, Ian Abbott , xen-devel@lists.xenproject.org, linux-arm-kernel@lists.infradead.org Subject: [Xen-devel] [PATCH v2] 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': drivers/xen/events/events_2l.c:187:1020: error: call to '__compiletime_assert_187' declared with attribute error: pointer type mismatch in container_of() 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 Acked-by: Ian Abbott Reviewed-by: Stefano Stabellini --- v2: found the correct warning message and updated the changelog --- 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))