public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: Ingo Molnar <mingo@elte.hu>
Cc: "\"Frédéric Weisbecker\"" <fweisbec@gmail.com>,
	"Arjan van de Ven" <arjan@infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] fastboot: fix bootgraph.pl to run with "use strict"
Date: Tue, 14 Oct 2008 14:18:07 +0100	[thread overview]
Message-ID: <48F49C0F.7050705@tuffmail.co.uk> (raw)

As a perl novice, I would prefer to have the benefit of the interpreters'
wisdom.  It turns out there were already some warnings, so let's fix them.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>

diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl
index 5e7316e..ea2b079 100644
--- a/scripts/bootgraph.pl
+++ b/scripts/bootgraph.pl
@@ -37,7 +37,10 @@
 # 	dmesg | perl scripts/bootgraph.pl > output.svg
 #
 
-my %start, %end;
+use strict;
+
+my %start;
+my %end;
 my $done = 0;
 my $maxtime = 0;
 my $firsttime = 100;
@@ -105,12 +108,14 @@ my $threshold = ($maxtime - $firsttime) / 60.0;
 my $stylecounter = 0;
 my %rows;
 my $rowscount = 1;
+my $key;
+my $value;
 while (($key,$value) = each %start) {
 	my $duration = $end{$key} - $start{$key};
 
 	if ($duration >= $threshold) {
-		my $s, $s2, $e, $y;
-		$pid = $pids{$key};
+		my ($s, $s2, $e, $w, $y, $y2, $style);
+		my $pid = $pids{$key};
 
 		if (!defined($rows{$pid})) {
 			$rows{$pid} = $rowscount;
@@ -140,9 +145,9 @@ while (($key,$value) = each %start) {
 my $time = $firsttime;
 my $step = ($maxtime - $firsttime) / 15;
 while ($time < $maxtime) {
-	my $s2 = ($time - $firsttime) * $mult;
+	my $s3 = ($time - $firsttime) * $mult;
 	my $tm = int($time * 100) / 100.0;
-	print "<text transform=\"translate($s2,89) rotate(90)\">$tm</text>\n";
+	print "<text transform=\"translate($s3,89) rotate(90)\">$tm</text>\n";
 	$time = $time + $step;
 }
 



             reply	other threads:[~2008-10-14 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14 13:18 Alan Jenkins [this message]
2008-10-14 13:19 ` [PATCH 2/2] fastboot: fix row order in bootgraph.pl Alan Jenkins
2008-10-14 14:01   ` Re : " Frédéric Weisbecker
2008-10-22 14:37     ` Ingo Molnar
2008-10-22 17:48       ` Steven Rostedt
2008-10-22 17:56       ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48F49C0F.7050705@tuffmail.co.uk \
    --to=alan-jenkins@tuffmail.co.uk \
    --cc=arjan@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox