[PATCH] powerpc: reduce code duplication in legacy_serial, add UART parent types

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Jul 7 16:33:46 EST 2008


On Fri, 2008-01-25 at 02:17 -0600, Kumar Gala wrote:
> > The legacy_serial was treating each UART parent in a separate code block.
> > Rather than continue this trend for the new parent IDs, this condenses
> > all (soc, tsi, opb, plus two more new types) into one of_device_id array.
> > The new types are wrs,epld-localbus for the Wind River sbc8560, and a
> > more generic "simple-bus" as requested by Scott Wood.
> >
> > Signed-off-by: Paul Gortmaker <paul.gortmaker at windriver.com>
> > ---
> >  arch/powerpc/kernel/legacy_serial.c |   45 +++++++++++++---------------------
> >  1 files changed, 17 insertions(+), 28 deletions(-)
> >
> applied

(Catching that old patch on patchworks by accident)

Hrm... please next time don't take patches to generic stuff like
legacy_serial through your tree. This one has definitely not been
properly reviewed.

In this case, there are at least two problems with the patch:

- The parents array should be called something better, as-is, go figure
where you crashed when all you find is a symbol called "parents"

- The array isn't terminated (or did I miss something ?) which means
that non-matching parents will probably crash.

Ben.





More information about the Linuxppc-dev mailing list