From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 731C3DDE03 for ; Mon, 7 Jul 2008 16:34:13 +1000 (EST) Subject: Re: [PATCH] powerpc: reduce code duplication in legacy_serial, add UART parent types From: Benjamin Herrenschmidt To: Kumar Gala In-Reply-To: References: <200801172335.48817.arnd@arndb.de> <12011947821738-git-send-email-paul.gortmaker@windriver.com> <20080124224043.GA418@windriver.com> Content-Type: text/plain Date: Mon, 07 Jul 2008 16:33:46 +1000 Message-Id: <1215412426.8970.97.camel@pasglop> Mime-Version: 1.0 Cc: scottwood@freescale.com, Paul Gortmaker , arnd@arndb.de, linuxppc-dev@ozlabs.org Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > > --- > > 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.