From patchwork Tue Aug 18 16:25:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suriyan Ramasami X-Patchwork-Id: 508392 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8B2A61402B5 for ; Wed, 19 Aug 2015 02:26:12 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=yUGO6sCC; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6ED974B6DD; Tue, 18 Aug 2015 18:26:10 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Fg5GlNkU-XnY; Tue, 18 Aug 2015 18:26:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D71F34B6D4; Tue, 18 Aug 2015 18:26:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3402E4B6D4 for ; Tue, 18 Aug 2015 18:26:03 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j6XV2b0rTueP for ; Tue, 18 Aug 2015 18:26:02 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by theia.denx.de (Postfix) with ESMTPS id 25DA74B6D1 for ; Tue, 18 Aug 2015 18:25:57 +0200 (CEST) Received: by pabyb7 with SMTP id yb7so136068120pab.0 for ; Tue, 18 Aug 2015 09:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=aTei7cb5qBRInqPFpeaSjF3cuXTo0JG6VZ/kew4T0uM=; b=yUGO6sCCqJZzwxtr3uE4hvcTFUr1sUoUh17N6YEBicIJ7QSStUrEqguYEKxy9abuFg SUTCMZ8EJ0DUv/TrZZbIRqcf9aE2ntBeATs2qUyQFqmqB4wtBLRWS7xSgTdLcTCquLxG fTk5leCCe/h8ga60jc0fkDS9wcLJyMIZvx2xVtgkxOlp9/Ixbz6IGp4fPfXH4NsJJkvf Z27L6ohHmrkFyXdnMxMRpsq74XF5cTRLMF3OLMAV6JXTpnE0f8HP/km7X/I3dv9dnQXY 80ePq/CtuFCro8TEmv0/Voi3ADZdO8LwltR6ItrfVNDdn7xNrB16Id8q6p1rj5lbMG0C KwkA== X-Received: by 10.68.134.169 with SMTP id pl9mr15091451pbb.164.1439915155659; Tue, 18 Aug 2015 09:25:55 -0700 (PDT) Received: from localhost.localdomain (c-73-170-223-86.hsd1.ca.comcast.net. [73.170.223.86]) by smtp.gmail.com with ESMTPSA id ow5sm18669713pdb.30.2015.08.18.09.25.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Aug 2015 09:25:54 -0700 (PDT) From: Suriyan Ramasami To: u-boot@lists.denx.de Date: Tue, 18 Aug 2015 09:25:33 -0700 Message-Id: <1439915133-20384-1-git-send-email-suriyan.r@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: trini@konsulko.com, joe.hershberger@ni.com Subject: [U-Boot] [PATCH v1 1/1] lib/display_options: Fix print_freq X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Build without CONFIG_SPL_SERIAL_SUPPORT does not print the cpu freq. I have seen this in the odroid U3 board, where on boot one sees this: CPU: Exynos4412 @ GHz instead of: CPU: Exynos4412 @ 1 GHz I am assuming that this change was done to get rid of compiler warnings related to unused variables when building with CONFIG_SPL_SERIAL_SUPPORT not being defined in an SPL build. Signed-off-by: Suriyan Ramasami Acked-by: Simon Glass --- lib/display_options.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/display_options.c b/lib/display_options.c index df134cd..80316a4 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -26,9 +26,7 @@ int display_options (void) void print_freq(uint64_t freq, const char *s) { unsigned long m = 0; -#if defined(CONFIG_SPL_SERIAL_SUPPORT) unsigned long n; -#endif uint32_t f; static const char names[] = {'G', 'M', 'K'}; unsigned long d = 1e9; @@ -48,9 +46,7 @@ void print_freq(uint64_t freq, const char *s) } f = do_div(freq, d); -#if defined(CONFIG_SPL_SERIAL_SUPPORT) n = freq; -#endif /* If there's a remainder, show the first few digits */ if (f) { @@ -63,9 +59,7 @@ void print_freq(uint64_t freq, const char *s) m = (m / 10) + (m % 100 >= 50); } -#if defined(CONFIG_SPL_SERIAL_SUPPORT) printf("%lu", n); -#endif if (m) printf(".%ld", m); printf(" %cHz%s", c, s);