sun4d prom_adjust_ranges extern
PATCH 3/3 sun4d prom_adjust_ranges extern
Chris Newport and Thomas Bogendoerfer's sun4d patch adds a prom_adjust_ranges call to drivers/sbus/sbus.c, but no extern for the function, so we get this warning:
drivers/sbus/sbus.c: In function `sbus_bus_ranges_init':drivers/sbus/sbus.c:243: warning: implicit declaration of function `prom_adjust_ranges'
Adding the extern makes the warning go away.
~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE Red Hat Sales Engineer || Aurora Linux Project Leader
"If you are going through hell, keep going."
- Sir Winston Churchill
drivers/sbus/sbus.c renamed from drivers/sbus/sbus.c.BAD +3 -0
@@ -219,6 +219,9 @@ static void __init sbus_do_child_sibling*/ /* added back sun4d patch from Thomas Bogendoerfer - should be OK (crn) */ +extern void prom_adjust_ranges (struct linux_prom_ranges *ranges1,int nranges1, +struct linux_prom_ranges *ranges2,int nranges2); +static void __init sbus_bus_ranges_init (int parent_node,struct sbus_bus *sbus) {int len;
Quoted 7 lines · Tom 'spot' Callaway
Chris Newport and Thomas Bogendoerfer's sun4d patch adds a
prom_adjust_rangescall todrivers/sbus/sbus.c, but no extern for the function, so we get this warning:drivers/sbus/sbus.c: In function `sbus_bus_ranges_init':drivers/sbus/sbus.c:243: warning: implicit declaration of function `prom_adjust_ranges'
Adding the extern makes the warning go away.
Hmm, I don't like the extern decl in code instead of a header; I had already dropped a decl into sbus.h before I got this, but am not sure if that's the ideal location for it. It doesn't really fit in with various other prom functions, but it doesn't really fit in sbus.h either.
I'm going to have something to ship rather shortly (it's already put together, I've just been interrupted before I can assemble tarballs etc. so we should be able to move on this shortly. It will be -mm -style so some well-defined kernel.org kernel version will be able to be patched, though I'm thinking of rebasing it against 2.6.10-rc3 since 2.6.9 needs 18MB of diff to get to current. This should all go to 2.6.10, I'm just trying to get something that covers enough ground to make people happy.
-- wli