From: Wolfgang Denk Date: Tue, 13 Sep 2011 22:14:44 +0200 Subject: [U-Boot] [PATCH 2/9] powerpc/mpc85xxcds: Fix PCI speed In-Reply-To: <1315898131-27710-2-git-send-email-chenhui.zhao@freescale.com> References: <1315898131-27710-1-git-send-email-chenhui.zhao@freescale.com> <1315898131-27710-2-git-send-email-chenhui.zhao@freescale.com> Message-ID: <20110913201444.307451408E94@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Zhao Chenhui, In message <1315898131-27710-2-git-send-email-chenhui.zhao@freescale.com> you wrote: ... > printf("PCI1: %d bit, %s MHz, %s\n", > (pci1_32) ? 32 : 64, > - (pci1_speed == 33000000) ? "33" : > - (pci1_speed == 66000000) ? "66" : "unknown", > + (pci1_speed == 33333333) ? "33" : > + (pci1_speed == 66666666) ? "66" : "unknown", > pci1_clk_sel ? "sync" : "async"); Why cannot you simply write: ... char buf[32]; ... printf("PCI1: %d bit, %s MHz, %ssync\n", (pci1_32) ? 32 : 64, strmhz(buf, pci1_speed), pci1_clk_sel ? "" : "a"); ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The only time the world beats a path to your door is when you are in the bathroom.