All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org,
	davinci-linux-open-source@linux.davincidsp.com,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH RESEND] i2c: move of helpers into the core
Date: Mon, 19 Aug 2013 21:46:04 +0200	[thread overview]
Message-ID: <20130819194603.GC4961@mithrandir> (raw)
In-Reply-To: <1376935183-11218-1-git-send-email-wsa@the-dreams.de>

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

On Mon, Aug 19, 2013 at 07:59:40PM +0200, Wolfram Sang wrote:
[...]
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
[...]
> +#if IS_ENABLED(CONFIG_OF)
> +static void of_i2c_register_devices(struct i2c_adapter *adap)
> +{
[...]
> +}
[...]
> +#endif /* CONFIG_OF */

Isn't this missing the dummy implementation for !OF.

>  static int i2c_do_add_adapter(struct i2c_driver *driver,
>  			      struct i2c_adapter *adap)
>  {
> @@ -1058,6 +1160,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
>  
>  exit_recovery:
>  	/* create pre-declared device nodes */
> +	of_i2c_register_devices(adap);

Alternatively you could remove the of_i2c_register_devices() from the
"#ifdef CONFIG_OF" block so that it will always be compiled. You could
turn the above into

	if (IS_ENABLED(CONFIG_OF))
		of_i2c_register_devices(adap);

and let the compiler throw the static function away if it sees that the
condition is always false.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: devicetree@vger.kernel.org,
	davinci-linux-open-source@linux.davincidsp.com,
	linux-samsung-soc@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [PATCH RESEND] i2c: move of helpers into the core
Date: Mon, 19 Aug 2013 21:46:04 +0200	[thread overview]
Message-ID: <20130819194603.GC4961@mithrandir> (raw)
In-Reply-To: <1376935183-11218-1-git-send-email-wsa@the-dreams.de>

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

On Mon, Aug 19, 2013 at 07:59:40PM +0200, Wolfram Sang wrote:
[...]
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
[...]
> +#if IS_ENABLED(CONFIG_OF)
> +static void of_i2c_register_devices(struct i2c_adapter *adap)
> +{
[...]
> +}
[...]
> +#endif /* CONFIG_OF */

Isn't this missing the dummy implementation for !OF.

>  static int i2c_do_add_adapter(struct i2c_driver *driver,
>  			      struct i2c_adapter *adap)
>  {
> @@ -1058,6 +1160,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
>  
>  exit_recovery:
>  	/* create pre-declared device nodes */
> +	of_i2c_register_devices(adap);

Alternatively you could remove the of_i2c_register_devices() from the
"#ifdef CONFIG_OF" block so that it will always be compiled. You could
turn the above into

	if (IS_ENABLED(CONFIG_OF))
		of_i2c_register_devices(adap);

and let the compiler throw the static function away if it sees that the
condition is always false.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND] i2c: move of helpers into the core
Date: Mon, 19 Aug 2013 21:46:04 +0200	[thread overview]
Message-ID: <20130819194603.GC4961@mithrandir> (raw)
In-Reply-To: <1376935183-11218-1-git-send-email-wsa@the-dreams.de>

On Mon, Aug 19, 2013 at 07:59:40PM +0200, Wolfram Sang wrote:
[...]
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
[...]
> +#if IS_ENABLED(CONFIG_OF)
> +static void of_i2c_register_devices(struct i2c_adapter *adap)
> +{
[...]
> +}
[...]
> +#endif /* CONFIG_OF */

Isn't this missing the dummy implementation for !OF.

>  static int i2c_do_add_adapter(struct i2c_driver *driver,
>  			      struct i2c_adapter *adap)
>  {
> @@ -1058,6 +1160,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
>  
>  exit_recovery:
>  	/* create pre-declared device nodes */
> +	of_i2c_register_devices(adap);

Alternatively you could remove the of_i2c_register_devices() from the
"#ifdef CONFIG_OF" block so that it will always be compiled. You could
turn the above into

	if (IS_ENABLED(CONFIG_OF))
		of_i2c_register_devices(adap);

and let the compiler throw the static function away if it sees that the
condition is always false.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130819/39b2197d/attachment.sig>

  parent reply	other threads:[~2013-08-19 19:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 13:19 [PATCH] i2c: move of helpers into the core Wolfram Sang
2013-08-19 13:19 ` Wolfram Sang
2013-08-19 13:19 ` Wolfram Sang
2013-08-19 17:59 ` [PATCH RESEND] " Wolfram Sang
2013-08-19 17:59   ` Wolfram Sang
2013-08-19 17:59   ` Wolfram Sang
     [not found]   ` <1376935183-11218-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-08-19 18:22     ` Sylwester Nawrocki
2013-08-19 18:22       ` Sylwester Nawrocki
2013-08-19 18:22       ` Sylwester Nawrocki
2013-08-19 18:22       ` Sylwester Nawrocki
     [not found]       ` <5212624D.5090708-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-08-19 18:56         ` Wolfram Sang
2013-08-19 18:56           ` Wolfram Sang
2013-08-19 18:56           ` Wolfram Sang
2013-08-19 18:56           ` Wolfram Sang
2013-08-19 22:01     ` Rob Herring
2013-08-19 22:01       ` Rob Herring
2013-08-19 22:01       ` Rob Herring
2013-08-19 22:01       ` Rob Herring
2013-08-19 19:46   ` Thierry Reding [this message]
2013-08-19 19:46     ` Thierry Reding
2013-08-19 19:46     ` Thierry Reding
2013-08-19 21:16     ` Wolfram Sang
2013-08-19 21:16       ` Wolfram Sang
2013-08-19 21:16       ` Wolfram Sang
2013-08-19 20:10   ` Felipe Balbi
2013-08-19 20:10     ` Felipe Balbi
2013-08-19 20:10     ` Felipe Balbi
2013-08-19 20:10     ` Felipe Balbi
     [not found] ` <1376918361-7014-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-08-19 23:04   ` [PATCH] " Rafael J. Wysocki
2013-08-19 23:04     ` Rafael J. Wysocki
     [not found]     ` <3792014.HtzPVmLjnf-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-08-19 22:56       ` Stephen Warren
2013-08-19 22:56         ` Stephen Warren
2013-08-19 22:56         ` Stephen Warren
2013-08-19 23:25         ` Rafael J. Wysocki
     [not found]           ` <3721030.UJAkTdQrEC-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-08-20  9:28             ` Mika Westerberg
2013-08-20  9:28               ` Mika Westerberg
2013-08-20 12:31               ` Rafael J. Wysocki
2013-08-20 14:30               ` Wolfram Sang
2013-08-21  7:54                 ` Mika Westerberg

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=20130819194603.GC4961@mithrandir \
    --to=thierry.reding@gmail.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=wsa@the-dreams.de \
    /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.