linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Mario Limonciello <mario.limonciello@dell.com>
Cc: "Darren Hart" <dvhart@infradead.org>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Platform Driver" <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH 3/3] platform/x86: dell-smbios: Link all dell-smbios-* modules together
Date: Tue, 27 Feb 2018 18:08:54 +0200	[thread overview]
Message-ID: <CAHp75VcNWo0Mh8jYU0vV+RRt3ZudKns_ZStcp_7ueebJfwL_nQ@mail.gmail.com> (raw)
In-Reply-To: <1519747014-17561-3-git-send-email-mario.limonciello@dell.com>

On Tue, Feb 27, 2018 at 5:56 PM, Mario Limonciello
<mario.limonciello@dell.com> wrote:
> Some race conditions were raised due to dell-smbios and its backends
> not being ready by the time that a consumer would call one of the
> exported methods.
>
> To avoid this problem, guarantee that all initialization has been
> done by linking them all together and running init for them all.
>
> As part of this change the Kconfig needs to be adjusted so that
> CONFIG_DELL_SMBIOS_SMM and CONFIG_DELL_SMBIOS_WMI are boolean
> rather than modules.
>
> CONFIG_DELL_SMBIOS is a visually selectable option again and both
> CONFIG_DELL_SMBIOS_WMI and CONFIG_DELL_SMBIOS_SMM are optional.


> --- a/drivers/platform/x86/dell-smbios-smm.c
> +++ b/drivers/platform/x86/dell-smbios-smm.c

> +#ifdef CONFIG_DELL_SMBIOS_SMM

> +#else /* CONFIG_DELL_SMBIOS_SMM */
> +int init_dell_smbios_smm(void)
> +{
> +       return -ENODEV;
> +}

> +void exit_dell_smbios_smm(void)
> +{}
> +#endif /* CONFIG_DELL_SMBIOS_SMM */

> --- a/drivers/platform/x86/dell-smbios-wmi.c
> +++ b/drivers/platform/x86/dell-smbios-wmi.c

> +#ifdef CONFIG_DELL_SMBIOS_WMI

> +#else /* CONFIG_DELL_SMBIOS_WMI */
> +int init_dell_smbios_wmi(void)
> +{
> +       return -ENODEV;
> +}
> +
> +void exit_dell_smbios_wmi(void)
> +{}
> +#endif /* CONFIG_DELL_SMBIOS_WMI */

It's rather strange to see above in *.c and not in *.h where it's
usually supposed to be...

> --- a/drivers/platform/x86/dell-smbios.h
> +++ b/drivers/platform/x86/dell-smbios.h
> @@ -75,4 +75,10 @@ int dell_laptop_register_notifier(struct notifier_block *nb);
>  int dell_laptop_unregister_notifier(struct notifier_block *nb);
>  void dell_laptop_call_notifier(unsigned long action, void *data);
>
> +/* for the supported backends */
> +int init_dell_smbios_wmi(void);
> +void exit_dell_smbios_wmi(void);
> +int init_dell_smbios_smm(void);
> +void exit_dell_smbios_smm(void);
> +

...here...

>  #endif

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2018-02-27 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 15:56 [PATCH 1/3] platform/x86: dell-smbios: Correct some style warnings Mario Limonciello
2018-02-27 15:56 ` [PATCH 2/3] platform/x86: dell-smbios: Rename dell-smbios source to dell-smbios-base Mario Limonciello
2018-02-27 15:56 ` [PATCH 3/3] platform/x86: dell-smbios: Link all dell-smbios-* modules together Mario Limonciello
2018-02-27 16:08   ` Andy Shevchenko [this message]
2018-02-27 16:13     ` Mario.Limonciello
2018-02-27 16:16       ` Andy Shevchenko
2018-02-27 16:04 ` [PATCH 1/3] platform/x86: dell-smbios: Correct some style warnings Andy Shevchenko
2018-02-27 16:15   ` 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=CAHp75VcNWo0Mh8jYU0vV+RRt3ZudKns_ZStcp_7ueebJfwL_nQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@dell.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).