Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1500464

Re: Re: [PATCH] staging:vt6656:baseband.h: fix function definition argument without identifier name issue

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: Re: [PATCH] staging:vt6656:baseband.h: fix function definition argument without identifier name issue
Date 2016-10-13 19:10 +0200
Message-ID <srRwm-615-9@gated-at.bofh.it> (permalink)
References <srMQ1-341-17@gated-at.bofh.it> <srN9n-3q6-13@gated-at.bofh.it> <srPbb-4G0-21@gated-at.bofh.it> <srQAi-5qL-47@gated-at.bofh.it> <srRcZ-5TH-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Oct 13, 2016 at 09:37:23AM -0700, Joe Perches wrote:
> On Thu, 2016-10-13 at 16:57 +0200, Greg KH wrote:
> > On Thu, Oct 13, 2016 at 05:23:45PM +0300, Mikhail Golubev wrote:
> > > On Thu, Oct 13, 2016 at 02:06:02PM +0200, Greg KH wrote:
> > > > On Thu, Oct 13, 2016 at 02:50:18PM +0300, Mikhail Golubev wrote:
> > > > > Function definitions arguments should also have an identifier name as reported by checkpatch.pl.
> []
> > > > > diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h
> []
> > > > > @@ -86,15 +86,15 @@ struct vnt_phy_field {
> > > > >  unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,
> > > > >  				unsigned int frame_length, u16 tx_rate);p
> > > > >  
> > > > > -void vnt_get_phy_field(struct vnt_private *, u32 frame_length,
> > > > > -		       u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);
> > > > > -
> > > > > -void vnt_set_short_slot_time(struct vnt_private *);
> > > > > -void vnt_set_vga_gain_offset(struct vnt_private *, u8);
> > > > > -void vnt_set_antenna_mode(struct vnt_private *, u8);
> > > > > -int vnt_vt3184_init(struct vnt_private *);
> > > > > -void vnt_set_deep_sleep(struct vnt_private *);
> > > > > -void vnt_exit_deep_sleep(struct vnt_private *);
> > > > > -void vnt_update_pre_ed_threshold(struct vnt_private *, int scanning);
> > > > > +void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,
> > > > > +		       u16 tx_rate, u8 pkt_type, struct vnt_phy_field *phy);
> > > > > +
> > > > Really?  Since when is this a coding style requirement?
> > > This requirement is really new. It was proposed by Joe Perches at 26 Sep 2016:
> > > [PATCH] checkpatch: Add warning for unnamed function definition.
> > > 
> > > Should this type of warnings be fixed here?
> > Ugh, Joe, why did you add this option?
> 
> 1. Most all kernel prototypes use named arguments.
> 2. It helps make header files easier to read/lookup with grep.
> 
> int func(int, int, int)
> vs
> int func(int weight, int density, int mass)
> 
> which is easier for humans to use?

Yes, which is why I use that format, but is it something we are now
going to suddenly require?

Also, this is going to take a lot more work to review patches like this,
to match up the variable names to ensure that the developer got it
right...

thanks,

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] staging:vt6656:baseband.h: fix function definition argument without identifier name issue Mikhail Golubev <golubev.mikhail@gmail.com> - 2016-10-13 14:00 +0200
  Re: [PATCH] staging:vt6656:baseband.h: fix function definition  argument without identifier name issue Greg KH <gregkh@linuxfoundation.org> - 2016-10-13 14:20 +0200
    Re: Re: [PATCH] staging:vt6656:baseband.h: fix function definition  argument without identifier name issue Mikhail Golubev <golubev.mikhail@gmail.com> - 2016-10-13 16:30 +0200
      Re: Re: [PATCH] staging:vt6656:baseband.h: fix function definition  argument without identifier name issue Greg KH <gregkh@linuxfoundation.org> - 2016-10-13 18:00 +0200
        Re: Re: [PATCH] staging:vt6656:baseband.h: fix function definition  argument without identifier name issue Joe Perches <joe@perches.com> - 2016-10-13 18:40 +0200
          Re: Re: [PATCH] staging:vt6656:baseband.h: fix function definition  argument without identifier name issue Joe Perches <joe@perches.com> - 2016-10-13 19:00 +0200
          Re: Re: [PATCH] staging:vt6656:baseband.h: fix function definition  argument without identifier name issue Greg KH <gregkh@linuxfoundation.org> - 2016-10-13 19:10 +0200
    [PATCH v2] staging:vt6656:baseband.h: fix function definition argument without identifier name issue Mikhail Golubev <golubev.mikhail@gmail.com> - 2016-10-14 11:10 +0200

csiph-web