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: Yasin Lee <yasin.lee.x@outlook.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	oe-kbuild-all@lists.linux.dev, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	Yasin Lee <yasin.lee.x@gmail.com>
Subject: Re: [PATCH v5 3/3] iio:proximity:hx9023s: Add TYHX HX9023S sensor driver
Date: Mon, 17 Jun 2024 20:22:48 +0100	[thread overview]
Message-ID: <20240617202248.35994484@jic23-huawei> (raw)
In-Reply-To: <202406171946.qe83Tde0-lkp@intel.com>

On Mon, 17 Jun 2024 19:34:30 +0800
kernel test robot <lkp@intel.com> wrote:

> Hi Yasin,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on jic23-iio/togreg]
> [also build test WARNING on robh/for-next linus/master v6.10-rc4 next-20240613]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Yasin-Lee/dt-bindings-iio-proximity-Add-hx9023s-binding/20240616-154122
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> patch link:    https://lore.kernel.org/r/SN7PR12MB8101D4BC788B5954608D677DA4CC2%40SN7PR12MB8101.namprd12.prod.outlook.com
> patch subject: [PATCH v5 3/3] iio:proximity:hx9023s: Add TYHX HX9023S sensor driver
> config: arm64-randconfig-r132-20240617 (https://download.01.org/0day-ci/archive/20240617/202406171946.qe83Tde0-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 13.2.0
> reproduce: (https://download.01.org/0day-ci/archive/20240617/202406171946.qe83Tde0-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202406171946.qe83Tde0-lkp@intel.com/
> 
> sparse warnings: (new ones prefixed by >>)
> >> drivers/iio/proximity/hx9023s.c:955:44: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 @@     got int diff @@  
>    drivers/iio/proximity/hx9023s.c:955:44: sparse:     expected restricted __be16
>    drivers/iio/proximity/hx9023s.c:955:44: sparse:     got int diff
> 
> vim +955 drivers/iio/proximity/hx9023s.c
> 
>    931	
>    932	static irqreturn_t hx9023s_trigger_handler(int irq, void *private)
>    933	{
>    934		struct iio_poll_func *pf = private;
>    935		struct iio_dev *indio_dev = pf->indio_dev;
>    936		struct hx9023s_data *data = iio_priv(indio_dev);
>    937		struct device *dev = regmap_get_device(data->regmap);
>    938		int ret;
>    939		unsigned int bit, i = 0;
>    940	
>    941		guard(mutex)(&data->mutex);
>    942		ret = hx9023s_sample(data);
>    943		if (ret) {
>    944			dev_warn(dev, "sampling failed\n");
>    945			goto out;
>    946		}
>    947	
>    948		ret = hx9023s_get_prox_state(data);
>    949		if (ret) {
>    950			dev_warn(dev, "get prox failed\n");
>    951			goto out;
>    952		}
>    953	
>    954		for_each_set_bit(bit, indio_dev->active_scan_mask, indio_dev->masklength)
>  > 955			data->buffer.channels[i++] = data->ch_data[indio_dev->channels[bit].channel].diff;  
>    956	
This looks very odd.  Diff is an int filled with get_unaligned_le16()
which you then write to a __be16 here.

It should remain little endian, if that is appropriate, throughout.

Also, very long line. Use a local variable for
indio_dev->channels[bit].channel.

>    957		iio_push_to_buffers_with_timestamp(indio_dev, &data->buffer, pf->timestamp);
>    958	
>    959	out:
>    960		iio_trigger_notify_done(indio_dev->trig);
>    961	
>    962		return IRQ_HANDLED;
>    963	}
>    964	
> 


  reply	other threads:[~2024-06-17 19:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240616-add-tyhx-hx9023s-sensor-driver-v5-0-ebaf280bbf0e@outlook.com>
2024-06-16  7:36 ` [PATCH v5 1/3] dt-bindings:iio:proximity:new vendor prefix: tyhx Yasin Lee
2024-06-16  7:43   ` Krzysztof Kozlowski
2024-06-18 15:50     ` Yasin Lee
2024-06-16  7:36 ` [PATCH v5 2/3] dt-bindings:iio:proximity: Add hx9023s binding Yasin Lee
2024-06-16  7:42   ` Krzysztof Kozlowski
2024-06-18 15:36     ` Yasin Lee
2024-06-16  8:40   ` Rob Herring (Arm)
2024-06-17 14:51     ` Yasin Lee
2024-06-16  7:36 ` [PATCH v5 3/3] iio:proximity:hx9023s: Add TYHX HX9023S sensor driver Yasin Lee
2024-06-17 11:34   ` kernel test robot
2024-06-17 19:22     ` Jonathan Cameron [this message]
2024-06-18 12:05       ` Yasin Lee

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=20240617202248.35994484@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=yasin.lee.x@gmail.com \
    --cc=yasin.lee.x@outlook.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).