devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: fix CONFIG_OF=n prototype of of_node_full_name()
@ 2014-05-15  4:44 Stephen Rothwell
  2014-05-15 14:19 ` Grant Likely
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2014-05-15  4:44 UTC (permalink / raw)
  To: Grant Likely, Rob Herring
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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

Make the CONFIG_OF=n prototpe of of_node_full_name() mateh the CONFIG_OF=y
version.

Fixes compile warnings like this:

sound/soc/soc-core.c: In function 'soc_check_aux_dev':
sound/soc/soc-core.c:1667:3: warning: passing argument 1 of 'of_node_full_name' discards 'const' qualifier from pointer target type [enabled by default]
   codecname = of_node_full_name(aux_dev->codec_of_node);

when CONFIG_OF is not defined.

Signed-off-by: Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
---
 include/linux/of.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 3bad8d106e0e..e6f0988c1c68 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -349,7 +349,7 @@ int of_device_is_stdout_path(struct device_node *dn);
 
 #else /* CONFIG_OF */
 
-static inline const char* of_node_full_name(struct device_node *np)
+static inline const char* of_node_full_name(const struct device_node *np)
 {
 	return "<no-node>";
 }
-- 
2.0.0.rc2

-- 
Cheers,
Stephen Rothwell                    sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] of: fix CONFIG_OF=n prototype of of_node_full_name()
  2014-05-15  4:44 [PATCH] of: fix CONFIG_OF=n prototype of of_node_full_name() Stephen Rothwell
@ 2014-05-15 14:19 ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2014-05-15 14:19 UTC (permalink / raw)
  To: Stephen Rothwell, Rob Herring; +Cc: devicetree, linux-kernel

On Thu, 15 May 2014 14:44:30 +1000, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Make the CONFIG_OF=n prototpe of of_node_full_name() mateh the CONFIG_OF=y
> version.
> 
> Fixes compile warnings like this:
> 
> sound/soc/soc-core.c: In function 'soc_check_aux_dev':
> sound/soc/soc-core.c:1667:3: warning: passing argument 1 of 'of_node_full_name' discards 'const' qualifier from pointer target type [enabled by default]
>    codecname = of_node_full_name(aux_dev->codec_of_node);
> 
> when CONFIG_OF is not defined.

Good catch, thanks. Applied and will be sent to Linus shortly.

g.

> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  include/linux/of.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 3bad8d106e0e..e6f0988c1c68 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -349,7 +349,7 @@ int of_device_is_stdout_path(struct device_node *dn);
>  
>  #else /* CONFIG_OF */
>  
> -static inline const char* of_node_full_name(struct device_node *np)
> +static inline const char* of_node_full_name(const struct device_node *np)
>  {
>  	return "<no-node>";
>  }
> -- 
> 2.0.0.rc2
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-15 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15  4:44 [PATCH] of: fix CONFIG_OF=n prototype of of_node_full_name() Stephen Rothwell
2014-05-15 14:19 ` Grant Likely

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).