From patchwork Sat Jun 10 10:57:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 9779785 X-Patchwork-Delegate: dvhart@infradead.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 34C6160352 for ; Sat, 10 Jun 2017 10:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 183342870F for ; Sat, 10 Jun 2017 10:57:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE1AE2871B; Sat, 10 Jun 2017 10:57:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 818022870F for ; Sat, 10 Jun 2017 10:57:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751955AbdFJK5c (ORCPT ); Sat, 10 Jun 2017 06:57:32 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36446 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751941AbdFJK5b (ORCPT ); Sat, 10 Jun 2017 06:57:31 -0400 Received: by mail-wr0-f193.google.com with SMTP id e23so11718500wre.3; Sat, 10 Jun 2017 03:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cpU4b2fraDmbplsADDZxY9ti3zDYnVig7RQo+75uzG4=; b=K2Ke2NqpRLCX3QnhCdnF2Bnvke8vgBO3omYL2/uYH01R17JLtkcPpHcrluLRHxHyzW TsdepldL2t9XG49ag92e5FKpC0S+aFuNgNeQQnToZMjCmK9rOpdXDecB4TDJex6Vm9xD ONLVT0FQgYA/0rUCaHIPY6r21Peb5qlYF1lZxsyET67jTPp5mXo+3K6YfZvq8rDB1FJi gwU+3+u1TEw/5IlqF5OxpLw9EGSx97yQDah2I8ukUxuX1B3h8ysKCcVUsCiFDFFF2r0v ca5rVPWf5h0zftJ3oiSUsNhAKKG8R/JlI1PbULhq5pe5MmrCrsvOzs3segOP2rgw9CEm m/RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cpU4b2fraDmbplsADDZxY9ti3zDYnVig7RQo+75uzG4=; b=gyOtH01jWylUfsodH7BPQ6WGfQkB4vSUyGvhBkKl1wNpkYMWEtGKw7vt+bTURXs7+x JR0LjM9bFW/HC3h8Ng74pDFi9sdMtdbNYEr5psYr+V8yY3tRDvIk6oZD1E7PtW2WKIr5 ZZXkh7wwiLUVYMCASOmKc8rU6WMYjha7SK8jEr8ZwWcBt2UChyBq/oXscEWgr2LJ3n6L Kd4QtNuLO32Yw3nTGd4sIRWTj6NSkQDJ5KRuJqjVVn6WBwLc8atG8C9BY2U+yx2wc+hl JOj1Dkj18ARbsNhAklwELiW21Pdp2UH3AZLC2zWvixNFFISbDgaMzj57XcvjvsM0embv NERg== X-Gm-Message-State: AODbwcCVPPKTRyxaodII96i61w9Rv3O92lIBH+nOmL8k4LKzN2pw+NsI YUY2uadzH6kGsQ== X-Received: by 10.28.18.72 with SMTP id 69mr2610280wms.37.1497092250115; Sat, 10 Jun 2017 03:57:30 -0700 (PDT) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id n2sm7396347wrn.30.2017.06.10.03.57.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jun 2017 03:57:27 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Andy Shevchenko , Darren Hart , Andy Shevchenko , Andy Lutomirski , Joe Perches Cc: Platform Driver , "linux-kernel@vger.kernel.org" , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH v2] platform/x86: wmi: Fix printing info about WDG structure Date: Sat, 10 Jun 2017 12:57:11 +0200 Message-Id: <1497092231-505-1-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1495885877-7906-1-git-send-email-pali.rohar@gmail.com> References: <1495885877-7906-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Andy Shevchenko --- Changes since v2: * Use %2pE instead of %c%c as suggested by Andy Shevchenko --- 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..6d6f2a9 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: %2pE\n", g->object_id); pr_info("\tinstance_count: %d\n", g->instance_count); pr_info("\tflags: %#x", g->flags); if (g->flags) {