lkml.org 
[lkml]   [2010]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateFri, 18 Jun 2010 14:15:35 +0100
SubjectRe: [PATCH] checkpatch: fix false positive on casting to double pointer
FromAndy Whitcroft <>
On Thu, Jun 17, 2010 at 9:26 PM, Scott J. Goldman <scottjg@vmware.com> wrote:
>
> Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
> ---
>  scripts/checkpatch.pl         |    4 +++-
>  tests/t/t9190-double-pointers |    6 ++++++
>  2 files changed, 9 insertions(+), 1 deletions(-)
>  create mode 100644 tests/t/t9190-double-pointers
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 87bbb8b..687bd6f 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1982,7 +1982,9 @@ sub process {
>                                         $op eq '*' or $op eq '/' or
>                                         $op eq '%')
>                                {
> -                                       if ($ctx =~ /Wx[^WCE]|[^WCE]xW/) {
> +                                       if ($op eq '*' && $cc =~ /^\*/) {
> +                                               # double pointer is ok
> +                                       } elsif ($ctx =~ /Wx[^WCE]|[^WCE]xW/) {
>                                                ERROR("need consistent spacing around '$op' $at\n" .
>                                                        $hereptr);

Hrm, I would expect any number of levels of pointers to be detected
already correctly.

/me goes check.

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

\
 
 \ /
  Last update: 2010-06-18 15:17    [from the cache]
©2003-2010