linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linaro-acpi@lists.linaro.org
Cc: Hanjun Guo <hanjun.guo@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Mark Rutland <mark.rutland@arm.com>,
	Olof Johansson <olof@lixom.net>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh@kernel.org>, Robert Richter <rric@kernel.org>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Liviu Dudau <Liviu.Dudau@arm.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Will Deacon <will.deacon@arm.com>,
	Robert Moore <robert.moore@intel.com>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	Mark Brown <broonie@kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Lv Zheng <lv.zheng@intel.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [Linaro-acpi] [RFC PATCH for Juno 1/2] net: smsc911x add support for probing from ACPI
Date: Mon, 01 Sep 2014 17:17:51 +0200	[thread overview]
Message-ID: <2861461.8zNpLC3I2n@wuerfel> (raw)
In-Reply-To: <1409583961-7466-2-git-send-email-hanjun.guo@linaro.org>

On Monday 01 September 2014 23:06:00 Hanjun Guo wrote:
> +#ifdef CONFIG_ACPI
> +/* Configure some sensible defaults for ACPI mode */
> +static int smsc911x_probe_config_acpi(struct smsc911x_platform_config *config,
> +                                   acpi_handle *ahandle)
> +{
> +       if (!ahandle)
> +               return -ENOSYS;
> +
> +       config->phy_interface = PHY_INTERFACE_MODE_MII;
> 

Please remove the #ifdef and use 

	if (!IS_ENABLED(CONFIG_ACPI) || !ahandle)

to check for ACPI support. This should result in the same object code
in all cases, but give better compile-time coverage when ACPI is
disabled.

Also, -ENOSYS is probably the wrong return value. I think you mean
-ENXIO.

	Arnd

  reply	other threads:[~2014-09-01 15:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 15:05 [RFC PATCH for Juno 0/2] Drivers for Juno to boot from ACPI Hanjun Guo
2014-09-01 15:06 ` [RFC PATCH for Juno 1/2] net: smsc911x add support for probing " Hanjun Guo
2014-09-01 15:17   ` Arnd Bergmann [this message]
2014-09-01 15:28     ` [Linaro-acpi] " Graeme Gregory
2014-09-01 15:32       ` Arnd Bergmann
2014-09-01 16:53       ` Catalin Marinas
2014-09-01 16:58         ` Mark Brown
2014-09-01 17:08           ` Sudeep Holla
2014-09-01 17:14             ` Catalin Marinas
2014-09-01 17:33               ` Sudeep Holla
2014-09-01 17:03         ` Graeme Gregory
2014-09-15  4:08       ` Grant Likely
2014-09-15  9:24         ` Catalin Marinas
2014-09-01 17:04   ` Catalin Marinas
2014-09-01 17:11     ` Arnd Bergmann
2014-09-01 17:27       ` Catalin Marinas
2014-09-01 17:32       ` Graeme Gregory
2014-09-01 18:11         ` Mark Brown
2014-09-02 13:26         ` Catalin Marinas
2014-09-02 13:42           ` [Linaro-acpi] " Arnd Bergmann
2014-09-02 16:26             ` Mark Brown
2014-09-02 23:00               ` Rafael J. Wysocki
2014-09-03 15:09                 ` Arnd Bergmann
2014-09-09  6:51                   ` Jon Masters
2014-09-15  4:14       ` Grant Likely
2014-09-15 16:12         ` Mark Brown
2014-09-01 15:06 ` [RFC PATCH for Juno 2/2] tty: SBSA compatible UART Hanjun Guo
2014-09-01 15:26   ` Mark Brown
2014-09-01 17:12   ` Catalin Marinas
2014-09-01 17:18     ` Graeme Gregory
2014-09-01 17:29       ` Catalin Marinas
2014-09-01 15:29 ` [RFC PATCH for Juno 0/2] Drivers for Juno to boot from ACPI Arnd Bergmann

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=2861461.8zNpLC3I2n@wuerfel \
    --to=arnd@arndb.de \
    --cc=Liviu.Dudau@arm.com \
    --cc=bhelgaas@google.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=grant.likely@linaro.org \
    --cc=hanjun.guo@linaro.org \
    --cc=jason@lakedaemon.net \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=olof@lixom.net \
    --cc=rdunlap@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=robh@kernel.org \
    --cc=rric@kernel.org \
    --cc=will.deacon@arm.com \
    /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).