devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Ramona Alexandra Nechita <ramona.nechita@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Cosmin Tanislav <cosmin.tanislav@analog.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Nuno Sa <nuno.sa@analog.com>,
	Andy Shevchenko <andy@kernel.org>,
	David Lechner <dlechner@baylibre.com>,
	Marcelo Schmitt <marcelo.schmitt@analog.com>,
	Olivier Moysan <olivier.moysan@foss.st.com>,
	Dumitru Ceclan <mitrutzceclan@gmail.com>,
	Matteo Martelli <matteomartelli3@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Alisa-Dariana Roman <alisadariana@gmail.com>,
	Ivan Mikhaylov <fr0st61te@gmail.com>,
	Mike Looijmans <mike.looijmans@topic.nl>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, llvm@lists.linux.dev,
	oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v5 3/3] drivers: iio: adc: add support for ad777x family
Date: Sat, 14 Sep 2024 17:48:15 +0100	[thread overview]
Message-ID: <20240914174815.4084f90f@jic23-huawei> (raw)
In-Reply-To: <202409140955.bz1rH7Q6-lkp@intel.com>

skip "nr_"
>          |                               ~~~~~~~~~~~ ^ ~~~
> >> drivers/iio/adc/ad7779.c:748:35: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]  
>      748 |                 return dev_err_probe(&spi->dev, ret,
>          |                                                 ^~~
>    drivers/iio/adc/ad7779.c:735:9: note: initialize the variable 'ret' to silence this warning
>      735 |         int ret;
>          |                ^
>          |                 = 0
Definitely don't do that!

just replace ret with -EINVAL

Jonathan

>    8 warnings generated.
> 
> 
> vim +/ret +748 drivers/iio/adc/ad7779.c
> 
>    729	
>    730	static int ad7779_probe(struct spi_device *spi)
>    731	{
>    732		struct iio_dev *indio_dev;
>    733		struct ad7779_state *st;
>    734		struct gpio_desc *reset_gpio, *start_gpio;
>    735		int ret;
>    736	
>    737		indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
>    738		if (!indio_dev)
>    739			return -ENOMEM;
>    740	
>    741		st = iio_priv(indio_dev);
>    742	
>    743		st->mclk = devm_clk_get_enabled(&spi->dev, "mclk");
>    744		if (IS_ERR(st->mclk))
>    745			return PTR_ERR(st->mclk);
>    746	
>    747		if (!spi->irq)
>  > 748			return dev_err_probe(&spi->dev, ret,  
>    749					     "DRDY irq not present\n");
>    750	

  reply	other threads:[~2024-09-14 16:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 12:15 [PATCH v5 0/3] add support for ad777x family Ramona Alexandra Nechita
2024-09-12 12:15 ` [PATCH v5 1/3] dt-bindings: iio: adc: add a7779 doc Ramona Alexandra Nechita
2024-09-12 13:15   ` Rob Herring (Arm)
2024-09-14 16:38   ` Jonathan Cameron
2024-09-12 12:15 ` [PATCH v5 2/3] Documentation: ABI: added filter mode doc in sysfs-bus-iio Ramona Alexandra Nechita
2024-09-12 14:47   ` Andy Shevchenko
2024-09-13 14:06     ` Nechita, Ramona
2024-09-13 17:36       ` Andy Shevchenko
2024-09-14 16:42         ` Jonathan Cameron
2024-09-13  4:16   ` kernel test robot
2024-09-14 16:43     ` Jonathan Cameron
2024-09-12 12:15 ` [PATCH v5 3/3] drivers: iio: adc: add support for ad777x family Ramona Alexandra Nechita
2024-09-12 15:15   ` Andy Shevchenko
2024-09-14 16:46     ` Jonathan Cameron
2024-09-14  1:44   ` kernel test robot
2024-09-14 16:48     ` Jonathan Cameron [this message]
2024-09-14 17:06   ` Jonathan Cameron
2024-09-20 13:24     ` Nechita, Ramona
2024-09-23 12:51       ` David Lechner
2024-09-28 14:29         ` Jonathan Cameron
2024-09-26 13:41     ` Nechita, Ramona
2024-09-28 14:31       ` Jonathan Cameron
2024-10-10 14:35         ` Nechita, Ramona
2024-10-10 16:40           ` Jonathan Cameron

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=20240914174815.4084f90f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=alisadariana@gmail.com \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=cosmin.tanislav@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=fr0st61te@gmail.com \
    --cc=krzk@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=marcelo.schmitt@analog.com \
    --cc=matteomartelli3@gmail.com \
    --cc=mike.looijmans@topic.nl \
    --cc=mitrutzceclan@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=olivier.moysan@foss.st.com \
    --cc=ramona.nechita@analog.com \
    --cc=robh@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;
as well as URLs for NNTP newsgroup(s).