From: kernel test robot <lkp@intel.com>
To: Liam Beguin <liambeguin@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
Liam Beguin <liambeguin@gmail.com>
Subject: Re: [PATCH 2/3] iio: adc: ltc2309: switch to new .probe()
Date: Wed, 6 Sep 2023 04:44:26 +0800 [thread overview]
Message-ID: <202309060456.UYGqTIBd-lkp@intel.com> (raw)
In-Reply-To: <20230824-ltc2309-v1-2-b87b4eb8030c@gmail.com>
Hi Liam,
kernel test robot noticed the following build warnings:
[auto build test WARNING on a5e505a99ca748583dbe558b691be1b26f05d678]
url: https://github.com/intel-lab-lkp/linux/commits/Liam-Beguin/iio-adc-add-ltc2309-support/20230825-005720
base: a5e505a99ca748583dbe558b691be1b26f05d678
patch link: https://lore.kernel.org/r/20230824-ltc2309-v1-2-b87b4eb8030c%40gmail.com
patch subject: [PATCH 2/3] iio: adc: ltc2309: switch to new .probe()
config: i386-randconfig-061-20230906 (https://download.01.org/0day-ci/archive/20230906/202309060456.UYGqTIBd-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230906/202309060456.UYGqTIBd-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/202309060456.UYGqTIBd-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/adc/ltc2309.c:138:24: sparse: sparse: cast to restricted __be16
vim +138 drivers/iio/adc/ltc2309.c
a967828958b014 Liam Beguin 2023-08-24 106
a967828958b014 Liam Beguin 2023-08-24 107 static int ltc2309_read_raw(struct iio_dev *indio_dev,
a967828958b014 Liam Beguin 2023-08-24 108 struct iio_chan_spec const *chan, int *val,
a967828958b014 Liam Beguin 2023-08-24 109 int *val2, long mask)
a967828958b014 Liam Beguin 2023-08-24 110 {
a967828958b014 Liam Beguin 2023-08-24 111 struct ltc2309 *ltc2309 = iio_priv(indio_dev);
a967828958b014 Liam Beguin 2023-08-24 112 u16 buf;
a967828958b014 Liam Beguin 2023-08-24 113 int ret;
a967828958b014 Liam Beguin 2023-08-24 114 u8 din;
a967828958b014 Liam Beguin 2023-08-24 115
a967828958b014 Liam Beguin 2023-08-24 116 mutex_lock(<c2309->lock);
a967828958b014 Liam Beguin 2023-08-24 117
a967828958b014 Liam Beguin 2023-08-24 118 switch (mask) {
a967828958b014 Liam Beguin 2023-08-24 119 case IIO_CHAN_INFO_RAW:
a967828958b014 Liam Beguin 2023-08-24 120 din = FIELD_PREP(LTC2309_DIN_CH_MASK, chan->address & 0x0f) |
a967828958b014 Liam Beguin 2023-08-24 121 FIELD_PREP(LTC2309_DIN_UNI, 1) |
a967828958b014 Liam Beguin 2023-08-24 122 FIELD_PREP(LTC2309_DIN_SLEEP, 0);
a967828958b014 Liam Beguin 2023-08-24 123
a967828958b014 Liam Beguin 2023-08-24 124 ret = i2c_smbus_write_byte(ltc2309->client, din);
a967828958b014 Liam Beguin 2023-08-24 125 if (ret < 0) {
a967828958b014 Liam Beguin 2023-08-24 126 dev_err(ltc2309->dev, "i2c command failed: %pe\n",
a967828958b014 Liam Beguin 2023-08-24 127 ERR_PTR(ret));
a967828958b014 Liam Beguin 2023-08-24 128 goto out;
a967828958b014 Liam Beguin 2023-08-24 129 }
a967828958b014 Liam Beguin 2023-08-24 130
a967828958b014 Liam Beguin 2023-08-24 131 ret = i2c_master_recv(ltc2309->client, (char *)&buf, 2);
a967828958b014 Liam Beguin 2023-08-24 132 if (ret < 0) {
a967828958b014 Liam Beguin 2023-08-24 133 dev_err(ltc2309->dev, "i2c read failed: %pe\n",
a967828958b014 Liam Beguin 2023-08-24 134 ERR_PTR(ret));
a967828958b014 Liam Beguin 2023-08-24 135 goto out;
a967828958b014 Liam Beguin 2023-08-24 136 }
a967828958b014 Liam Beguin 2023-08-24 137
a967828958b014 Liam Beguin 2023-08-24 @138 *val = be16_to_cpu(buf) >> 4;
a967828958b014 Liam Beguin 2023-08-24 139
a967828958b014 Liam Beguin 2023-08-24 140 ret = IIO_VAL_INT;
a967828958b014 Liam Beguin 2023-08-24 141 break;
a967828958b014 Liam Beguin 2023-08-24 142 case IIO_CHAN_INFO_SCALE:
a967828958b014 Liam Beguin 2023-08-24 143 *val = ltc2309->vref_mv;
a967828958b014 Liam Beguin 2023-08-24 144 *val2 = LTC2309_ADC_RESOLUTION;
a967828958b014 Liam Beguin 2023-08-24 145 ret = IIO_VAL_FRACTIONAL_LOG2;
a967828958b014 Liam Beguin 2023-08-24 146 break;
a967828958b014 Liam Beguin 2023-08-24 147 default:
a967828958b014 Liam Beguin 2023-08-24 148 ret = -EINVAL;
a967828958b014 Liam Beguin 2023-08-24 149 break;
a967828958b014 Liam Beguin 2023-08-24 150 }
a967828958b014 Liam Beguin 2023-08-24 151
a967828958b014 Liam Beguin 2023-08-24 152 out:
a967828958b014 Liam Beguin 2023-08-24 153 mutex_unlock(<c2309->lock);
a967828958b014 Liam Beguin 2023-08-24 154 return ret;
a967828958b014 Liam Beguin 2023-08-24 155 }
a967828958b014 Liam Beguin 2023-08-24 156
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-09-05 20:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 16:55 [PATCH 0/3] iio: adc: add LTC2309 support Liam Beguin
2023-08-24 16:55 ` [PATCH 1/3] iio: adc: add ltc2309 support Liam Beguin
2023-08-24 18:00 ` Krzysztof Kozlowski
2023-08-24 19:32 ` Liam Beguin
2023-08-24 16:55 ` [PATCH 2/3] iio: adc: ltc2309: switch to new .probe() Liam Beguin
2023-08-24 18:01 ` Krzysztof Kozlowski
2023-08-24 19:38 ` Liam Beguin
2023-09-05 20:44 ` kernel test robot [this message]
2023-08-24 16:55 ` [PATCH 3/3] dt-bindings: iio: adc: add lltc,ltc2309 bindings Liam Beguin
2023-08-24 17:56 ` Krzysztof Kozlowski
2023-08-24 18:50 ` Liam Beguin
2023-08-25 6:15 ` Krzysztof Kozlowski
2023-08-25 15:53 ` Liam Beguin
2023-08-26 8:36 ` Krzysztof Kozlowski
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=202309060456.UYGqTIBd-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzk@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=liambeguin@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh+dt@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.