public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Liam Beguin <liambeguin@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/2] iio: adc: add ltc2309 support
Date: Sun, 10 Sep 2023 15:03:33 +0100	[thread overview]
Message-ID: <20230910150333.472437be@jic23-huawei> (raw)
In-Reply-To: <20230903124341.360c95fe@jic23-huawei>

On Sun, 3 Sep 2023 12:43:41 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Mon, 28 Aug 2023 22:41:35 -0400
> Liam Beguin <liambeguin@gmail.com> wrote:
> 
> > The LTC2309 is an 8-Channel, 12-Bit SAR ADC with an I2C Interface.
> > 
> > This implements support for all single-ended and differential channels,
> > in unipolar mode only.
> > 
> > Signed-off-by: Liam Beguin <liambeguin@gmail.com>  
> Hi Liam,
> 
> A few really small editorial bits in here.  I'll fix them whilst applying.
> Series applied to the togreg branch of iio.git
> 
> Note I will be rebasing the tree on rc1 once available and in the meantime
> this will only be pushed out as testing.

A couple more static analysis reports came in (unreachable return in one pace
and a missing static.  I've fixed up in my tree.

Thanks,

Jonathan

> 
> Thanks,
> 
> Jonathan
> 
> 
> 
> > +/**
> > + * struct ltc2309 - internal device data structure
> > + * @dev:	Device reference
> > + * @client:	I2C reference
> > + * @vref:	External reference source
> > + * @lock:	Lock to serialize data access
> > + * @vref_mv	Internal voltage reference  
> 
> Missing : which is what the bot picked up on.
> 
> > + */
> > +struct ltc2309 {
> > +	struct device		*dev;
> > +	struct i2c_client	*client;
> > +	struct regulator	*vref;
> > +	struct mutex		lock; /* serialize data access */
> > +	int			vref_mv;
> > +};  
> 
> > +
> > +void ltc2309_regulator_disable(void *regulator)
> > +{
> > +	struct regulator *r = (struct regulator *)regulator;  
> 
> Never any need to explicitly cast from a void * to any other pointer type.
> (C spec says it is always fine to do this :)
> 
> Given type is obvious from use, can just do
> 	regulator_disable(regulator);
> and lose the local variable.
> 
> > +
> > +	regulator_disable(r);
> > +}  
> 
> ..
> > +
> > +static const struct of_device_id ltc2309_of_match[] = {
> > +	{ .compatible = "lltc,ltc2309" },
> > +	{ }
> > +};
> > +MODULE_DEVICE_TABLE(of, ltc2309_of_match);
> > +
> > +static const struct i2c_device_id ltc2309_id[] = {
> > +	{ "ltc2309" },
> > +	{}  
> 
> Trivial but space between { and } for consistency.
> 
> 


  reply	other threads:[~2023-09-10 14:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29  2:41 [PATCH v3 0/2] iio: adc: add LTC2309 support Liam Beguin
2023-08-29  2:41 ` [PATCH v3 1/2] dt-bindings: iio: adc: add lltc,ltc2309 bindings Liam Beguin
2023-08-29  2:41 ` [PATCH v3 2/2] iio: adc: add ltc2309 support Liam Beguin
2023-08-29  3:46   ` kernel test robot
2023-09-03 11:43   ` Jonathan Cameron
2023-09-10 14:03     ` Jonathan Cameron [this message]
2023-09-18 16:25       ` Liam Beguin

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=20230910150333.472437be@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=liambeguin@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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