Re: [PATCH V2] checkpatch: Warn on uapi #includes that #include

2012-12-19 Thread Andy Whitcroft
On Tue, Dec 18, 2012 at 05:30:58PM -0800, Joe Perches wrote:
> Avoid specifying internal uapi #include paths with uapi/...
> as userspace should not use and never see that.
> 
> Neaten message line wrapping above.
> 
> Signed-off-by: Joe Perches 
> cc: David Howells 
> ---
>  scripts/checkpatch.pl |7 +--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 054a293..5eab67e 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2238,8 +2238,11 @@ sub process {
>   my $path = $1;
>   if ($path =~ m{//}) {
>   ERROR("MALFORMED_INCLUDE",
> -   "malformed #include filename\n" .
> - $herecurr);
> +   "malformed #include filename\n" . 
> $herecurr);
> + }
> + if ($path =~ "^uapi/" && $realfile =~ 
> m@\binclude/uapi/@) {
> + ERROR("UAPI_INCLUDE",
> +   "No #include in ...include/uapi/... 
> should use a uapi/ path prefix\n" . $herecurr);
>   }
>   }
>  

Looks reasonable indeed.

Acked-by: Andy Whitcroft 

-apw
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] checkpatch: Warn on uapi #includes that #include

2012-12-19 Thread David Howells
Joe Perches  wrote:

> Avoid specifying internal uapi #include paths with uapi/...
> as userspace should not use and never see that.
> 
> Neaten message line wrapping above.
> 
> Signed-off-by: Joe Perches 

Acked-by: David Howells 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] checkpatch: Warn on uapi #includes that #include uapi/...

2012-12-19 Thread David Howells
Joe Perches j...@perches.com wrote:

 Avoid specifying internal uapi #include paths with uapi/...
 as userspace should not use and never see that.
 
 Neaten message line wrapping above.
 
 Signed-off-by: Joe Perches j...@perches.com

Acked-by: David Howells dhowe...@redhat.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH V2] checkpatch: Warn on uapi #includes that #include uapi/...

2012-12-19 Thread Andy Whitcroft
On Tue, Dec 18, 2012 at 05:30:58PM -0800, Joe Perches wrote:
 Avoid specifying internal uapi #include paths with uapi/...
 as userspace should not use and never see that.
 
 Neaten message line wrapping above.
 
 Signed-off-by: Joe Perches j...@perches.com
 cc: David Howells dhowe...@redhat.com
 ---
  scripts/checkpatch.pl |7 +--
  1 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
 index 054a293..5eab67e 100755
 --- a/scripts/checkpatch.pl
 +++ b/scripts/checkpatch.pl
 @@ -2238,8 +2238,11 @@ sub process {
   my $path = $1;
   if ($path =~ m{//}) {
   ERROR(MALFORMED_INCLUDE,
 -   malformed #include filename\n .
 - $herecurr);
 +   malformed #include filename\n . 
 $herecurr);
 + }
 + if ($path =~ ^uapi/  $realfile =~ 
 m@\binclude/uapi/@) {
 + ERROR(UAPI_INCLUDE,
 +   No #include in ...include/uapi/... 
 should use a uapi/ path prefix\n . $herecurr);
   }
   }
  

Looks reasonable indeed.

Acked-by: Andy Whitcroft a...@canonical.com

-apw
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] checkpatch: Warn on uapi #includes that #include

2012-12-18 Thread Joe Perches
Avoid specifying internal uapi #include paths with uapi/...
as userspace should not use and never see that.

Neaten message line wrapping above.

Signed-off-by: Joe Perches 
cc: David Howells 
---
 scripts/checkpatch.pl |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 054a293..5eab67e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2238,8 +2238,11 @@ sub process {
my $path = $1;
if ($path =~ m{//}) {
ERROR("MALFORMED_INCLUDE",
- "malformed #include filename\n" .
-   $herecurr);
+ "malformed #include filename\n" . 
$herecurr);
+   }
+   if ($path =~ "^uapi/" && $realfile =~ 
m@\binclude/uapi/@) {
+   ERROR("UAPI_INCLUDE",
+ "No #include in ...include/uapi/... 
should use a uapi/ path prefix\n" . $herecurr);
}
}
 
-- 
1.7.8.112.g3fd21

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH V2] checkpatch: Warn on uapi #includes that #include uapi/...

2012-12-18 Thread Joe Perches
Avoid specifying internal uapi #include paths with uapi/...
as userspace should not use and never see that.

Neaten message line wrapping above.

Signed-off-by: Joe Perches j...@perches.com
cc: David Howells dhowe...@redhat.com
---
 scripts/checkpatch.pl |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 054a293..5eab67e 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2238,8 +2238,11 @@ sub process {
my $path = $1;
if ($path =~ m{//}) {
ERROR(MALFORMED_INCLUDE,
- malformed #include filename\n .
-   $herecurr);
+ malformed #include filename\n . 
$herecurr);
+   }
+   if ($path =~ ^uapi/  $realfile =~ 
m@\binclude/uapi/@) {
+   ERROR(UAPI_INCLUDE,
+ No #include in ...include/uapi/... 
should use a uapi/ path prefix\n . $herecurr);
}
}
 
-- 
1.7.8.112.g3fd21

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/