Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit3522f86

Browse files
geerturafaeljw
authored andcommitted
ACPI: EC: Fix debugfs_create_*() usage
acpi_ec.gpe is "unsigned long", hence treating it as "u32" would exposethe wrong half on big-endian 64-bit systems. Fix this by changing itstype to "u32" and removing the cast, as all other code already uses u32or sometimes even only u8.Fixes:1195a09 (ACPI: Provide /sys/kernel/debug/ec/...)Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent30a7acd commit3522f86

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎drivers/acpi/ec.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ static int acpi_ec_setup(struct acpi_ec *ec, bool handle_events)
15161516
}
15171517

15181518
acpi_handle_info(ec->handle,
1519-
"GPE=0x%lx, EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n",
1519+
"GPE=0x%x, EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n",
15201520
ec->gpe,ec->command_addr,ec->data_addr);
15211521
returnret;
15221522
}

‎drivers/acpi/ec_sys.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static int acpi_ec_add_debugfs(struct acpi_ec *ec, unsigned int ec_device_count)
128128
return-ENOMEM;
129129
}
130130

131-
if (!debugfs_create_x32("gpe",0444,dev_dir,(u32*)&first_ec->gpe))
131+
if (!debugfs_create_x32("gpe",0444,dev_dir,&first_ec->gpe))
132132
gotoerror;
133133
if (!debugfs_create_bool("use_global_lock",0444,dev_dir,
134134
&first_ec->global_lock))

‎drivers/acpi/internal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static inline void acpi_early_processor_osc(void) {}
159159
-------------------------------------------------------------------------- */
160160
structacpi_ec {
161161
acpi_handlehandle;
162-
unsigned longgpe;
162+
u32gpe;
163163
unsigned longcommand_addr;
164164
unsigned longdata_addr;
165165
boolglobal_lock;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp