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: 100658 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp327738qge; Mon, 29 May 2017 06:02:28 -0700 (PDT) X-Received: by 10.99.55.88 with SMTP id g24mr18769565pgn.176.1496062948395; Mon, 29 May 2017 06:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496062948; cv=none; d=google.com; s=arc-20160816; b=Mejgn+aGcH/eOtJbvOmBHS16OW7N0zXbwSVMjsBZ7aGoO7CZuqOFVPW/zYEUTJ7s3l DqZH8tip0TikGaRIhi56ONx7GT8nbA8I9DDGgyaeiELQKVoP4k6scgG3llG8wp0QkvQx ImtALxxQwzQGQojYM0MwQEAm+WA7/fDUHgDqiNC1b6fVPMx+NPSGoo274Zf/rMpPGfhE 58yF1WxAhEjXC/yVuYaT/jxGUiBXScCvRTG2RtaDqcUNyZh3Nb1OQVjHer97OJyaBuE1 K3ILU4kzEKkHYU2QkGpc2TYO5z1yWqXbMDUbbxPq8GrfG8u6Q5YzV3j//NmoNF0dhjrb 18SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=wcmIrurFydC94YAZD/XaDICPT6+H2uk31NaRmIx11ww=; b=a1Ha9ch5DrofHwXIywaG7zxCh/FICJUHOCRC0x+ZaQfGu5nR+uRCmXkyFmbLntbri0 cB1njwA/Pt7DIQC27l/4jcOrHVF518tLlnr8R2758HAuBddjBGTKrxYJgp7e9jD9zh1Z xgRck7lAC1EGGj+4pdWJnaHGbEsVXGKZWN2ftKMiXYitNf6FDVnVHKZwqsoguwsJoCft 2bGVfDxrNXbJ2DBMGQBXmKPcvQAYzF7jTJ7R3CeDm3Hv2Vmee/s0J3IBT9Hn6zJRnZcR FZJmhLAnJymy3MDT059qw8fiGtk/jU9HqededFTlantG7olBe6hI1C8yovmPz5TSvFhD q0Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si10326976pfb.416.2017.05.29.06.02.27; Mon, 29 May 2017 06:02:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbdE2NCC (ORCPT + 25 others); Mon, 29 May 2017 09:02:02 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:50103 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750913AbdE2NCB (ORCPT ); Mon, 29 May 2017 09:02:01 -0400 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 Cc: Arnd Bergmann , Ian Abbott , xen-devel@lists.xenproject.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] xen: avoid type warning in xchg_xen_ulong 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= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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))