public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Andrew Ijano" <andrew.ijano@gmail.com>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH next] iio: sca3000: simplify with spi_get_device_match_data()
Date: Mon, 16 Feb 2026 12:03:27 +0200	[thread overview]
Message-ID: <aZLrb943-fnkyB7s@smile.fi.intel.com> (raw)
In-Reply-To: <20260216095110.1062611-1-harshit.m.mogalapalli@oracle.com>

On Mon, Feb 16, 2026 at 01:51:05AM -0800, Harshit Mogalapalli wrote:
> Refactor each sca3000 variant with it's own chip_info struct, update the
> sca3000_probe() to use spi_get_device_match_data().

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

...

> -	st->info = &sca3000_spi_chip_info_tbl[spi_get_device_id(spi)
> -					      ->driver_data];
> +	st->info = spi_get_device_match_data(spi);

> +	if (!st->info)
> +		return -EINVAL;

This is a dead check. Just make it a requirement and drop dead code.
The support of a new HW will be assumed not tested at all if there
is no driver_data.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-02-16 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16  9:51 [PATCH next] iio: sca3000: simplify with spi_get_device_match_data() Harshit Mogalapalli
2026-02-16 10:03 ` Andy Shevchenko [this message]
2026-02-16 10:15   ` Harshit Mogalapalli
2026-02-17  7:49     ` Andy Shevchenko

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=aZLrb943-fnkyB7s@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=andrew.ijano@gmail.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=harshit.m.mogalapalli@oracle.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