public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, "Andy Shevchenko" <andy@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Frank Li" <Frank.Li@nxp.com>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
	"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH 2/2] iio: magn: mmc5633: Add some ifdef / __maybe_unused until stubs available
Date: Tue, 20 Jan 2026 09:23:04 +0200	[thread overview]
Message-ID: <aW8tWECNSvLTTKU8@smile.fi.intel.com> (raw)
In-Reply-To: <20260119221736.804825-3-jic23@kernel.org>

On Mon, Jan 19, 2026 at 10:17:36PM +0000, Jonathan Cameron wrote:

> The I3C tree has Frank Li's fix for the case of I3C not being built

> https://lore.kernel.org/all/20251230145718.4088694-1-Frank.Li@nxp.com/

Make it a Link tag

> Given those will only be available upstream at the next merge window
> and the ordering of merge of I3C vs IIO is uncertain, apply some temporary
> stubs in the driver to avoid build issues.
> 
> This can be reverted next cycle.

Link: ... [1]

> Fixes: 6e5f6bf2e3f0 ("iio: magnetometer: Add mmc5633 sensor")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512280443.lOhY75Df-lkp@intel.com/
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

...

>  static int mmc5633_read_measurement(struct mmc5633_data *data, int address, void *buf, size_t sz)
>  {
>  	struct device *dev = regmap_get_device(data->regmap);
>  	u8 data_cmd[2], status[2];
> -	unsigned int val, ready;
> +	unsigned int val;
> +	unsigned int ready __maybe_unused;
>  	int ret;

Reversed xmas tree ordering?

...

> +#ifdef CONFIG_I3C
>  		ret = i3c_device_do_xfers(data->i3cdev, xfers_wr_cmd,
>  					  ARRAY_SIZE(xfers_wr_cmd), I3C_HDR_DDR);
> +#else

> +		return -EOPNOTSUPP;

I would do one point of return, id est

		ret = -EOPNOTSUPP;

> +#endif
>  		if (ret < 0)
>  			return ret;

...

> +#ifdef CONFIG_I3C
>  		ret = read_poll_timeout(i3c_device_do_xfers, val,
>  					val || (status[0] & ready),
>  					10 * USEC_PER_MSEC,
>  					100 * 10 * USEC_PER_MSEC, 0,
>  					data->i3cdev, xfers_rd_sta_cmd,
>  					ARRAY_SIZE(xfers_rd_sta_cmd), I3C_HDR_DDR);
> +#else
> +		ret = -EOPNOTSUPP;
> +#endif
>  		if (ret) {
>  			dev_err(dev, "data not ready\n");
>  			return ret;
>  		}

Ditto.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-01-20  7:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-19 22:17 [PATCH 0/2] iio: magn: mmc5633: Fix two build issues Jonathan Cameron
2026-01-19 22:17 ` [PATCH 1/2] iio: magn: mmc5633: Ensure REGMAP_I2C / I3C not build if I2C / I3C is not Jonathan Cameron
2026-01-20  7:23   ` Andy Shevchenko
2026-01-31 12:18     ` Jonathan Cameron
2026-01-19 22:17 ` [PATCH 2/2] iio: magn: mmc5633: Add some ifdef / __maybe_unused until stubs available Jonathan Cameron
2026-01-20  7:23   ` Andy Shevchenko [this message]
2026-01-20 21:56     ` Jonathan Cameron
2026-01-20 22:03       ` Jonathan Cameron
2026-01-21 20:01         ` Jonathan Cameron
2026-01-19 23:00 ` [PATCH 0/2] iio: magn: mmc5633: Fix two build issues Frank Li

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=aW8tWECNSvLTTKU8@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=lkp@intel.com \
    --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