From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756846AbdE0NdR (ORCPT ); Sat, 27 May 2017 09:33:17 -0400 Received: from mail-qt0-f169.google.com ([209.85.216.169]:33063 "EHLO mail-qt0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756588AbdE0NdP (ORCPT ); Sat, 27 May 2017 09:33:15 -0400 MIME-Version: 1.0 In-Reply-To: <201705271517.30111@pali> References: <1495885877-7906-1-git-send-email-pali.rohar@gmail.com> <201705271517.30111@pali> From: Andy Shevchenko Date: Sat, 27 May 2017 16:33:14 +0300 Message-ID: Subject: Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: Darren Hart , Andy Shevchenko , Andy Lutomirski , Platform Driver , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v4RDXQ27001262 On Sat, May 27, 2017 at 4:17 PM, Pali Rohár wrote: > On Saturday 27 May 2017 15:07:09 Andy Shevchenko wrote: >> On Sat, May 27, 2017 at 2:51 PM, Pali Rohár >> wrote: >> > Remove >> > also reserved member as it does not have any defined meaning or >> > type yet. >> > - pr_info("\treserved: %02X\n", g->reserved); >> >> Do we need this? Commit message doesn't clarify. > > I wrote to commit message that reserved does not have defined meaning > nor type. Also reserved overlap with object_id[1] so for non-event > should not be print at all. And as it is reserved, I removed it. Oh, indeed. >> > + pr_info("\tobject_id: %c%c\n", g->object_id[0], >> > g->object_id[1]); >> >> If this can still contain non-printable characters the %*pE can help >> instead. > > Those are printable ASCII. object_id contains two characters which are > suffix for ACPI method. > > Problem was only for events when we tried to print notify_id as > object_id. notify_id is binary and overlaps with object_id. Okay, got it. But on your opinion does it make sense to do pr_info("\tobject_id: %2pE\n", g->object_id); instead? For ASCII it will go as is previously, otherwise escaping would be done. -- With Best Regards, Andy Shevchenko