Received: by 10.192.165.156 with SMTP id m28csp21184imm; Tue, 10 Apr 2018 15:32:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx493fMz7GEYY0zOMCNXrA/mZDD7yz6UJDZvGoJVoCDwFyd4hbW8xqH8g/kQI2gKqvuxQqn+B X-Received: by 2002:a17:902:4481:: with SMTP id l1-v6mr2310614pld.43.1523399549203; Tue, 10 Apr 2018 15:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523399549; cv=none; d=google.com; s=arc-20160816; b=DyoF6qIIguhB2c0J+Q0b5+kkHQAfly/xEUVFL91A0wu3qehuDbhfh+ICaE6KNqLyMO ewhWAyFN2Ib7PlDWASWBsip5S5wRLPNNHkznA4FlPLGhb5Neke319PjYNw4tBvHJe6QW TPTwV6rqLpjg/9zJaAwHuQkwA+d2N+sqhYNAaNZvS/6mTXMFZyEoBKEFAmeBTHfIy/94 qDsWrtipW1ZMLfpbb1irBz70lMDuwiN7/OdLoQmmqifYrKBl/2Pof3MihftaQZSehUHE GGcvZagHkqf+DElr/TgraNXVuddqr3R71G/YwrV05PcEbGU1Q7z+qgCl9UT8ViUT/HsE aX9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=AnSVY4HFky6kt5GtXJdX6YPLCwvA+30iik69LXg9NZM=; b=LGI0+lPlOanj0pHInSJwMDaFuO6DN7V7lvcZbhaWPGEgRhZjb3pkfJjR3pkPcRYxAV Xeh1F77RfNbqMYotqY77jqquMBcBZs0tIzl4Epy414OgVoghCgyZCrMR0HiBbRcwoSsT UalQ8a3HQ4d3eCom2dXx7/nfqzKIyFp9PSSGnCltAhj/7VdN/uqzX+Rzi0L0JLfP4E8Y 8WdBe5mFMSktEJIoR1Q69rflHwdjKF1QMUJQQ7rQZuEZqBYA9fET1sGj+xHOvvj2NAvU DKxF6XtswFkCPrCR+iYlhNHPXpApA6UlwiLWyGMTdBr562JxKiYeBQ4ZW1QEop3qlSvp J1Qw== 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 o33-v6si3501068plb.478.2018.04.10.15.31.52; Tue, 10 Apr 2018 15:32:29 -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 S1753813AbeDJW1o (ORCPT + 99 others); Tue, 10 Apr 2018 18:27:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37936 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753713AbeDJW1k (ORCPT ); Tue, 10 Apr 2018 18:27:40 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CB0A2CC4; Tue, 10 Apr 2018 22:27:39 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.15 044/168] ACPI: EC: Fix debugfs_create_*() usage Date: Wed, 11 Apr 2018 00:23:06 +0200 Message-Id: <20180410212802.078100959@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/ec.c | 2 +- drivers/acpi/ec_sys.c | 2 +- drivers/acpi/internal.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1516,7 +1516,7 @@ static int acpi_ec_setup(struct acpi_ec } acpi_handle_info(ec->handle, - "GPE=0x%lx, EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n", + "GPE=0x%x, EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n", ec->gpe, ec->command_addr, ec->data_addr); return ret; } --- a/drivers/acpi/ec_sys.c +++ b/drivers/acpi/ec_sys.c @@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct ac return -ENOMEM; } - 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)) --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -159,7 +159,7 @@ static inline void acpi_early_processor_ -------------------------------------------------------------------------- */ struct acpi_ec { acpi_handle handle; - unsigned long gpe; + u32 gpe; unsigned long command_addr; unsigned long data_addr; bool global_lock;