]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - linux/0001-timeconst.pl-Eliminate-Perl-warning.patch.conditional
gst1-plugins-bad: update plugin licenses
[coffee/buildroot.git] / linux / 0001-timeconst.pl-Eliminate-Perl-warning.patch.conditional
1 From 63a3f603413ffe82ad775f2d62a5afff87fd94a0 Mon Sep 17 00:00:00 2001
2 From: "H. Peter Anvin" <hpa@linux.intel.com>
3 Date: Thu, 7 Feb 2013 17:14:08 -0800
4 Subject: [PATCH] timeconst.pl: Eliminate Perl warning
5
6 defined(@array) is deprecated in Perl and gives off a warning.
7 Restructure the code to remove that warning.
8
9 [ hpa: it would be interesting to revert to the timeconst.bc script.
10   It appears that the failures reported by akpm during testing of
11   that script was due to a known broken version of make, not a problem
12   with bc.  The Makefile rules could probably be restructured to avoid
13   the make bug, or it is probably old enough that it doesn't matter. ]
14
15 Reported-by: Andi Kleen <ak@linux.intel.com>
16 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
17 Cc: Andrew Morton <akpm@linux-foundation.org>
18 Cc: <stable@vger.kernel.org>
19 Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
20 ---
21 Patch status: upstream
22
23  kernel/timeconst.pl | 6 ++----
24  1 file changed, 2 insertions(+), 4 deletions(-)
25
26 diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl
27 index eb51d76..3f42652 100644
28 --- a/kernel/timeconst.pl
29 +++ b/kernel/timeconst.pl
30 @@ -369,10 +369,8 @@ if ($hz eq '--can') {
31                 die "Usage: $0 HZ\n";
32         }
33  
34 -       @val = @{$canned_values{$hz}};
35 -       if (!defined(@val)) {
36 -               @val = compute_values($hz);
37 -       }
38 +       $cv = $canned_values{$hz};
39 +       @val = defined($cv) ? @$cv : compute_values($hz);
40         output($hz, @val);
41  }
42  exit 0;
43 -- 
44 2.4.10
45