86xx: mark functions static, other minor cleanups
Subsystems (2)
PATCH 1/1 86xx: mark functions static, other minor cleanups
Cleanups as suggested by Stephen Rothwell and Dale Farnsworth, which
incudes: mark a bunch of functions static; add vendor prefix to the compat node check for uniqueness, add in missing of_node_put(), delete unused DBG macros.
--- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 2 +- arch/powerpc/boot/dts/sbc8641d.dts | 2 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 4 ++-- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 8 ++++---- arch/powerpc/platforms/86xx/sbc8641d.c | 17 +++++------------ 5 files changed, 13 insertions(+), 20 deletions(-)
arch/powerpc/boot/dts/mpc8641_hpcn.dts +1 -1
@@ -13,7 +13,7 @@ / { model = "MPC8641HPCN"; - compatible = "mpc86xx"; + compatible = "fsl,mpc86xx"; #address-cells = <1>; #size-cells = <1>;
arch/powerpc/boot/dts/sbc8641d.dts +1 -1
@@ -17,7 +17,7 @@ / { model = "SBC8641D"; - compatible = "mpc86xx"; + compatible = "wrs,sbc8641"; #address-cells = <1>; #size-cells = <1>;
arch/powerpc/platforms/86xx/mpc8610_hpcd.c +2 -2
@@ -52,7 +52,7 @@ static int __init mpc8610_declare_of_platform_devices(void) }machine_device_initcall (mpc86xx_hpcd, mpc8610_declare_of_platform_devices); -void __init +static void __init mpc86xx_hpcd_init_irq (void ) {struct mpic *mpic1;
@@ -200,7 +200,7 @@ static int __init mpc86xx_hpcd_probe(void)return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +4 -4
@@ -55,7 +55,7 @@ static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) }#endif /* CONFIG_PCI */ -void __init +static void __init mpc86xx_hpcn_init_irq (void ) {struct mpic *mpic1;
@@ -162,7 +162,7 @@ mpc86xx_hpcn_setup_arch(void) } -void +static void mpc86xx_hpcn_show_cpuinfo (struct seq_file *m) {struct device_node *root;
@@ -190,13 +190,13 @@ static int __init mpc86xx_hpcn_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"fsl,mpc86xx" ))return 1 ;/* Looks good */ return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
arch/powerpc/platforms/86xx/sbc8641d.c +5 -12
@@ -37,15 +37,7 @@#include "mpc86xx.h" -#undef DEBUG - -#ifdef DEBUG -#define DBG(fmt...) do { printk(KERN_ERR fmt); } while(0) -#else -#define DBG(fmt...) do { } while(0) -#endif - -void __init +static void __init sbc8641_init_irq (void ) {struct mpic *mpic1;
@@ -62,6 +54,7 @@ sbc8641_init_irq(void) mpic1 =mpic_alloc (np, res.start,MPIC_PRIMARY |MPIC_WANTS_RESET |MPIC_BIG_ENDIAN ,0 ,256 ," MPIC " ); +of_node_put (np);BUG_ON (mpic1 ==NULL );mpic_init (mpic1);
@@ -90,7 +83,7 @@ sbc8641_setup_arch(void) } -void +static void sbc8641_show_cpuinfo (struct seq_file *m) {struct device_node *root;
@@ -118,13 +111,13 @@ static int __init sbc8641_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"wrs,sbc8641" ))return 1 ;/* Looks good */ return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
Signature · 1 line
1.5.4.3
arch/powerpc/boot/dts/mpc8641_hpcn.dts line 18
Quoted 12 lines · Paul Gortmaker
arch/powerpc/boot/dts/mpc8641_hpcn.dts +1
-1@@ -13,7 +13,7 @@ / { model = "MPC8641HPCN"; - compatible = "mpc86xx"; + compatible = "fsl,mpc86xx"; #address-cells = <1>; #size-cells = <1>;
If we're changing the compatible, change it to something proper (e.g. fsl,mpc8641hpcn).
-Scott
arch/powerpc/boot/dts/sbc8641d.dts line 20
Quoted 4 lines
add vendor prefix to the compat node check for uniqueness,
arch/powerpc/boot/dts/sbc8641d.dts +1
-1- compatible = "mpc86xx"; + compatible = "wrs,sbc8641";
Either use the ticker thing (uppercase, "WIND,xxxx"), or, if you prefer a lowercase name without that little extra namespace protection, please use something more descriptive -- there are only so many three-letter acronyms: "windriver,xxxx"?
Segher
In message: Re: [PATCH] 86xx: mark functions static, other minor cleanups
Quoted 9 lines · on 11/04/2008 Scott Wood wrote:
Review
Quoted 5 lines
(quoted diff) +1
-1model = "MPC8641HPCN"; - compatible = "mpc86xx"; + compatible = "fsl,mpc86xx"; #address-cells = <1>; #size-cells = <1>;If we're changing the compatible, change it to something proper (e.g. fsl,mpc8641hpcn).
Updated as per above, and with tickerized prefixes for sbc8641.
Paul.
---
Quoted 1 line
From
8278c7ec25c1aadc92c71ca4e4b8e51b2c02a49aMon Sep 17 00:00:00 2001
From: Paul Gortmaker <[email protected]>
Date: Fri, 11 Apr 2008 12:51:04 -0400
Subject: [PATCH] 86xx: mark functions static, other minor cleanups
Cleanups as suggested by Stephen Rothwell and Dale Farnsworth, which
incudes: mark a bunch of functions static; add vendor prefix to the compat node check for uniqueness, add in missing of_node_put(), delete unused DBG macros.
--- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 2 +- arch/powerpc/boot/dts/sbc8641d.dts | 2 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 4 ++-- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 8 ++++---- arch/powerpc/platforms/86xx/sbc8641d.c | 17 +++++------------ 5 files changed, 13 insertions(+), 20 deletions(-)
arch/powerpc/boot/dts/mpc8641_hpcn.dts +1 -1
@@ -13,7 +13,7 @@ / { model = "MPC8641HPCN"; - compatible = "mpc86xx"; + compatible = "fsl,mpc8641hpcn"; #address-cells = <1>; #size-cells = <1>;
arch/powerpc/boot/dts/sbc8641d.dts +1 -1
@@ -17,7 +17,7 @@ / { model = "SBC8641D"; - compatible = "mpc86xx"; + compatible = "wind,sbc8641"; #address-cells = <1>; #size-cells = <1>;
arch/powerpc/platforms/86xx/mpc8610_hpcd.c +2 -2
@@ -52,7 +52,7 @@ static int __init mpc8610_declare_of_platform_devices(void) }machine_device_initcall (mpc86xx_hpcd, mpc8610_declare_of_platform_devices); -void __init +static void __init mpc86xx_hpcd_init_irq (void ) {struct mpic *mpic1;
@@ -200,7 +200,7 @@ static int __init mpc86xx_hpcd_probe(void)return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +4 -4
@@ -55,7 +55,7 @@ static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) }#endif /* CONFIG_PCI */ -void __init +static void __init mpc86xx_hpcn_init_irq (void ) {struct mpic *mpic1;
@@ -162,7 +162,7 @@ mpc86xx_hpcn_setup_arch(void) } -void +static void mpc86xx_hpcn_show_cpuinfo (struct seq_file *m) {struct device_node *root;
@@ -190,13 +190,13 @@ static int __init mpc86xx_hpcn_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"fsl,mpc8641hpcn" ))return 1 ;/* Looks good */ return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
arch/powerpc/platforms/86xx/sbc8641d.c +5 -12
@@ -37,15 +37,7 @@#include "mpc86xx.h" -#undef DEBUG - -#ifdef DEBUG -#define DBG(fmt...) do { printk(KERN_ERR fmt); } while(0) -#else -#define DBG(fmt...) do { } while(0) -#endif - -void __init +static void __init sbc8641_init_irq (void ) {struct mpic *mpic1;
@@ -62,6 +54,7 @@ sbc8641_init_irq(void) mpic1 =mpic_alloc (np, res.start,MPIC_PRIMARY |MPIC_WANTS_RESET |MPIC_BIG_ENDIAN ,0 ,256 ," MPIC " ); +of_node_put (np);BUG_ON (mpic1 ==NULL );mpic_init (mpic1);
@@ -90,7 +83,7 @@ sbc8641_setup_arch(void) } -void +static void sbc8641_show_cpuinfo (struct seq_file *m) {struct device_node *root;
@@ -118,13 +111,13 @@ static int __init sbc8641_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"wind,sbc8641" ))return 1 ;/* Looks good */ return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
Signature · 1 line
1.5.4.3
Quoted 1 line
Updated as per above, and with tickerized prefixes for sbc8641.
Care to try once more? It's only "tickerized" if it's in all uppercase.
arch/powerpc/boot/dts/sbc8641d.dts line 20
Quoted 1 line
arch/powerpc/boot/dts/sbc8641d.dts +1
-0+ compatible = "wind,sbc8641";
Segher
Quoted 6 lines · Segher Boessenkool
Quoted 3 lines
Updated as per above, and with tickerized prefixes for sbc8641.
Care to try once more? It's only "tickerized" if it's in all uppercase.
I'm looking at what exists in arch/powerpc/boot/dts/* and I'm not seeing too much uppercase - here is a sample:
ebony.dts: compatible = "ibm,ebony"; ep405.dts: compatible = "ibm,uic"; ep8248e.dts: compatible = "fsl,ep8248e"; bamboo.dts: compatible = "amcc,bamboo"; cm5200.dts: compatible = "schindler,cm5200"; ep88xc.dts: compatible = "fsl,ep88xc"; haleakala.dts: compatible = "amcc,kilauea"; holly.dts: compatible = "ibm,holly"; katmai.dts: compatible = "amcc,katmai"; kilauea.dts: compatible = "amcc,kilauea"; lite5200b.dts: compatible = "fsl,lite5200b"; motionpro.dts: compatible = "promess,motionpro"; mpc8272ads.dts: compatible = "fsl,mpc8272ads"; mpc866ads.dts: compatible = "fsl,mpc866ads";
Quoted 1 line
Quoted 1 line
+ compatible = "wind,sbc8641";
To me this looks in keeping with the rest. And I prefer with the lower case, actually. (Apparently so do a lot of other people...)
Paul.
Quoted 12 lines
Quoted 1 line
Segher
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c static int __init mpc86xx_hpcn_probe(void) · line 194
Quoted 12 lines · Paul Gortmaker
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +2
-2-void +static void mpc86xx_hpcn_show_cpuinfo (struct seq_file *m) {struct device_node *root;@@ -190,13 +190,13 @@ static int __init mpc86xx_hpcn_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"fsl,mpc86xx" ))return 1 ;/* Looks good */
This breaks compatibility with older device trees. You still need to look for "mpc86xx".
A lot of people have been doing this recently, and it needs to stop. You need to wait at least one whole kernel version before you can remove support for an older device tree.
arch/powerpc/platforms/86xx/sbc8641d.c static int __init sbc8641_probe(void) · line 115
Quoted 12 lines
arch/powerpc/platforms/86xx/sbc8641d.c +2
-2-void +static void sbc8641_show_cpuinfo (struct seq_file *m) {struct device_node *root;@@ -118,13 +111,13 @@ static int __init sbc8641_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"wrs,sbc8641" ))return 1 ;/* Looks good */
Same here.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Quoted 20 lines · Timur Tabi
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c static int __init mpc86xx_hpcn_probe(void) · line 195
Quoted 13 lines · Paul Gortmaker
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +2
-2-void +static void mpc86xx_hpcn_show_cpuinfo (struct seq_file *m) {struct device_node *root;@@ -190,13 +190,13 @@ static int __init mpc86xx_hpcn_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"fsl,mpc86xx" ))return 1 ;/* Looks good */ This breaks compatibility with older device trees. You still need to look for "mpc86xx".
Quoted 4 lines
A lot of people have been doing this recently, and it needs to stop. You need to wait at least one whole kernel version before you can remove support for an older device tree.
Valid point. Is there a precedent here -- like a printk indicating that the old ID matched, to let the user know?
Quoted 10 lines
Quoted 10 lines
arch/powerpc/platforms/86xx/sbc8641d.c +1
-1-void +static void sbc8641_show_cpuinfo (struct seq_file *m) {struct device_node *root;@@ -118,13 +111,13 @@ static int __init sbc8641_probe(void) {unsigned long root =of_get_flat_dt_root ();
Quoted 7 lines
arch/powerpc/platforms/86xx/sbc8641d.c static int __init sbc8641_probe(void) · line 116
Quoted 4 lines
arch/powerpc/platforms/86xx/sbc8641d.c +1
-1-if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"wrs,sbc8641" ))return 1 ;/* Looks good */ Same here.
Actually on this one, we are OK, since the board support didn't exist in the default kernel until I'd just sent it last week.
Thanks,
Paul.
Quoted 2 lines · Paul Gortmaker
Valid point. Is there a precedent here -- like a printk indicating that the old ID matched, to let the user know?
Not really, but a pr_warning() would be nice.
Quoted 2 lines
Actually on this one, we are OK, since the board support didn't exist in the default kernel until I'd just sent it last week.
No problem, then.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
In message: Re: [PATCH] 86xx: mark functions static, other minor cleanups
Quoted 6 lines · on 15/04/2008 Timur Tabi wrote:
Quoted 2 lines · Paul Gortmaker
Valid point. Is there a precedent here -- like a printk indicating that the old ID matched, to let the user know?
Not really, but a
pr_warning()would be nice.
Done.
I've also removed the sbc8641 content from this patch, and rolled it into the resend of those board specific patches. This is now just for incorporating that same feedback into existing boards.
Thanks,
Paul.
---
From aa2d1dd871c7eb440b3947cf8952d28249acf218 Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <[email protected]>
Date: Fri, 11 Apr 2008 12:51:04 -0400
Subject: [PATCH] 86xx: mark functions static, other minor cleanups
Cleanups as suggested by Stephen Rothwell and Dale Farnsworth, which incudes marking a bunch of functions static and add a vendor prefix to the compat node check for uniqueness. We match on the old compat node ID for one version and warn accordingly, so as to not plunge people into silent boot death, as suggested by Timur Tabi.
--- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 2 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 4 ++-- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 14 ++++++++++---- 3 files changed, 13 insertions(+), 7 deletions(-)
arch/powerpc/boot/dts/mpc8641_hpcn.dts +1 -1
@@ -13,7 +13,7 @@ / { model = "MPC8641HPCN"; - compatible = "mpc86xx"; + compatible = "fsl,mpc8641hpcn"; #address-cells = <1>; #size-cells = <1>;
arch/powerpc/platforms/86xx/mpc8610_hpcd.c +2 -2
@@ -52,7 +52,7 @@ static int __init mpc8610_declare_of_platform_devices(void) }machine_device_initcall (mpc86xx_hpcd, mpc8610_declare_of_platform_devices); -void __init +static void __init mpc86xx_hpcd_init_irq (void ) {struct mpic *mpic1;
@@ -200,7 +200,7 @@ static int __init mpc86xx_hpcd_probe(void)return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +10 -4
@@ -55,7 +55,7 @@ static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) }#endif /* CONFIG_PCI */ -void __init +static void __init mpc86xx_hpcn_init_irq (void ) {struct mpic *mpic1;
@@ -162,7 +162,7 @@ mpc86xx_hpcn_setup_arch(void) } -void +static void mpc86xx_hpcn_show_cpuinfo (struct seq_file *m) {struct device_node *root;
@@ -190,13 +190,19 @@ static int __init mpc86xx_hpcn_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +/* Delete this in 2.6.27 */ +if (of_flat_dt_is_compatible (root,"mpc86xx" )) { +pr_warning ("WARNING: your dts/dtb is old. You must update before the next kernel release\n" ); +return 1 ; + } + +if (of_flat_dt_is_compatible (root,"fsl,mpc8641hpcn" ))return 1 ;/* Looks good */ return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
Signature · 1 line
1.5.4.3
Quoted 11 lines
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +1
-1-void +static void
mpc86xx_hpcn_show_cpuinfo(struct seq_file *m){ struct device_node *root;arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +0
-1@@ -190,13 +190,19 @@ static int __init mpc86xx_hpcn_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" ))
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c static int __init mpc86xx_hpcn_probe(void) · line 202
Quoted 10 lines
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +7
-0+/* Delete this in 2.6.27 */ + if (of_flat_dt_is_compatible(root, "mpc86xx")) { + pr_warning("WARNING: your dts/dtb is old. You must update before the next kernel release\n"); + return 1; + } + + if (of_flat_dt_is_compatible(root, "fsl,mpc8641hpcn")) return 1; /* Looks good */
how about reversing the order of the checks.
- k
Quoted 2 lines
(quoted diff) +0
-0return 0; }
Quoted 25 lines · Paul Gortmaker
In message: Re: [PATCH] 86xx: mark functions static, other minor cleanups
Quoted 6 lines · on 15/04/2008 Timur Tabi wrote:
Quoted 2 lines · Paul Gortmaker
Valid point. Is there a precedent here -- like a printk indicating that the old ID matched, to let the user know?
Not really, but a
pr_warning()would be nice.Done.
I've also removed the sbc8641 content from this patch, and rolled it into the resend of those board specific patches. This is now just for incorporating that same feedback into existing boards.
Thanks,
Paul.
---From
aa2d1dd871c7eb440b3947cf8952d28249acf218Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <[email protected]>
Date: Fri, 11 Apr 2008 12:51:04 -0400
Subject: [PATCH] 86xx: mark functions static, other minor cleanups
Quoted 5 lines
Cleanups as suggested by Stephen Rothwell and Dale Farnsworth, which incudes marking a bunch of functions static and add a vendor prefix to the compat node check for uniqueness. We match on the old compat node ID for one version and warn accordingly, so as to not plunge people into silent boot death, as suggested by Timur Tabi.
can you add a commit about the change to the root compatible and its eventual removal for backward compatibility.
- k
PATCH 2/2 mpc86xx_hpcn: Temporarily accept old dts node identifier.
In reply to Paul GortmakerAs suggested by Timur Tabi, we match on the old compat node ID for one version and warn accordingly. If we don't do this, we plunge people who try to use an old DTB into silent boot death with no clear indication of what the problem is.
This patch should be removed at the beginning of the 2.6.27 dev cycle. It is only meant to ease the transition in the short term.
--- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +6 -0
@@ -193,6 +193,12 @@ static int __init mpc86xx_hpcn_probe(void)if (of_flat_dt_is_compatible (root,"fsl,mpc8641hpcn" ))return 1 ;/* Looks good */ +/* Be nice and don't give silent boot death. Delete this in 2.6.27 */ +if (of_flat_dt_is_compatible (root,"mpc86xx" )) { +pr_warning ("WARNING: your dts/dtb is old. You must update before the next kernel release\n" ); +return 1 ; + } +return 0 ; }
Signature · 1 line
1.5.4.3
PATCH 1/2 86xx: mark functions static, other minor cleanups
In reply to Kumar GalaCleanups as suggested by Stephen Rothwell and Dale Farnsworth, which incudes marking a bunch of functions static and add a vendor prefix to the compat node check for uniqueness.
--- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 2 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 4 ++-- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-)
arch/powerpc/boot/dts/mpc8641_hpcn.dts +1 -1
@@ -13,7 +13,7 @@ / { model = "MPC8641HPCN"; - compatible = "mpc86xx"; + compatible = "fsl,mpc8641hpcn"; #address-cells = <1>; #size-cells = <1>;
arch/powerpc/platforms/86xx/mpc8610_hpcd.c +2 -2
@@ -52,7 +52,7 @@ static int __init mpc8610_declare_of_platform_devices(void) }machine_device_initcall (mpc86xx_hpcd, mpc8610_declare_of_platform_devices); -void __init +static void __init mpc86xx_hpcd_init_irq (void ) {struct mpic *mpic1;
@@ -200,7 +200,7 @@ static int __init mpc86xx_hpcd_probe(void)return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +4 -4
@@ -55,7 +55,7 @@ static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc) }#endif /* CONFIG_PCI */ -void __init +static void __init mpc86xx_hpcn_init_irq (void ) {struct mpic *mpic1;
@@ -162,7 +162,7 @@ mpc86xx_hpcn_setup_arch(void) } -void +static void mpc86xx_hpcn_show_cpuinfo (struct seq_file *m) {struct device_node *root;
@@ -190,13 +190,13 @@ static int __init mpc86xx_hpcn_probe(void) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"mpc86xx" )) +if (of_flat_dt_is_compatible (root,"fsl,mpc8641hpcn" ))return 1 ;/* Looks good */ return 0 ; } -long __init +static long __init mpc86xx_time_init (void ) {unsigned int temp;
Signature · 1 line
1.5.4.3
Kumar Gala
AppliedQuoted 10 lines · Paul Gortmaker
Cleanups as suggested by Stephen Rothwell and Dale Farnsworth, which incudes marking a bunch of functions static and add a vendor prefix to the compat node check for uniqueness.
Signed-off-by Paul Gortmaker <[email protected]>---
arch/powerpc/boot/dts/mpc8641_hpcn.dts | 2 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 4 ++-- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-)
applied.
- k
Kumar Gala
AppliedRe: [PATCH 2/2] mpc86xx_hpcn: Temporarily accept old dts node identifier.
In reply to Paul GortmakerQuoted 5 lines · Paul Gortmaker
As suggested by Timur Tabi, we match on the old compat node ID for one version and warn accordingly. If we don't do this, we plunge people who try to use an old DTB into silent boot death with no clear indication of what the problem is.
Quoted 7 lines
This patch should be removed at the beginning of the 2.6.27 dev cycle. It is only meant to ease the transition in the short term.
Signed-off-by Paul Gortmaker <[email protected]>---
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c| 6 ++++++1 files changed, 6 insertions(+), 0 deletions(-)
applied.
- k
Quoted 27 lines · Paul Gortmaker
Quoted 6 lines · Segher Boessenkool
Quoted 3 lines
Updated as per above, and with tickerized prefixes for sbc8641.
Care to try once more? It's only "tickerized" if it's in all uppercase.
I'm looking at what exists in
arch/powerpc/boot/dts/*and I'm not seeing too much uppercase - here is a sample:ebony.dts: compatible = "ibm,ebony"; ep405.dts: compatible = "ibm,uic"; ep8248e.dts: compatible = "fsl,ep8248e"; bamboo.dts: compatible = "amcc,bamboo"; cm5200.dts: compatible = "schindler,cm5200"; ep88xc.dts: compatible = "fsl,ep88xc"; haleakala.dts: compatible = "amcc,kilauea"; holly.dts: compatible = "ibm,holly"; katmai.dts: compatible = "amcc,katmai"; kilauea.dts: compatible = "amcc,kilauea"; lite5200b.dts: compatible = "fsl,lite5200b"; motionpro.dts: compatible = "promess,motionpro"; mpc8272ads.dts: compatible = "fsl,mpc8272ads"; mpc866ads.dts: compatible = "fsl,mpc866ads";
Quoted 5 lines
Quoted 1 line
Quoted 1 line
+ compatible = "wind,sbc8641";
To me this looks in keeping with the rest. And I prefer with the lower case, actually. (Apparently so do a lot of other people...)
The confusion arises due to a difference between historical OF practice, and current flattened DT practice.
Historically, as Segher says, uppercase names are stock tickers (and thereby a centrally registered, guaranteed-unique namespace). Lowercase names are a free-for-all, no central management, put pick a reasonable name and it will probably be ok.
Use of the formal uppercase names in OF practice isn't particularly common - there certainly are AAPL, and IBM, names out there but they're rather outnumbered by the informal lowercase prefixes. Which is why most of us doing flattened tree work didn't realise the distinction. So, the flattened tree Linux community independently came up with the convention of using stock tickers as a way of uniqueifying the names - but used lowercase names.
So, it's a bit of a mess. Here's my recommended procedure:
* If you can find a single dominant existing practice for the
vendor in question, use that. (Consider both OF and flattened tree practice). i.e. existing practice trumps all.
* If you can't find any existing practice and need to make a
new prefix, use the stock ticker.
* If you find more than one existing practice (and none is
clearly dominant), take it to the list and we can argue about it.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson