From: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"lars@metafoo.de" <lars@metafoo.de>,
"Michael.Hennerich@analog.com" <Michael.Hennerich@analog.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
"knaack.h@gmx.de" <knaack.h@gmx.de>,
Daniel Baluta <daniel.baluta@nxp.com>
Subject: Re: [PATCH] staging: iio/meter: add name to function definition arguments
Date: Mon, 19 Feb 2018 08:52:22 -0300 [thread overview]
Message-ID: <20180219115222.r7uvuhvt2reetd4g@smtp.gmail.com> (raw)
In-Reply-To: <20180217140834.2947e5e4@archlinux>
Hi Jonathan,
> On Fri, 16 Feb 2018 11:16:58 -0200
> Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> wrote:
>
> > Hi Daniel
> >
> > > Hi Rodrigo,
> > >
> > > I think this is a nice finding. One comment inline:
> > >
> > > On Vi, 2018-02-16 at 10:50 -0200, rodrigosiqueira wrote:
> > > > This patch fixes the checkpatch.pl warning:
> > > >
> > > > drivers/staging/iio/meter/ade7854.h:157: WARNING: function definition
> > > > argument 'struct device *' should also have an identifier name...
> > > >
> > > > + int (*read_reg_32)(struct device *dev, u16 reg_address, u32 *val);
> > > > + int (*write_reg_8)(struct device *dev, u16 reg_address, u8 value);
> > >
> > >
> > > Any particular reason for using val vs value? I get that one is a pointer
> > > and another a plain type, but I think the name should be the same.
> >
> > Before I selected the name, I figure out that read_reg_* and write_reg_*
> > was assigned inside the iio/meter/ade7754-(i2c|spi).c files by function
> > like ade7754_*_read_reg_* and ade7754_*_write_reg_* .
> >
> > I considered to use 'value' name for both functions parameters, however,
> > I noticed that function ade7754_*_write_reg_* adopted the name 'value'
> > for the last argument and ade7754_*_read_reg_* named the last argument
> > as 'val'. So, for consistency sake between the header file and the c
> > code, I decided to use the same parameter name patterns.
> >
> Hohum. It isn't even that consistent ;)
>
> ade7754_write_reg_8 uses val and ade7754_write_reg_16 uses value.
>
> I would suggest another patch to make them all val.
Thanks for the review. I will send another patch as you recommended.
Rodrigo Siqueira
> Thanks,
>
> Jonathan
> >
> > > thanks,
> > > Daniel.
> > >
> >
> > Thanks
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
prev parent reply other threads:[~2018-02-19 11:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 12:50 [PATCH] staging: iio/meter: add name to function definition arguments rodrigosiqueira
2018-02-16 12:56 ` Daniel Baluta
2018-02-16 13:16 ` Rodrigo Siqueira
2018-02-17 14:09 ` Jonathan Cameron
2018-02-19 11:52 ` Rodrigo Siqueira [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180219115222.r7uvuhvt2reetd4g@smtp.gmail.com \
--to=rodrigosiqueiramelo@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=daniel.baluta@nxp.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox