[ovs-dev] [PATCH v4 7/7] checkpatch: fix pointer declaration

Ben Pfaff blp at ovn.org
Tue May 2 16:35:17 UTC 2017


On Tue, May 02, 2017 at 12:24:53PM -0400, Aaron Conole wrote:
> Ben Pfaff <blp at ovn.org> writes:
> 
> > On Mon, May 01, 2017 at 04:39:30PM -0400, Aaron Conole wrote:
> >> Ben Pfaff <blp at ovn.org> writes:
> >> 
> >> > On Mon, May 01, 2017 at 04:14:09PM -0400, Aaron Conole wrote:
> >> >> A common way of expressing 'raise to the power of' when authoring
> >> >> comments uses **.  This is currently getting caught by the pointer
> >> >> spacing warning.  So, catch it here.
> >> >> 
> >> >> Reported-by: Lance Richardson <lrichard at redhat.com>
> >> >> Signed-off-by: Aaron Conole <aconole at redhat.com>
> >> >
> >> > Thanks a lot for improving checkpatch, it should be helpful for
> >> > review.
> >> 
> >> Thank you for the incrementals, and review.
> >> 
> >> > Maybe I'll start using it in my review process.
> >> 
> >> I use it by default in all of my development.  The following is my
> >> .git/hooks/pre-commit:
> >> 
> >>   #!/bin/sh
> >>   if git rev-parse --verify HEAD 2>/dev/null
> >>   then
> >>       git diff-index -p --cached HEAD
> >>   else
> >>       :
> >>   fi | utilities/checkpatch.py -s
> >> 
> >> > I applied all of these patches to master.
> >
> > Oh, interesting.
> >
> > I'm playing with it by applying the following and then changing my
> > "mutt" shortcut for applying a patch from
> >     cd ~/nicira/ovs && git am -s
> > to
> >     cd ~/nicira/ovs && checkpatch.py -p | git am -s
> >
> > I'm not sure whether my patch makes sense, but it makes me feel clever
> > either way.
> 
> :)  If it works - I don't know what the erroring output will do to the
> git am input parser, but my guess is blow up (which is probably what you
> want anyway).  I looked for solutions that use a git hook, but it seems
> they all blow up whenever anything more trivial happens, so there's
> probably not yet a slick solution.  With that said,
> 
> Acked-by: Aaron Conole <aconole at redhat.com>

I'm experimenting with it, I'm not aiming to commit it, at least not
yet.

I had the idea that checkpatch sent its errors to stderr, but I was
wrong.  I ended up modifying my patch to make it do that.  I don't know
whether it's ideal.  Maybe I should use it in a way that doesn't require
pass-through, which isn't a customary mode for this kind of tool.


More information about the dev mailing list