From patchwork Thu Jun 16 20:29:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2005 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8C8B823E54 for ; Thu, 16 Jun 2011 20:31:54 +0000 (UTC) Received: from mail-vx0-f180.google.com (mail-vx0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5C6C6A188FF for ; Thu, 16 Jun 2011 20:31:54 +0000 (UTC) Received: by mail-vx0-f180.google.com with SMTP id 12so2092646vxk.11 for ; Thu, 16 Jun 2011 13:31:54 -0700 (PDT) Received: by 10.52.112.106 with SMTP id ip10mr1886393vdb.127.1308256314168; Thu, 16 Jun 2011 13:31:54 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs211221vdc; Thu, 16 Jun 2011 13:31:53 -0700 (PDT) Received: by 10.227.177.193 with SMTP id bj1mr1409249wbb.30.1308256308292; Thu, 16 Jun 2011 13:31:48 -0700 (PDT) Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by mx.google.com with ESMTP id fe21si1332615wbb.121.2011.06.16.13.31.47; Thu, 16 Jun 2011 13:31:48 -0700 (PDT) Received-SPF: neutral (google.com: 80.12.242.130 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=80.12.242.130; Authentication-Results: mx.google.com; spf=neutral (google.com: 80.12.242.130 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: from monster.dhcp.lxc ([92.134.76.78]) by mwinf5d16 with ME id wkXf1g0031hMfSL03kXnKA; Thu, 16 Jun 2011 22:31:47 +0200 From: Daniel Lezcano To: patches@linaro.org Subject: [PATCH 20/28] remove unused code and parameter for clock dump function Date: Thu, 16 Jun 2011 22:29:49 +0200 Message-Id: <1308256197-29155-20-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1308256197-29155-1-git-send-email-daniel.lezcano@linaro.org> References: <1308256197-29155-1-git-send-email-daniel.lezcano@linaro.org> the verbose option is unused. Signed-off-by: Daniel Lezcano --- clocks.c | 24 +++++++++++------------- powerdebug.c | 9 ++------- powerdebug.h | 3 +-- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/clocks.c b/clocks.c index 5bcef51..9d8108c 100644 --- a/clocks.c +++ b/clocks.c @@ -567,20 +567,18 @@ out: return ret; } -void read_and_dump_clock_info_one(char *clk) +void read_and_dump_clock_info(char *clk) { - printf("\nParents for \"%s\" Clock :\n\n", clk); read_clock_info(clk_dir_path); - dump_all_parents(clk); - printf("\n\n"); -} -void read_and_dump_clock_info(int verbose) -{ - (void)verbose; - printf("\nClock Tree :\n"); - printf("**********\n"); - read_clock_info(clk_dir_path); - dump_clock_info(); - printf("\n\n"); + if (clk) { + printf("\nParents for \"%s\" Clock :\n\n", clk); + dump_all_parents(clk); + printf("\n\n"); + } else { + printf("\nClock Tree :\n"); + printf("**********\n"); + dump_clock_info(); + printf("\n\n"); + } } diff --git a/powerdebug.c b/powerdebug.c index f71a9df..71c37f2 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -310,13 +310,8 @@ static int powerdebug_dump(struct powerdebug_options *options, regulator_print_info(reg_info, nr_reg, options->verbose); } - if (options->clocks) { - - if (options->clkname) - read_and_dump_clock_info_one(options->clkname); - else - read_and_dump_clock_info(options->verbose); - } + if (options->clocks) + read_and_dump_clock_info(options->clkname); if (options->sensors) read_and_print_sensor_info(options->verbose); diff --git a/powerdebug.h b/powerdebug.h index 8e0c658..d2c0954 100644 --- a/powerdebug.h +++ b/powerdebug.h @@ -28,8 +28,7 @@ enum {CLOCK, REGULATOR, SENSOR}; enum {CLOCK_SELECTED = 1, REFRESH_WINDOW}; -extern void read_and_dump_clock_info(int verbose); -extern void read_and_dump_clock_info_one(char *clk); +extern void read_and_dump_clock_info(char *clk); extern int read_clock_info(char *clkpath); extern void find_parents_for_clock(char *clkname, int complete); extern int read_and_print_clock_info(int verbose, int hrow, int selected);