From patchwork Mon Apr 9 00:35:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132962 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp664658ljb; Sun, 8 Apr 2018 18:04:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+/2iQKSRDx+5FqtkWxlqTk9kmO8gIyXRbjc3SAAUBp937HQyPM13id4Tq5407hn0HFvaik X-Received: by 10.99.96.84 with SMTP id u81mr23798787pgb.231.1523235877775; Sun, 08 Apr 2018 18:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523235877; cv=none; d=google.com; s=arc-20160816; b=h8n0u1kKf3dkxNk8QabtQiOsb0cW0gI7p+TTRgA6hZQiG3C+oiREgFb0nxbnGvqPGW htn/XPnwjhX1xTeToZMClzFzHx678sTYaaJ+nAsBtsF79Ey3ekj/ElI6MDz3uUpeXbID G+RsQFGpAj37lanHPmNYmdohXg+nxf9eslNpyZDFhzttu1+Qb7NjvHrXGFyuaHnCcj0N FzXerj7BwL3ggqubRRJmV54Z1h12WntrNsrV86RwURi3JMFT+OMV2jnvMy7BrCN4qmY4 cw1iEE0t/BPFGLTg/C8oC+Lwz1QDXwDnExi8a0VmoIlKtW8TukPrKLnYARb10w+3u8xd xRlA== 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=4Z3QH9nS258eL3fNEiLL5rF9DfTdJP6/9TW+PqZeNPQ=; b=UuN0pvL0oJfvsHyIv2FG3aiwoH7NUOxFENuMhkLFp4F/rn8R0O2x0fi/hnKwGllEDE OR5mmSYH0Hc3J8iS5BfXindWMCmnHZ6slYKavXwg3Y+XBgXxmpTFnuSXc6YVpoXK3/b4 ZE2JwYAC3iGyFYm0EXtVEZDMZ8Tgy5AMzWjtPNS2jXF4H7UsinOHEOaJOSE6j2hJPuXY NnyYTFXzwEV2c+FZ3iyqbSCDADd0G8HPoWb1rFj+7ZA03jECiDOiy4BIsXmSFLGM+w/B aJQc3PdzG7BjIIObrfDKQEkQtzgSfx2UY+9NbqbMABT8oz6t7Tt4hzEvQqdxh+w0/Tb7 mBhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=kYQ5gROJ; 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 c6si11930033pfl.136.2018.04.08.18.04.37; Sun, 08 Apr 2018 18:04:37 -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=kYQ5gROJ; 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 S1756726AbeDIBDe (ORCPT + 29 others); Sun, 8 Apr 2018 21:03:34 -0400 Received: from mail-co1nam03on0132.outbound.protection.outlook.com ([104.47.40.132]:50200 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933154AbeDIAjf (ORCPT ); Sun, 8 Apr 2018 20:39:35 -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=4Z3QH9nS258eL3fNEiLL5rF9DfTdJP6/9TW+PqZeNPQ=; b=kYQ5gROJsFCne9VyPmx9n7J9+L+baxyS0ZMo7PwMI32BrUxZK9fAIIEie8soWyPj6fPNjfzgRkKtpTM4zURs/EjZCR9iEq5C/n1DQOD/8wcYPkIcrqyrat3EuAYMubCro99fcan7/S4Mw355iWJjCbIuSibIvIddUeQhcOX5N6U= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1047.namprd21.prod.outlook.com (52.132.128.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:39:29 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:39:28 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , Ian Abbott , Stefano Stabellini , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 008/101] xen: avoid type warning in xchg_xen_ulong Thread-Topic: [PATCH AUTOSEL for 3.18 008/101] xen: avoid type warning in xchg_xen_ulong Thread-Index: AQHTz5qheyoJZXptUEKL7GOd7oPAug== Date: Mon, 9 Apr 2018 00:35:16 +0000 Message-ID: <20180409003505.164715-8-alexander.levin@microsoft.com> References: <20180409003505.164715-1-alexander.levin@microsoft.com> In-Reply-To: <20180409003505.164715-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; DM5PR2101MB1047; 7:xUB9Bzq8UcK0kvJub91KjVgIlH3NN4x/aN9PkF1220Kcvb4g/c7CJWs1OotWmqCw5O3g5yQkPYwWjtaBq6TDrSFCl2SHOMkFQpvfNwcP+AMFJwPFXHvf2MSQ44hFuoc2tnzb7moksv61sjAR663gctOZdua1TtZtAAfTQQPf6JnRs2AJrOxrC5Eo8F7TV/aHPZhGFLwB8ztPKg20fxCWLqG2FPde983K2vV9dizHm01Oh6A5DhAq/rx4ddq6q5gC; 20:/qxdkianhCdNwg4aJxyIk/Uc+TbvCzOwra7/s4U9dPyHpo87vmSKz4BgskY1PaB710hAVWQURC+O/RfytNtcC0F/lZPlGifpnpjo1Wnuzo3FaOc5giC3t0xQtqMpUdVvFm6iLSDDrtXbcQrj1v2tSd+gB3hWk+dPASYpqhSPlyE= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 96857811-21e8-474b-9cd1-08d59db25a70 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1047; x-ms-traffictypediagnostic: DM5PR2101MB1047: 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)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB1047; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1047; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(396003)(366004)(39860400002)(346002)(39380400002)(189003)(199004)(97736004)(3660700001)(2900100001)(2906002)(8936002)(11346002)(3280700002)(106356001)(446003)(68736007)(72206003)(1076002)(86612001)(25786009)(3846002)(36756003)(107886003)(6116002)(81166006)(4326008)(486006)(81156014)(6512007)(6436002)(53936002)(14454004)(8676002)(26005)(575784001)(5250100002)(86362001)(105586002)(6666003)(305945005)(186003)(10290500003)(7736002)(10090500001)(102836004)(6486002)(2616005)(5660300001)(316002)(2501003)(66066001)(22452003)(54906003)(99286004)(110136005)(478600001)(59450400001)(476003)(76176011)(6506007)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1047; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: SSnM2CbeHRh/pyGv56xMFTI0Zc0bZ/PWLCDeux2EQZMtZKoKBVczeLY2v1QTdMNvAP57YWyY5E4cdNeiSVy0jEwnkGXXGWExv1QT7CTlqXlNUXBYVnulvD9eSm9xjS0c33uygk4WyrRzXJqnsMd34EsiE/l0dQRr/4xbiOVx/gMeHaeIHTldxGui98GB2Ve3ZpIn/Y0p4DlykLXOjwbedB88Ly408inXKoY7s6DhQQPSuvxM0M6PBzV5F29Aia6n7VwjNPWANO+N7HvBYRTimtP/dmjz5hzpxjL2IW4OfGuzSXSNkl1nu98IstRYqbpCW5ATeEBd0F+1j/LQehcLDViiUE+Bp/adHlNoj+eIf8dKARVa7kEs0NMMjn1hsG0Jv9m67Dnqp7usMfRhM3nNoLci2EKgcDsTvwh+e5xLqc4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96857811-21e8-474b-9cd1-08d59db25a70 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:35:16.2361 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1047 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.15.1 diff --git a/arch/arm/include/asm/xen/events.h b/arch/arm/include/asm/xen/events.h index 8b1f37bfeeec..b7aadab9b0e8 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))