From patchwork Thu Jun 16 20:29:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2011 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 C77C423E54 for ; Thu, 16 Jun 2011 20:31:58 +0000 (UTC) Received: from mail-vw0-f50.google.com (mail-vw0-f50.google.com [209.85.212.50]) by fiordland.canonical.com (Postfix) with ESMTP id 968EDA188FF for ; Thu, 16 Jun 2011 20:31:58 +0000 (UTC) Received: by mail-vw0-f50.google.com with SMTP id 14so1756035vws.37 for ; Thu, 16 Jun 2011 13:31:58 -0700 (PDT) Received: by 10.52.162.72 with SMTP id xy8mr1941187vdb.87.1308256317952; Thu, 16 Jun 2011 13:31:57 -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 em2cs211234vdc; Thu, 16 Jun 2011 13:31:57 -0700 (PDT) Received: by 10.227.195.13 with SMTP id ea13mr1387203wbb.0.1308256311776; Thu, 16 Jun 2011 13:31:51 -0700 (PDT) Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by mx.google.com with ESMTP id ek19si1351454wbb.69.2011.06.16.13.31.51; Thu, 16 Jun 2011 13:31:51 -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 wkXf1g0031hMfSL03kXqKo; Thu, 16 Jun 2011 22:31:51 +0200 From: Daniel Lezcano To: patches@linaro.org Subject: [PATCH 28/28] remove unused 'hrow' and 'selected' parameters Date: Thu, 16 Jun 2011 22:29:57 +0200 Message-Id: <1308256197-29155-28-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> Signed-off-by: Daniel Lezcano --- clocks.c | 2 +- powerdebug.c | 17 +++-------------- powerdebug.h | 2 +- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/clocks.c b/clocks.c index de5476a..603ebe4 100644 --- a/clocks.c +++ b/clocks.c @@ -392,7 +392,7 @@ int clock_init(void) * found in the files. Then print the result to the text based interface * Return 0 on success, < 0 otherwise */ -int read_and_print_clock_info(int hrow, int selected) +int read_and_print_clock_info(void) { if (read_clock_info()) return -1; diff --git a/powerdebug.c b/powerdebug.c index 5cf9da7..1873b1b 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -21,8 +21,6 @@ #include "clocks.h" #include "powerdebug.h" -static int highlighted_row; - void usage(void) { printf("Usage: powerdebug [OPTIONS]\n"); @@ -274,23 +272,14 @@ int mainloop(struct powerdebug_options *options, if (options->selectedwindow == CLOCK) { - int hrow; - if (!cont) { if (!findparent_ncurses) { - int command = 0; - if (enter_hit) { + if (enter_hit) clock_toggle_expanded(); - command = CLOCK_SELECTED; - } - if (refreshwin) - command = REFRESH_WINDOW; - hrow = read_and_print_clock_info( - highlighted_row, - command); - highlighted_row = hrow; + + read_and_print_clock_info(); enter_hit = false; } else find_parents_for_clock(clkname_str, diff --git a/powerdebug.h b/powerdebug.h index 760bcfb..502dcaa 100644 --- a/powerdebug.h +++ b/powerdebug.h @@ -30,7 +30,7 @@ enum {CLOCK_SELECTED = 1, REFRESH_WINDOW}; extern int read_and_dump_clock_info(char *clk); extern void find_parents_for_clock(char *clkname, int complete); -extern int read_and_print_clock_info(int hrow, int selected); +extern int read_and_print_clock_info(void); extern int print_clock_info(int hrow, int selected); extern void print_string_val(char *name, char *val); extern void print_clock_header(void);