Received: by 10.213.65.68 with SMTP id h4csp44919imn; Mon, 19 Mar 2018 19:01:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELuUwtjOjNXzLwRyXkM7rxmsX+/iVrLQTxxf1QNP1JRAX6l/MTCw/14ByPAZpd7pmUNZ8Sam X-Received: by 10.98.16.28 with SMTP id y28mr8188413pfi.64.1521511309071; Mon, 19 Mar 2018 19:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521511309; cv=none; d=google.com; s=arc-20160816; b=Bxmtdx8oFWWuIM4UsbdhAPtyUH2rkiRoz5MipjbdDyedCtUFT8EBAl+eHwHGBDoLlp ODmHWhryybvxM67n9UAaj58cDQToC67ahrYOpC3H/3GXwBqmWa+Vm1om/Pz7eYtdOPa8 QVcFyZypGMK8tfyRloe7o/Ko60dqCHiYtFF08uBkzLxlU9DPYga776bpr09ZtCgaYIev T1RnmAd9/rl1wVsRM5N9biWCQFp33uFC3dBjA7TH2cDxpbHw6EhLKtgLYJDOPcUUfeu8 tsFZykx5uFSlok/g9kSdTDlEBiJj3YhamgNl3olQZdFsHWOYKnSh8nfSGaGhXRmThdID qI5g== 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=tl7Bv26dCTP8WI0NGwY9sWjTKDyOWVrF+4gG70BrUNc=; b=W6/rzUvSwiuE6/eHLjVxMmckbytN6BqbBVL5HA1PPa4SWyG/H1MA+nLFX7ukek4y9i T/OndPw3p4XR9aPs3+xjqJrLEidkaYfl9t4tbn51KILAnMW36NCfVI4Vw/J93ZR973Ik qmlNQ+lZB3ofndBu9AyO2iQYnyyRphWSVjoP9KnvDAImjO2zPKnfe+PkXkys0cgKGpEg rXf/DB+8+kwFsAW/LF7yEqy2l3Hw6hVNDLPrfwY6HjhVI2Aicwg2hF6cw+b9yMmZ9y22 alZHBL/JMHUn5iSRqYROya3rxAnvdlwPEXfq47hxu1TrRQQhaqD2MFxqj5d781+7mKZn bFoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=jUxNm2ZA; 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 b2si384676pgq.240.2018.03.19.19.01.34; Mon, 19 Mar 2018 19:01:49 -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=jUxNm2ZA; 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 S972510AbeCSWcw (ORCPT + 99 others); Mon, 19 Mar 2018 18:32:52 -0400 Received: from mail-by2nam01on0135.outbound.protection.outlook.com ([104.47.34.135]:31072 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933740AbeCSPsQ (ORCPT ); Mon, 19 Mar 2018 11:48:16 -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=tl7Bv26dCTP8WI0NGwY9sWjTKDyOWVrF+4gG70BrUNc=; b=jUxNm2ZAMm35D2itzOXPZzlPcKs1/DQqaV7q2j2Al4bDoijqe5z/q7bsBAvGrLrwdgtgeiQSHksfscGzQbZvuHCx6tcntvBhl3HOcYXcngW24Hzh+hiMIKsENXokc+9TviPbqscLTRPHRXl1jsawX1lvVg83+ghfwNNu3iNskZ0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1031.namprd21.prod.outlook.com (52.132.128.12) 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 15:48:10 +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 15:48:10 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Geert Uytterhoeven , "Rafael J . Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 047/124] ACPI: EC: Fix debugfs_create_*() usage Thread-Topic: [PATCH AUTOSEL for 4.15 047/124] ACPI: EC: Fix debugfs_create_*() usage Thread-Index: AQHTv5mhY4sGL7o4okCSdz52mhU66g== Date: Mon, 19 Mar 2018 15:47:48 +0000 Message-ID: <20180319154645.11350-47-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-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;DM5PR2101MB1031;7:Js8zJNy6VamQ1ES7ojzGI56TzzscqcdEpj5N0zcYH/5as4dZCB3U06Ih+LLOAwhbJMpznUZ8Ir/qMJtTzadycN6e1OQ1UjVKUpa7M7AbFL96lkIKKvpIdcND/JHxkZco68OcJDGEEQJ4yfrgCO9NdTcat3pS8FFV6GFp2WlakCaThNQIqbUfDKLVhoQCKg9wGyeEwyD9NalNOKiYc4JDkCMqudZnTQBZbv4quhqXbch4S8p2v3irfUrsWUcKmMPQ;20:pk7xf9IJh7cEZILJsv2/JJyY1vL6NiaDHnDdWPZiU4rSAwXOwSGukiAdVouFwIv219v6BfIPEmyuPshYHyxZnTn3e1FnCSaYvIfj6fBuQCkNiUXLTX/DYdUsYMsnYkOnk8ifW4MgoTy6rIqEfsDfIQ2PN3eKSOfhsv5Dc1lPD8w= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9097223f-789e-4b39-d51d-08d58db0d144 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1031; x-ms-traffictypediagnostic: DM5PR2101MB1031: 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)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231221)(944501300)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB1031;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1031; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(396003)(39860400002)(39380400002)(376002)(189003)(199004)(6436002)(6512007)(6666003)(3280700002)(2950100002)(7736002)(6116002)(3846002)(10090500001)(105586002)(4326008)(5660300001)(305945005)(1076002)(81156014)(2906002)(6486002)(81166006)(8676002)(8936002)(2900100001)(106356001)(36756003)(68736007)(54906003)(3660700001)(22452003)(97736004)(6506007)(25786009)(59450400001)(99286004)(10290500003)(76176011)(66066001)(14454004)(72206003)(478600001)(102836004)(26005)(186003)(316002)(2501003)(110136005)(5250100002)(575784001)(86362001)(53936002)(107886003)(86612001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1031;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: Sc4Ccyt/TW9WpicEoGnHQwc8KS9/u7PfAbNTK39hynixRpE/YoK8VAXb5bI0QnTZJPSZtDNg+ziIdQ2ab705C8N4t1zVCCHmSgFiuFFQeZRBxpaEXLY9bp92H0kZQehbFZdigVPP1Dpt4xr2INMQZU2hOaTktpQVl+DrGZrmWqL3H1oPfD9sNNYSfZxN1G2EZ1jRJOgt6unLjpGHyDheIYZljDPgffb2oI+A+btC+EJpOjJtt8VRsryHWRiGg3HqRmOn4lqt+u3Rcw+fixnj0bPZ5XhpbVfSQ7A455LWgRo92HDIKAdM8sQ1xLwN2/Wknh9DpMkvZq3A9zi3XbkxeQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9097223f-789e-4b39-d51d-08d58db0d144 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:47:48.5167 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1031 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit 3522f867c13b63cf62acdf1b8ca5664c549a716a ] acpi_ec.gpe is "unsigned long", hence treating it as "u32" would expose the wrong half on big-endian 64-bit systems. Fix this by changing its type to "u32" and removing the cast, as all other code already uses u32 or sometimes even only u8. Fixes: 1195a098168fcacf (ACPI: Provide /sys/kernel/debug/ec/...) Signed-off-by: Geert Uytterhoeven Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/ec.c | 2 +- drivers/acpi/ec_sys.c | 2 +- drivers/acpi/internal.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 0252c9b9af3d..d9f38c645e4a 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1516,7 +1516,7 @@ static int acpi_ec_setup(struct acpi_ec *ec, bool han= dle_events) } =20 acpi_handle_info(ec->handle, - "GPE=3D0x%lx, EC_CMD/EC_SC=3D0x%lx, EC_DATA=3D0x%lx\n", + "GPE=3D0x%x, EC_CMD/EC_SC=3D0x%lx, EC_DATA=3D0x%lx\n", ec->gpe, ec->command_addr, ec->data_addr); return ret; } diff --git a/drivers/acpi/ec_sys.c b/drivers/acpi/ec_sys.c index 6c7dd7af789e..dd70d6c2bca0 100644 --- a/drivers/acpi/ec_sys.c +++ b/drivers/acpi/ec_sys.c @@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsi= gned int ec_device_count) return -ENOMEM; } =20 - if (!debugfs_create_x32("gpe", 0444, dev_dir, (u32 *)&first_ec->gpe)) + if (!debugfs_create_x32("gpe", 0444, dev_dir, &first_ec->gpe)) goto error; if (!debugfs_create_bool("use_global_lock", 0444, dev_dir, &first_ec->global_lock)) diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 7f43423de43c..1d0a501bc7f0 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -159,7 +159,7 @@ static inline void acpi_early_processor_osc(void) {} -----------------------------------------------------------------------= --- */ struct acpi_ec { acpi_handle handle; - unsigned long gpe; + u32 gpe; unsigned long command_addr; unsigned long data_addr; bool global_lock; --=20 2.14.1