public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: kernel test robot <lkp@intel.com>
Cc: Mehdi Djait <mehdi.djait.k@gmail.com>,
	jic23@kernel.org, mazziesaccount@gmail.com,
	oe-kbuild-all@lists.linux.dev, krzysztof.kozlowski+dt@linaro.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 5/5] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer
Date: Sat, 22 Apr 2023 19:09:12 +0300	[thread overview]
Message-ID: <ZEQGqFLIyxm5XENQ@smile.fi.intel.com> (raw)
In-Reply-To: <202304220729.FCofPRvH-lkp@intel.com>

On Sat, Apr 22, 2023 at 07:19:44AM +0800, kernel test robot wrote:
> Hi Mehdi,
> 
> kernel test robot noticed the following build warnings:

I believe it's not just a warning, it's a full functional error in the code.

>    686	{
>    687		struct device *dev = regmap_get_device(data->regmap);
>    688		__le16 buf_status;
>    689		int ret, fifo_bytes;
>    690	
>    691		ret = regmap_bulk_read(data->regmap, data->chip_info->buf_status1,
>    692				       &buf_status, sizeof(buf_status));
>    693		if (ret) {
>    694			dev_err(dev, "Error reading buffer status\n");
>    695			return ret;
>    696		}
>    697	
>  > 698		buf_status &= data->chip_info->buf_smp_lvl_mask;
>    699		fifo_bytes = le16_to_cpu(buf_status);

You need to mask in the same endianess space, i.o.w. either on CPU or device side.

I believe you wanted to have fifo_bytes to be masked, but I'm not sure.

>    701		return fifo_bytes;
>    702	}

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-04-22 16:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 20:22 [PATCH v2 0/5] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer Mehdi Djait
2023-04-20 20:22 ` [PATCH v2 1/5] dt-bindings: iio: Add " Mehdi Djait
2023-04-21  3:36   ` Matti Vaittinen
2023-04-21  8:12   ` Krzysztof Kozlowski
2023-04-20 20:22 ` [PATCH v2 2/5] iio: accel: kionix-kx022a: Warn on failed matches and assume compatibility Mehdi Djait
2023-04-21  3:44   ` Matti Vaittinen
2023-04-22 17:26     ` Jonathan Cameron
2023-04-22 17:28   ` Jonathan Cameron
2023-04-23 20:59     ` Mehdi Djait
2023-04-20 20:22 ` [PATCH v2 3/5] iio: accel: kionix-kx022a: Refactor driver and add chip_info structure Mehdi Djait
2023-04-21  6:19   ` Matti Vaittinen
2023-04-22 17:32     ` Jonathan Cameron
2023-04-23 21:01       ` Mehdi Djait
2023-04-20 20:22 ` [PATCH v2 4/5] iio: accel: kionix-kx022a: Add a function to retrieve number of bytes in buffer Mehdi Djait
2023-04-21  6:14   ` Matti Vaittinen
2023-04-22 17:36     ` Jonathan Cameron
2023-04-22 17:42       ` Jonathan Cameron
2023-04-23 22:06     ` Mehdi Djait
2023-04-22 17:46   ` Jonathan Cameron
2023-04-23 22:05     ` Mehdi Djait
2023-04-20 20:22 ` [PATCH v2 5/5] iio: accel: Add support for Kionix/ROHM KX132-1211 accelerometer Mehdi Djait
2023-04-21 23:19   ` kernel test robot
2023-04-22 16:09     ` Andy Shevchenko [this message]
2023-04-23 20:56       ` Mehdi Djait
2023-04-24 14:56         ` Mehdi Djait

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=ZEQGqFLIyxm5XENQ@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mazziesaccount@gmail.com \
    --cc=mehdi.djait.k@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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