All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Kępień" <kernel@kempniu.pl>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "Andy Lutomirski" <luto@kernel.org>,
	"Darren Hart" <dvhart@infradead.org>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	"Linux ACPI" <linux-acpi@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org,
	"Mario Limonciello" <mario_limonciello@dell.com>,
	"Pali Rohár" <pali.rohar@gmail.com>
Subject: Re: [PATCH 08/14] wmi: Probe data objects for read and write capabilities
Date: Thu, 12 Jan 2017 06:01:59 +0100	[thread overview]
Message-ID: <20170112050159.GA4072@kmp-mobile.hq.kempniu.pl> (raw)
In-Reply-To: <CALCETrU0PVUK7dUzNfv3BbPPrrGWhm+akBAunfks-JkOxqzJSg@mail.gmail.com>

> On Mon, Jan 9, 2017 at 9:56 PM, Michał Kępień <kernel@kempniu.pl> wrote:
> >> On Sat, Jan 16, 2016 at 5:11 AM, Michał Kępień <kernel@kempniu.pl> wrote:
> >> >> My laptop has one RW data object, one RO data object, and one
> >> >> totally inaccessible data object.  Check for the existence of the
> >> >> accessor methods and report in sysfs.
> >> >>
> >> >> The docs also permit WQxx getters for single-instance objects to
> >> >> take no parameters.  Probe for that as well to avoid ACPICA warnings
> >> >> about mismatched signatures.
> >> >>
> >> >> Signed-off-by: Andy Lutomirski <luto@kernel.org>
> >> >> ---
> >> >>  drivers/platform/x86/wmi.c | 94 ++++++++++++++++++++++++++++++++++++++++++++--
> >> >>  include/linux/wmi.h        |  6 +++
> >> >>  2 files changed, 96 insertions(+), 4 deletions(-)
> >> >>
> >> >> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> >> >> index 5571ae7354a1..49be61207c4a 100644
> >> >> --- a/drivers/platform/x86/wmi.c
> >> >> +++ b/drivers/platform/x86/wmi.c
> >> >> @@ -66,6 +66,8 @@ struct wmi_block {
> >> >>       struct acpi_device *acpi_device;
> >> >>       wmi_notify_handler handler;
> >> >>       void *handler_data;
> >> >> +
> >> >> +     bool read_takes_no_args;        /* only defined if readable */
> >> >>  };
> >> >>
> >> >>
> >> >> @@ -216,6 +218,25 @@ static bool find_guid(const char *guid_string, struct wmi_block **out)
> >> >>       return false;
> >> >>  }
> >> >>
> >> >> +static int get_subobj_info(acpi_handle handle, const char *pathname,
> >> >> +                        struct acpi_device_info *info)
> >> >> +{
> >> >> +     acpi_handle subobj_handle;
> >> >> +     acpi_status status;
> >> >> +
> >> >> +     status = acpi_get_handle(handle, (char *)pathname, &subobj_handle);
> >> >> +     if (status == AE_NOT_FOUND)
> >> >> +             return -ENOENT;
> >> >> +     else if (ACPI_FAILURE(status))
> >> >> +             return -EIO;
> >> >> +
> >> >> +     status = acpi_get_object_info(subobj_handle, &info);
> >> >
> >> > acpi_get_object_info() allocates the returned buffer itself.  The latter
> >> > should then subsequently be freed by the caller.  One solution is to
> >> > change get_subobj_info() so that it takes a struct acpi_device_info **
> >> > as an argument, which should then be passed to acpi_get_object_info().
> >> > See also below.
> >>
> >> I have an updated version of this patch in my queue.  I'll try to send
> >> it early next week.
> >
> > Hi Andy,
> >
> > Are you planning any further work on this patch series (originally
> > posted in December 2015)?  It seems to be a valuable cleanup.
> 
> I have a tree in which the patches are sitting and I've kept them
> rebased, but I haven't had a chance to go through all the review
> comments and send them out.  Want to do it?

If you want me to take the rebased patches, fix the issues I can find
and resubmit as v2 with your name in From: then sure, I can give it a
shot once I find the time (might not be soon, though, but I guess there
is no rush).  If you had something else on your mind, please elaborate.

-- 
Best regards,
Michał Kępień

  reply	other threads:[~2017-01-12  5:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01  1:05 [PATCH 00/14] Big WMI driver rework Andy Lutomirski
2015-12-01  1:05 ` [PATCH 01/14] wmi: Drop "Mapper (un)loaded" messages Andy Lutomirski
2015-12-01  1:05 ` [PATCH 02/14] wmi: Pass the acpi_device through to parse_wdg Andy Lutomirski
2015-12-01  1:05 ` [PATCH 03/14] wmi: Clean up acpi_wmi_add Andy Lutomirski
2015-12-01  1:05 ` [PATCH 04/14] wmi: Track wmi devices per ACPI device Andy Lutomirski
2015-12-01  1:05 ` [PATCH 05/14] wmi: Turn WMI into a bus driver Andy Lutomirski
2016-01-16 12:56   ` Michał Kępień
2016-01-16 16:19     ` Andy Lutomirski
2015-12-01  1:05 ` [PATCH 06/14] wmi: Fix error handling when creating devices Andy Lutomirski
2015-12-01  1:05 ` [PATCH 07/14] wmi: Split devices into types and add basic sysfs attributes Andy Lutomirski
2015-12-01  1:05 ` [PATCH 08/14] wmi: Probe data objects for read and write capabilities Andy Lutomirski
2016-01-16 13:11   ` Michał Kępień
2016-01-16 16:14     ` Andy Lutomirski
2017-01-10  5:56       ` Michał Kępień
2017-01-10 10:05         ` Andy Lutomirski
2017-01-12  5:01           ` Michał Kępień [this message]
2017-01-13  1:42             ` Andy Lutomirski
2015-12-01  1:05 ` [PATCH 09/14] wmi: Instantiate all devices before adding them Andy Lutomirski
2016-01-17 14:06   ` Michał Kępień
2015-12-01  1:06 ` [PATCH 10/14] wmi: Add a driver .notify function Andy Lutomirski
2015-12-01  1:06 ` [PATCH 11/14] wmi: Add a new interface to read block data Andy Lutomirski
2015-12-01  1:06 ` [PATCH 12/14] wmi: Switch from acpi_driver.notify to acpi_install_notify_handler Andy Lutomirski
2015-12-01  1:06 ` [PATCH 13/14] wmi: Bind the platform device, not the ACPI node Andy Lutomirski
2015-12-01  1:06 ` [PATCH 14/14] dell-wmi: Convert to the WMI bus infrastructure Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170112050159.GA4072@kmp-mobile.hq.kempniu.pl \
    --to=kernel@kempniu.pl \
    --cc=dvhart@infradead.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mario_limonciello@dell.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.