Skip to contentSkip to conversation

checkpatch.pl: Do not hardcode perl path

PATCH New Jagannadha Sutradharudu Teki 6 participants 8 messages Jun 16, 2013 – Jun 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpatch.pl: Do not hardcode perl path

From: Jagannadha Sutradharudu Teki <[email protected]>

checkpatch.pl requires perl v5.10.0 to run but it doesn't require to place in /usr/bin/perl Use env to ensure that the interpreter used is the first one on environment's $PATH on system with several versions of perl installed.

---
 tools/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/checkpatch.pl +2 -1
index 896e2bc..8dc5b9c 100755
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2001, Dave Jones. (the file handling bit)
 # (c) 2005, Joel Schopp <[email protected]> (the ugly bit)
 # (c) 2007,2008, Andy Whitcroft <[email protected]> (new conditions, test suite)
 # (c) 2008-2010 Andy Whitcroft <[email protected]>
 # Licensed under the terms of the GNU GPL License version 2
 
+use warnings;
 use strict;
 
 my $P = $0;
Signature · 1 line
1.8.3
#1 lore raw

PATCH 1/1 checkpatch.pl: Do not hardcode perl path

Hi ALL,

Could any buddy tell me how can I define bootcount value after each
reset cycle, right now i am using SRAM but when boot loader pass the control to kernel, it reset Sram memory so i lost my bootcount value. please suggest me another idea for storing bootcount value...

My another query is I want to increase my bootcount value when system is being reset by watchdog only..

Any pointer from you guys would be help me.

Thanks
~Sumit Gemini

Quoted 40 lines · Jagannadha Sutradharudu Teki

From: Jagannadha Sutradharudu Teki <[email protected]>

checkpatch.pl requires perl v5.10.0 to run but it doesn't require to place in /usr/bin/perl Use env to ensure that the interpreter used is the first one on environment's $PATH on system with several versions of perl installed.

---
 tools/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/checkpatch.pl +2 -1
index 896e2bc..8dc5b9c 100755
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2001, Dave Jones. (the file handling bit)
 # (c) 2005, Joel Schopp <[email protected]> (the ugly bit)
 # (c) 2007,2008, Andy Whitcroft <[email protected]> (new conditions, test
 suite)
 # (c) 2008-2010 Andy Whitcroft <[email protected]>
 # Licensed under the terms of the GNU GPL License version 2
 
+use warnings;
 use strict;
 

my $P = $0;
--
1.8.3

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#2 lore raw

PATCH 1/1 checkpatch.pl: Do not hardcode perl path

Hi

Il giorno 16/giu/2013 11:55, "Sumit Gemini" <[email protected]> ha scritto:

Quoted 6 lines

Hi ALL,

Could any buddy tell me how can I define bootcount value after each
reset cycle, right now i am using SRAM but when boot loader pass the control to kernel, it reset Sram memory so i lost my bootcount value.

Is this your comment on the patch?

I suggest to create a new thread and at describe your architecture.

Michael

Quoted 61 lines

please suggest me another idea for storing bootcount value...

My another query is I want to increase my bootcount value when system is being reset by watchdog only..

Any pointer from you guys would be help me.

Thanks
~Sumit Gemini

Quoted 35 lines · Jagannadha Sutradharudu Teki

From: Jagannadha Sutradharudu Teki <[email protected]>

checkpatch.pl requires perl v5.10.0 to run but it doesn't require to place in /usr/bin/perl Use env to ensure that the interpreter used is the first one on environment's $PATH on system with several versions of perl installed.

---
 tools/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/checkpatch.pl +2 -1
index 896e2bc..8dc5b9c 100755
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2001, Dave Jones. (the file handling bit)
 # (c) 2005, Joel Schopp <[email protected]> (the ugly bit)
 # (c) 2007,2008, Andy Whitcroft <[email protected]> (new conditions, test
 suite)
 # (c) 2008-2010 Andy Whitcroft <[email protected]>
 # Licensed under the terms of the GNU GPL License version 2
 
+use warnings;
 use strict;
 

my $P = $0;
--
1.8.3

Quoted 5 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

PATCH 1/1 checkpatch.pl: Do not hardcode perl path

In reply to Jagannadha Sutradharudu Teki
Quoted 20 lines · Jagannadha Sutradharudu Teki

From: Jagannadha Sutradharudu Teki <[email protected]>

checkpatch.pl requires perl v5.10.0 to run but it doesn't require to place in /usr/bin/perl Use env to ensure that the interpreter used is the first one on environment's $PATH on system with several versions of perl installed.

---
 tools/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/checkpatch.pl +1 -1
index 896e2bc..8dc5b9c 100755
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl

tools/checkpatch.pl line 11

Quoted 10 lines
tools/checkpatch.pl +1 -0
 # (c) 2001, Dave Jones. (the file handling bit)
 # (c) 2005, Joel Schopp <[email protected]> (the ugly bit)
 # (c) 2007,2008, Andy Whitcroft <[email protected]> (new conditions, test suite)
 # (c) 2008-2010 Andy Whitcroft <[email protected]>
 # Licensed under the terms of the GNU GPL License version 2
 
+use warnings;
 use strict;
 
 my $P = $0;

Lets get this to come in via the kernel please, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130616/38b704a3/attachment.pgp>
#4 lore raw

PATCH 1/1 checkpatch.pl: Do not hardcode perl path

In reply to Jagannadha Sutradharudu Teki
Quoted 20 lines · Jagannadha Sutradharudu Teki

From: Jagannadha Sutradharudu Teki <[email protected]<javascript:;>

Quoted 1 line

checkpatch.pl requires perl v5.10.0 to run but it doesn't require to place in /usr/bin/perl Use env to ensure that the interpreter used is the first one on environment's $PATH on system with several versions of perl installed.

Quoted 1 line
---
 tools/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/checkpatch.pl +0 -0
index 896e2bc..8dc5b9c 100755

tools/checkpatch.pl line 1

Quoted 2 lines
tools/checkpatch.pl +1 -1
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl

Would it not work to pass in the -w here?

Joel

Quoted 21 lines
tools/checkpatch.pl +1 -0
 # (c) 2001, Dave Jones. (the file handling bit)
 # (c) 2005, Joel Schopp <[email protected] <javascript:;>> (the
 ugly bit)
 # (c) 2007,2008, Andy Whitcroft <[email protected] <javascript:;>> (new
 conditions, test suite)
 # (c) 2008-2010 Andy Whitcroft <[email protected] <javascript:;>>
 # Licensed under the terms of the GNU GPL License version 2
 
+use warnings;
 use strict;

my $P = $0;
--
1.8.3

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de <javascript:;>
http://lists.denx.de/mailman/listinfo/u-boot

#5 lore raw

PATCH 1/1 checkpatch.pl: Do not hardcode perl path

From: Joel A Fernandes [mailto:agnel.joel at gmail.com]
Sent: 16 June 2013 21:15
To: Jagannadha Sutradharudu Teki
Cc: u-boot at lists.denx.de; Tom Rini
Subject: Re: [U-Boot] [PATCH] checkpatch.pl: Do not hardcode perl path

On Sunday, June 16, 2013, Jagannadha Sutradharudu Teki wrote:
From: Jagannadha Sutradharudu Teki <[email protected]>

checkpatch.pl<http://checkpatch.pl> requires perl v5.10.0 to run but it doesn't require to place in /usr/bin/perl
Use env to ensure that the interpreter used is the
first one on environment's $PATH on system with
several versions of perl installed.

---
 tools/checkpatch.pl<http://checkpatch.pl> | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/checkpatch.pl<http://checkpatch.pl> +1 -1
index 896e2bc..8dc5b9c 100755
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 

Would it not work to pass in the -w here?

Yes it will not work just to pass -w
It's taking -w as a file.

Thanks,
Jagan.

Joel

# (c) 2001, Dave Jones. (the file handling bit)
# (c) 2005, Joel Schopp <[email protected]> (the ugly bit) # (c) 2007,2008, Andy Whitcroft <[email protected]> (new conditions, test suite) # (c) 2008-2010 Andy Whitcroft <[email protected]>
# Licensed under the terms of the GNU GPL License version 2

+use warnings;
use strict;

my $P = $0;
--
1.8.3

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

#6 lore raw

PATCH 1/1 checkpatch.pl: Do not hardcode perl path

In reply to Joel A Fernandes

Dear Joel A Fernandes,

Quoted 17 lines · Joel A Fernandes
Quoted 15 lines · Jagannadha Sutradharudu Teki

From: Jagannadha Sutradharudu Teki <[email protected]<javascript:;>

Quoted 1 line

checkpatch.pl requires perl v5.10.0 to run but it doesn't require to place in /usr/bin/perl Use env to ensure that the interpreter used is the first one on environment's $PATH on system with several versions of perl installed.

Quoted 1 line
---
 tools/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 10 lines

tools/checkpatch.pl line 1

Quoted 7 lines
tools/checkpatch.pl +1 -1
index 896e2bc..8dc5b9c 100755
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl

Would it not work to pass in the -w here?

this is not portable! BSD variants of env will only take a single parameter.

Best regards

Andreas Bie?mann

#7 lore raw

PATCH 1/1 checkpatch.pl: Do not hardcode perl path

Quoted 31 lines · Andreas Bie?mann

Dear Joel A Fernandes,

Quoted 17 lines · Joel A Fernandes
Quoted 15 lines · Jagannadha Sutradharudu Teki

From: Jagannadha Sutradharudu Teki <[email protected]<javascript:;>

Quoted 1 line

checkpatch.pl requires perl v5.10.0 to run but it doesn't require to place in /usr/bin/perl Use env to ensure that the interpreter used is the first one on environment's $PATH on system with several versions of perl installed.

Quoted 1 line
---
 tools/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 10 lines

tools/checkpatch.pl line 1

Quoted 7 lines
tools/checkpatch.pl +1 -1
index 896e2bc..8dc5b9c 100755
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl

Would it not work to pass in the -w here?

Quoted 2 lines

this is not portable! BSD variants of env will only take a single parameter.

Sure yes I noticed that, this is an acceptable approach though I've seen some cases people solve the problem using exec.

Thanks,
Joel