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

Paul Gortmaker paul.gortmaker at windriver.com
Tue Jul 8 01:02:48 EST 2008


In message: Re: [PATCH] powerpc: reduce code duplication in legacy_serial, add UART parent types
on 07/07/2008 Benjamin Herrenschmidt wrote:

> 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"

While looking around at what other names were used, I saw the ibmebus
used an equally non-descript name too, so I'll fix that as well.  Patch
to follow shortly.

Thanks,
Paul.

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