summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2013-02-07 12:25:56 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-02-14 15:25:00 +1100
commit9037c66acfcaadddc99f9deb2d6f414063b1cbe3 (patch)
treedab973ff9d5d0cca1034736f2003cf41d2f70192 /kernel
parentd3aff33d72c0d6433d38e8b7ae618708da80a27a (diff)
timeconst.pl: remove deprecated defined(@array)
The use of defined() on arrays and hashes has been deprecated since perl 5.6, but until 5.17.6 it only warned on lexicals, not package globals. Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/timeconst.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
index 3f42652a6a37..04612394c53e 100644
--- a/kernel/timeconst.pl
+++ b/kernel/timeconst.pl
@@ -369,8 +369,10 @@ if ($hz eq '--can') {
die "Usage: $0 HZ\n";
}
- $cv = $canned_values{$hz};
- @val = defined($cv) ? @$cv : compute_values($hz);
+ @val = @{$canned_values{$hz}};
+ if (!@val) {
+ @val = compute_values($hz);
+ }
output($hz, @val);
}
exit 0;