Thread (1 message) 1 message, 1 author, 2012-03-05

Re: [PATCH 4/5 v2] ARM: kirkwood: convert rtc-mv to fdt.

From: Jason <hidden>
Date: 2012-03-05 00:17:13
Also in: linux-arm-kernel

On Sun, Mar 04, 2012 at 04:50:52PM +0000, Arnd Bergmann wrote:
On Sunday 04 March 2012, Michael Walle wrote:
quoted
quoted
@@ -294,11 +295,17 @@ static int __exit mv_rtc_remove(struct
platform_device *pdev) return 0;
 }

+static struct of_device_id rtc_mv_of_match_table[] = {
+     { .compatible = "marvell,rtc", },
+     {}
+};
+
Isn't here an ifdef CONFIG_OF missing to prevent compiler warnings?
Yes, I guess so. I keep thinking that an __unused attribute would
actually be more helpful here because it lets the compiler automatically
discard the symbol when it's not used, but we still get potential
compiler errors and warnings if something inside of the unused data
is broken.
Hmmm, in the process of responding, I looked up Grant's original email
[1] to show justification.  However, rereading it shows I was
overzealous in my desire to remove #ifdef's.  :-P  Grant only said
adding of_match_ptr() would remove the #else portion of my original
code:

#ifdef CONFIG_OF
...
#else
#define rtc_mv_of_match_table = NULL;
#endif

I'll restore the #ifdef/#endif across the kirkwood code I've changed so
far, without the #else.  __unused shouldn't be necessary, then.

Thanks for the review, Michael.

thx,

Jason.

[1] http://www.spinics.net/lists/arm-kernel/msg162595.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help