Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651986

Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure

From Pali Rohár <pali.rohar@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure
Date 2017-05-27 22:50 +0200
Message-ID <tLQOR-xo-3@gated-at.bofh.it> (permalink)
References <tLIxX-34o-5@gated-at.bofh.it> <tLJNn-4w4-13@gated-at.bofh.it> <tLK6K-4CH-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Saturday 27 May 2017 15:33:14 Andy Shevchenko wrote:
> On Sat, May 27, 2017 at 4:17 PM, Pali Rohár <pali.rohar@gmail.com>
> wrote:
> > On Saturday 27 May 2017 15:07:09 Andy Shevchenko wrote:
> >> On Sat, May 27, 2017 at 2:51 PM, Pali Rohár <pali.rohar@gmail.com>
> >> 
> >> 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.

Both is OK for me. Do you want to send a new patch with %2pE?

-- 
Pali Rohár
pali.rohar@gmail.com

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] platform/x86: wmi: Fix printing info about WDG structure Pali Rohár <pali.rohar@gmail.com> - 2017-05-27 14:00 +0200
  Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-27 15:10 +0200
    Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure Pali Rohár <pali.rohar@gmail.com> - 2017-05-27 15:20 +0200
      Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure Pali Rohár <pali.rohar@gmail.com> - 2017-05-27 15:30 +0200
      Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-27 15:40 +0200
        Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-27 22:50 +0200
        Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure Pali Rohár <pali.rohar@gmail.com> - 2017-05-27 22:50 +0200

csiph-web