linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Andrew Davis <afd@ti.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] iio: health: afe4403: Do not store dev pointer in device struct
Date: Wed, 20 Aug 2025 17:45:12 +0300	[thread overview]
Message-ID: <aKXfeOi2y55L1c7A@smile.fi.intel.com> (raw)
In-Reply-To: <20250813225840.576305-1-afd@ti.com>

On Wed, Aug 13, 2025 at 05:58:35PM -0500, Andrew Davis wrote:
> The device *dev is only used in probe(), so no need to store it
> in the device local data struct. In all the places in probe()
> we did use that, just use a new local variable for the same.

...

> -		afe->trig = devm_iio_trigger_alloc(afe->dev,
> +		afe->trig = devm_iio_trigger_alloc(dev,
>  						   "%s-dev%d",

It can be made one line less, but it's already applied...

>  						   indio_dev->name,
>  						   iio_device_id(indio_dev));
>  		if (!afe->trig) {
> -			dev_err(afe->dev, "Unable to allocate IIO trigger\n");
> +			dev_err(dev, "Unable to allocate IIO trigger\n");
>  			return -ENOMEM;
>  		}

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2025-08-20 14:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 22:58 [PATCH 1/6] iio: health: afe4403: Do not store dev pointer in device struct Andrew Davis
2025-08-13 22:58 ` [PATCH 2/6] iio: health: afe4403: Use devm_regulator_get_enable() helper Andrew Davis
2025-08-13 23:12   ` David Lechner
2025-08-13 22:58 ` [PATCH 3/6] iio: health: afe4403: Use dev_err_probe() helper Andrew Davis
2025-08-13 22:58 ` [PATCH 4/6] iio: health: afe4404: Do not store dev pointer in device struct Andrew Davis
2025-08-16 12:55   ` Jonathan Cameron
2025-08-13 22:58 ` [PATCH 5/6] iio: health: afe4404: Use devm_regulator_get_enable() helper Andrew Davis
2025-08-13 22:58 ` [PATCH 6/6] iio: health: afe4404: Use dev_err_probe() helper Andrew Davis
2025-08-16 12:53 ` [PATCH 1/6] iio: health: afe4403: Do not store dev pointer in device struct Jonathan Cameron
2025-08-20 14:45 ` Andy Shevchenko [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=aKXfeOi2y55L1c7A@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=afd@ti.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /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).