From: kernel test robot <lkp@intel.com>
To: "Aditya Dutt" <duttaditya18@gmail.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>, "Frank Zago" <frank@zago.net>
Cc: oe-kbuild-all@lists.linux.dev,
Aditya Dutt <duttaditya18@gmail.com>,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/2] iio: position: Add support for ams AS5600 angle sensor
Date: Tue, 21 Oct 2025 20:14:09 +0800 [thread overview]
Message-ID: <202510211910.UK1wOVjv-lkp@intel.com> (raw)
In-Reply-To: <20251020201653.86181-3-duttaditya18@gmail.com>
Hi Aditya,
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.18-rc2 next-20251021]
[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/Aditya-Dutt/dt-bindings-iio-position-Add-ams-AS5600-Position-Sensor/20251021-042001
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20251020201653.86181-3-duttaditya18%40gmail.com
patch subject: [PATCH 2/2] iio: position: Add support for ams AS5600 angle sensor
config: powerpc-randconfig-r073-20251021 (https://download.01.org/0day-ci/archive/20251021/202510211910.UK1wOVjv-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251021/202510211910.UK1wOVjv-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/202510211910.UK1wOVjv-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/iio/position/as5600.c:127:12: warning: implicit conversion from 'long long' to 'int' changes value from 4096000000 to -198967296 [-Wconstant-conversion]
*val2 = 4096000000;
~ ^~~~~~~~~~
1 warning generated.
vim +127 drivers/iio/position/as5600.c
93
94 static int as5600_read_raw(struct iio_dev *indio_dev,
95 struct iio_chan_spec const *chan,
96 int *val, int *val2, long mask)
97 {
98 struct as5600_priv *priv = iio_priv(indio_dev);
99 u16 bitmask;
100 s32 ret;
101 u16 reg;
102
103 switch (mask) {
104 case IIO_CHAN_INFO_RAW:
105 if (chan->channel == 0) {
106 reg = AS5600_REG_RAW_ANGLE;
107 bitmask = AS5600_FIELD_RAW_ANGLE;
108 } else {
109 reg = AS5600_REG_ANGLE;
110 bitmask = AS5600_FIELD_ANGLE;
111 }
112 ret = i2c_smbus_read_word_swapped(priv->client, reg);
113
114 if (ret < 0)
115 return ret;
116 *val = ret & bitmask;
117
118 return IIO_VAL_INT;
119
120 case IIO_CHAN_INFO_SCALE:
121 /* Always 4096 steps, but angle range varies between
122 * 18 and 360 degrees.
123 */
124 if (chan->channel == 0) {
125 /* Whole angle range = 2*pi / 4096 */
126 *val = 2 * 3141592;
> 127 *val2 = 4096000000;
128 } else {
129 s32 range;
130
131 /* MPOS - ZPOS defines the active angle selection */
132 /* Partial angle = (range / 4096) * (2*pi / 4096) */
133 mutex_lock(&priv->lock);
134 range = priv->mpos - priv->zpos;
135 mutex_unlock(&priv->lock);
136 if (range <= 0)
137 range += 4096;
138
139 *val = range * 2 * 314159;
140 *val /= 4096;
141 *val2 = 409600000;
142 }
143
144 return IIO_VAL_FRACTIONAL;
145
146 default:
147 return -EINVAL;
148 }
149 }
150
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-10-21 12:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 20:16 [PATCH 0/2] New driver for ams AS5600 Position Sensor Aditya Dutt
2025-10-20 20:16 ` [PATCH 1/2] dt-bindings: iio: position: Add " Aditya Dutt
2025-10-22 17:50 ` Conor Dooley
2025-10-20 20:16 ` [PATCH 2/2] iio: position: Add support for ams AS5600 angle sensor Aditya Dutt
2025-10-20 23:45 ` Frank Zago
2025-10-21 11:38 ` kernel test robot
2025-10-21 12:14 ` kernel test robot [this message]
2025-10-23 18:16 ` Jonathan Cameron
2025-10-23 18:32 ` 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=202510211910.UK1wOVjv-lkp@intel.com \
--to=lkp@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=duttaditya18@gmail.com \
--cc=frank@zago.net \
--cc=jic23@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox