All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86: wmi: Fix printing info about WDG structure
@ 2017-05-27 11:51 Pali Rohár
  2017-05-27 13:07 ` Andy Shevchenko
  2017-06-10 10:57 ` [PATCH v2] " Pali Rohár
  0 siblings, 2 replies; 17+ messages in thread
From: Pali Rohár @ 2017-05-27 11:51 UTC (permalink / raw)
  To: Darren Hart, Andy Shevchenko, Andy Lutomirski
  Cc: platform-driver-x86, linux-kernel, Pali Rohár

object_id and notify_id are in one union structure and their meaning is
defined by flags. Therefore do not print notify_id for non-event block and
do not print object_id for event block. Remove also reserved member as it
does not have any defined meaning or type yet.

As object_id and notify_id union members overlaps and have different types,
it caused that kernel print to dmesg binary data. This patch eliminates it.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 drivers/platform/x86/wmi.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index ceeb8c1..cd7045f 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -352,9 +352,10 @@ acpi_status wmi_set_block(const char *guid_string, u8 instance,
 static void wmi_dump_wdg(const struct guid_block *g)
 {
 	pr_info("%pUL:\n", g->guid);
-	pr_info("\tobject_id: %c%c\n", g->object_id[0], g->object_id[1]);
-	pr_info("\tnotify_id: %02X\n", g->notify_id);
-	pr_info("\treserved: %02X\n", g->reserved);
+	if (g->flags & ACPI_WMI_EVENT)
+		pr_info("\tnotify_id: 0x%02X\n", g->notify_id);
+	else
+		pr_info("\tobject_id: %c%c\n", g->object_id[0], g->object_id[1]);
 	pr_info("\tinstance_count: %d\n", g->instance_count);
 	pr_info("\tflags: %#x", g->flags);
 	if (g->flags) {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-06-13 16:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27 11:51 [PATCH] platform/x86: wmi: Fix printing info about WDG structure Pali Rohár
2017-05-27 13:07 ` Andy Shevchenko
2017-05-27 13:17   ` Pali Rohár
2017-05-27 13:23     ` Pali Rohár
2017-05-27 13:33     ` Andy Shevchenko
2017-05-27 20:48       ` Pali Rohár
2017-05-27 20:49         ` Andy Shevchenko
2017-06-08 15:16           ` Darren Hart
2017-06-08 15:38             ` Joe Perches
2017-06-08 17:42               ` Andy Shevchenko
2017-06-08 17:44                 ` Andy Shevchenko
2017-06-08 18:18                   ` Pali Rohár
2017-06-09  8:29             ` Pali Rohár
2017-06-09  9:29               ` Andy Shevchenko
2017-06-10 10:57 ` [PATCH v2] " Pali Rohár
2017-06-10 11:22   ` Andy Shevchenko
2017-06-13 16:52     ` Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.