From patchwork Mon Mar 19 16:02:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132066 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp3005159ljb; Mon, 19 Mar 2018 10:49:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELsrhsiykLPZsBnT92CmULZ8epdnblioHkCWSvlccTMIpTqC44ggqdaBlhN3yJg7L8w40qnS X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr11033400plp.243.1521481785920; Mon, 19 Mar 2018 10:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521481785; cv=none; d=google.com; s=arc-20160816; b=QYiyVflBG9cX0QPLyVEt1Wvb2Q5+8XvkNQoSoomAK0LzKotsqU41u0Dw9VN6xtOgSn rwarsqwWdxfdiw0jShnDWVmBG0nrMesPDoH36nQRay3q0+GH63kA8qbVXMXBrKwNdaom sZ3Kceqli/odwwvHl5epokC0WB+Hn2kUyjhhh9pP3kBMxO7cLWfQuqDLqc0BkTb65Z+h qcDa9MIQiC+ezcYUCCrnSmOGm3/v+JUiBJLe+4faumwdNz6mSkqVfkdV9AHNRidT8I7M QXf8/trpT/zsu6h6lfzYhEG3SC3QTUhlcjy9a/CABie5cE7qxm18ZVCc3eij+DgPqZ7O rhNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=jrElcw7FqZ9WKYkEX6lVv/ROCK1Qz+WvxzYGLDm6Zs4=; b=c0TadpG6vg+PDNPZbcNK9AFe/O13ghQq85bJiTkGnBgCJGJEh2otkh9CR4WccO2gi0 F417mb/9O4TdrbeZGrIr2d7o9PiDMjqJhVy5KRmN/FaADFqWacBdWxmjah5RRCwbO0vt chU9VdFckfDo5qa1wtKILIhsoJ6ddmBQ0a9uhVhTihcfZHLgppxbep2Me6qR+iD96UXa w/9aHyb7v1lO3GBuoSYgL+vMVXuBIWdmN3okF37T0wQIhDk8nA4W3VkCsJOqpqqL6dJT Ub1EH/vM40pPFKVjvloxLy0pk6FpGV/9PmYfO+OfYpvJlo+nC+pid5qoNdnTkuFBX2oY 8qeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cOlxyII6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si288093pgc.296.2018.03.19.10.49.45; Mon, 19 Mar 2018 10:49:45 -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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cOlxyII6; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968272AbeCSRtm (ORCPT + 28 others); Mon, 19 Mar 2018 13:49:42 -0400 Received: from mail-co1nam03on0134.outbound.protection.outlook.com ([104.47.40.134]:7948 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965675AbeCSQFC (ORCPT ); Mon, 19 Mar 2018 12:05:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=jrElcw7FqZ9WKYkEX6lVv/ROCK1Qz+WvxzYGLDm6Zs4=; b=cOlxyII6A8fbz+RaIcn/6a8GvNiJVwfLdJsrCpC2JlgBB87VFi+pwnVaG016z2d2+oN0Tf1CUsP3do6n4ajEncyjHmi2MGdJuZUG8fQ5bkakFvpAD4hRHCcbkBSNjHyM8AhkctVB7mybgfp55Mz9hfb9sly3MI6s/aXs7rq4Sro= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0885.namprd21.prod.outlook.com (52.132.132.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 16:04:52 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 16:04:52 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Arnd Bergmann , Ian Abbott , Stefano Stabellini , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 232/281] xen: avoid type warning in xchg_xen_ulong Thread-Topic: [PATCH AUTOSEL for 4.9 232/281] xen: avoid type warning in xchg_xen_ulong Thread-Index: AQHTv5uu2nV7b403cEKyB9DV7+TdOg== Date: Mon, 19 Mar 2018 16:02:29 +0000 Message-ID: <20180319155742.13731-232-alexander.levin@microsoft.com> References: <20180319155742.13731-1-alexander.levin@microsoft.com> In-Reply-To: <20180319155742.13731-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0885; 7:8CyQ2B6K55Ad2sl6YPZkPk96znN0SJrpX6M7ku4YD8nkOQ/RmUkRCs5W5TqbuIYCSi5XP/ljaUq5cTgbV+/5tUEkP0eXf0QZ+jTeC/AM/S7726lZoD8Ub+IPxJuhRR1KqCDPoyC4m0w5FKWWF1gqYDI1hS1aLf5S+ONEbc0Y9dubPZDohwsWKRAFY0MipUwNwsy++jQAmmGziUQ6TgD0++OoIRMw1o5j3oF8TfGiTW9XyJSQpfKEOW8p5ysjZcF9; 20:Sgr/G+7tj7xAlZeARbvGz1k3geDRjGCZc5bfAd/6He/k9dwd2lXWGBxTMI0kP71ZyF30tjhp8hJUytL/fQQrmMkdh4Az+3rNiWTgr2QOwN8oSE5u8rq+iC8lRCp2HZ7O8esjAUyvnEDL1sNyvFndPPzo4Hx8uGLRoyGhjWLz0KI= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 94c21027-3158-4c93-3fc8-08d58db3261a x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0885; x-ms-traffictypediagnostic: DM5PR2101MB0885: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:DM5PR2101MB0885; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0885; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(346002)(376002)(39380400002)(39860400002)(396003)(199004)(189003)(6666003)(8936002)(99286004)(3846002)(107886003)(2900100001)(68736007)(14454004)(6512007)(72206003)(81156014)(81166006)(105586002)(4326008)(25786009)(1076002)(22452003)(86362001)(110136005)(10090500001)(54906003)(53936002)(316002)(66066001)(6486002)(106356001)(6116002)(6436002)(2950100002)(3660700001)(8676002)(36756003)(97736004)(102836004)(2906002)(305945005)(5250100002)(478600001)(6506007)(59450400001)(7736002)(3280700002)(5660300001)(26005)(86612001)(10290500003)(76176011)(2501003)(186003)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0885; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: dsc9NMxdZF8ROiC6D+Llz95InFP+Hci584nW5rib6zdBDnyTg5nZtnLxl3xfI34z3UMy2Jj4B/mVnUfNn7LxXQYtDp60JZhGflXtFaUZsJ4cmj/Uj8ot0+vXUY1lRehI8ZpAyTPxby35+UxwM6LWG8vqRr3Ov3IbGE14fohk1XBENelmyFVmpdS4dLcC/ROMkhp8840+31muCrq17ybGzqh2sumFkm0D+NP2yP8piSNCI/iiOMvf/zqxhkjb02hbXfsjFyWlrTrFOAgqy4R6KBUNXphEtrMAb5YTM0ZALGUmh/77H8xUXgCkgnRVlJRLAMbDlnMNtdNKBrL9hSP+Wg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94c21027-3158-4c93-3fc8-08d58db3261a X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 16:02:29.2458 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0885 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 9cc91f212111cdcbefa02dcdb7dd443f224bf52c ] 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 Signed-off-by: Stefano Stabellini Reviewed-by: Stefano Stabellini Acked-by: Ian Abbott Signed-off-by: Sasha Levin --- arch/arm/include/asm/xen/events.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.1 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))