All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@infradead.org>
To: Mario.Limonciello@dell.com
Cc: pali.rohar@gmail.com, andy.shevchenko@gmail.com,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH 2/2] platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers
Date: Thu, 9 Nov 2017 09:52:41 -0800	[thread overview]
Message-ID: <20171109175241.GD21449@fury> (raw)
In-Reply-To: <2ee7e355941f4ef5a244f152d4953753@ausx13mpc120.AMER.DELL.COM>

On Thu, Nov 09, 2017 at 05:34:39PM +0000, Mario.Limonciello@dell.com wrote:
> > > > >  static int dell_wmi_probe(struct wmi_device *wdev)
> > > > >  {
> > > > >  	struct dell_wmi_priv *priv;
> > > > > +	int ret;
> > > > >
> > > > >  	if (!wmi_has_guid(DELL_WMI_DESCRIPTOR_GUID))
> > > > >  		return -ENODEV;
> > > >
> > > > Just one suggestion, is above check still needed in dell-wmi.c code?
> > > > I think that now it should be job of dell_wmi_get_descriptor_valid()
> > > > function to fully validate if dell wmi descriptor driver is able to
> > > > provide all needed information for dell-wmi driver.
> > > >
> > >
> > > Yes, I believe it's still needed because if the GUID isn't on the bus the probe
> > > routine for dell-wmi-descriptor won't run and dell_wmi_get_descriptor_valid()
> > > will continually return -EPROBE_DEFER.
> > >
> > > That's the exact problem this patch exists for (preventing infinite deferred
> > > probing).
> > >
> > > Perhaps a "cleaner" solution is to have the init routine of dell-wmi-descriptor
> > > do this wmi_has_guid check and set the descriptor_valid variable to -ENODEV
> > > so that "dependent" drivers don't need to.
> > 
> > I understand. But I mean, if function dell_wmi_get_descriptor_valid()
> > should not do that check for DELL_WMI_DESCRIPTOR_GUID itself.
> > 
> > Because every driver which would use dell-wmi-descriptor needs to
> > do that check.
> 
> I'll move the check to dell_wmi_descriptor_valid().  That actually does remove
> the need for even including the GUID #define in a header file.  All use will be
> contained now directly in dell-wmi-descriptor.c.

This is a worthwhile improvement.

-- 
Darren Hart
VMware Open Source Technology Center

  reply	other threads:[~2017-11-09 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 16:27 [PATCH 0/2] Account for uncorrectable failures in probing Mario Limonciello
2017-11-03 16:27 ` [PATCH 1/2] platform/x86: dell-wmi-descriptor: check if memory was allocated Mario Limonciello
2017-11-09 12:07   ` Pali Rohár
2017-11-03 16:27 ` [PATCH 2/2] platform/x86: dell-*wmi*: Relay failed initial probe to dependent drivers Mario Limonciello
2017-11-04  0:53   ` Darren Hart
2017-11-04  3:25     ` Mario.Limonciello
2017-11-04  3:25       ` Mario.Limonciello
2017-11-09 16:02   ` Pali Rohár
2017-11-09 16:13     ` Mario.Limonciello
2017-11-09 16:13       ` Mario.Limonciello
2017-11-09 17:28       ` Pali Rohár
2017-11-09 17:34         ` Mario.Limonciello
2017-11-09 17:34           ` Mario.Limonciello
2017-11-09 17:52           ` Darren Hart [this message]
2017-11-07 16:17 ` [PATCH 0/2] Account for uncorrectable failures in probing Mario.Limonciello
2017-11-07 16:17   ` Mario.Limonciello

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=20171109175241.GD21449@fury \
    --to=dvhart@infradead.org \
    --cc=Mario.Limonciello@dell.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-kernel@vger.kernel.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.