Received: by 10.192.165.156 with SMTP id m28csp46111imm; Tue, 10 Apr 2018 16:05:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/tBU3hsMc8z2GnJZS2IyMctC+R4KX3GdbE96qaRO2gjBXNGNcjF7hkRtoHh4p/UrrK2ykt X-Received: by 10.99.110.198 with SMTP id j189mr1590674pgc.71.1523401508028; Tue, 10 Apr 2018 16:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523401507; cv=none; d=google.com; s=arc-20160816; b=tP1sZM5iKpG6GuoletQUrG2DC6NYnJ4p/qkDFNdGwqgkpYLEpdvkNA1UwZQg5S+sN3 YWiLmC8nLWMpWi8nJH0IUvTSckkRzrhTM0DKAmvEUotWNrEHqcaRkjVUxHfGWbDyjb6n eViJptHE8LIvwkfjH+iMmwVupXGqtLMsyg3c2WcgxvO7TnoqepPkopVrZNa86tppjSRs so9IgbnoWSC/17UgZ7+wHeTz2WJSDUqhHiCHRyFjMWsagBTWbaOc70gZUE36XW1HB3A3 1DrYaJOqRrKmKHXb0QETsJrP/wPUx73OOjvVH3mTRu6m2dePu4GAHuOUBTEEmEMjd6AH Nl+w== 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=5Sk57AJKNQGqUkzdBCA94XFlJHFvyZ7xI+x3Io7LoAU=; b=nNjO8CnTQ609eGe0pCF/6Ywh5Tx4H6/lPyujeN0/n2wgTWYELwzvlfRO7DmqRB/7SA ot6Ul/AD6Pi5DngWEQypZPZAb/2PsOa3is/kpQu5p1fBnyqaRXE+T7GxETjzDH25aj0G iVazfXU6E50xrEYQItfkqBWAYRqpqNQrUHQk6UP5S8dzm80ozh6sucFV1FpkGIBIhJEO hdww9MTR5t+RAL1OzwxOiIXKwnXf69E+0rPUHy2m3faDHUoSEuJPe572uVkfY4rEIgO3 BxL0kP3S5wWu+9YuCeM8v0giUJOrh50Fpb1PMUS6NoeC6zYZIHoCiYv9iXVXY8IAlQJ7 6YWg== 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 v5si2479520pgn.648.2018.04.10.16.04.31; Tue, 10 Apr 2018 16:05:07 -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 S1756438AbeDJW7x (ORCPT + 99 others); Tue, 10 Apr 2018 18:59:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42288 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932317AbeDJWfv (ORCPT ); Tue, 10 Apr 2018 18:35:51 -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 5EF9BDFA; Tue, 10 Apr 2018 22:35:50 +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.14 033/138] ACPI: EC: Fix debugfs_create_*() usage Date: Wed, 11 Apr 2018 00:23:43 +0200 Message-Id: <20180410212905.947917290@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@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.14-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;