From: Andy Whitcroft on
On Thu, Jun 17, 2010 at 9:26 PM, Scott J. Goldman <scottjg(a)vmware.com> wrote:
>
> Signed-off-by: Scott J. Goldman <scottjg(a)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(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Scott Goldman on
> > Hrm, I would expect any number of levels of pointers to be detected
> > already correctly.
> >
> > /me goes check.
>
> We already have tests for both types which are passing generally, in
> t730-* and t7020-* so I think this is more likely a failure to detect
> the type as a type. If you could send on the sample that triggers
> this I will have a look.
>
> -apw

Yikes! you're right, lousy tests on my part. The part of my patch that triggered it was:
+ return snmp_fold_field((void __percpu **)net->mib.udp_statistics,
+ UDP_MIB_RCVBUFERRORS) +
+ snmp_fold_field((void __percpu **)net->mib.udplite_statistics,
+ UDP_MIB_RCVBUFERRORS);


ERROR: need consistent spacing around '*' (ctx:WxO)
#115: FILE: drivers/net/vmxnet3/vmxnet3_drv.c:1784:
+ return snmp_fold_field((void __percpu **)net->mib.udp_statistics,
^
Maybe caused by the __percpu attr?--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/