From: kernel test robot <lkp@intel.com>
To: Andriy Tryshnivskyy <andriy.tryshnivskyy@opensynergy.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
0day robot <lkp@intel.com>
Subject: drivers/iio/common/scmi_sensors/scmi_iio.c:309:29: error: 'struct scmi_iio_priv' has no member named 'handle'
Date: Tue, 28 Sep 2021 07:43:22 +0800 [thread overview]
Message-ID: <202109280716.guXfc8Nh-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5222 bytes --]
tree: https://github.com/0day-ci/linux/commits/Andriy-Tryshnivskyy/iio-scmi-Add-reading-raw-attribute/20210922-162517
head: d991091086871ace610efcdfdaeab371c77aaf42
commit: d991091086871ace610efcdfdaeab371c77aaf42 iio/scmi: Add reading "raw" attribute.
date: 6 days ago
config: parisc-buildonly-randconfig-r005-20210927 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/d991091086871ace610efcdfdaeab371c77aaf42
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andriy-Tryshnivskyy/iio-scmi-Add-reading-raw-attribute/20210922-162517
git checkout d991091086871ace610efcdfdaeab371c77aaf42
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/iio/common/scmi_sensors/scmi_iio.c: In function 'scmi_iio_read_raw':
>> drivers/iio/common/scmi_sensors/scmi_iio.c:309:29: error: 'struct scmi_iio_priv' has no member named 'handle'
309 | err = sensor->handle->sensor_ops->config_set(
| ^~
drivers/iio/common/scmi_sensors/scmi_iio.c:310:31: error: 'struct scmi_iio_priv' has no member named 'handle'
310 | sensor->handle, sensor->sensor_info->id, sensor_config);
| ^~
drivers/iio/common/scmi_sensors/scmi_iio.c:316:29: error: 'struct scmi_iio_priv' has no member named 'handle'
316 | err = sensor->handle->sensor_ops->reading_get_timestamped(
| ^~
drivers/iio/common/scmi_sensors/scmi_iio.c:317:31: error: 'struct scmi_iio_priv' has no member named 'handle'
317 | sensor->handle, sensor->sensor_info->id,
| ^~
drivers/iio/common/scmi_sensors/scmi_iio.c:329:29: error: 'struct scmi_iio_priv' has no member named 'handle'
329 | err = sensor->handle->sensor_ops->config_set(
| ^~
drivers/iio/common/scmi_sensors/scmi_iio.c:330:31: error: 'struct scmi_iio_priv' has no member named 'handle'
330 | sensor->handle, sensor->sensor_info->id, sensor_config);
| ^~
vim +309 drivers/iio/common/scmi_sensors/scmi_iio.c
281
282 static int scmi_iio_read_raw(struct iio_dev *iio_dev,
283 struct iio_chan_spec const *ch, int *val,
284 int *val2, long mask)
285 {
286 struct scmi_iio_priv *sensor = iio_priv(iio_dev);
287 s8 scale;
288 int ret;
289 int err;
290 u32 sensor_config;
291 struct scmi_sensor_reading readings[SCMI_IIO_NUM_OF_AXIS];
292
293 switch (mask) {
294 case IIO_CHAN_INFO_SCALE:
295 scale = sensor->sensor_info->axis[ch->scan_index].scale;
296 if (scale < 0) {
297 *val = 1;
298 *val2 = int_pow(10, abs(scale));
299 return IIO_VAL_FRACTIONAL;
300 }
301 *val = int_pow(10, scale);
302 return IIO_VAL_INT;
303 case IIO_CHAN_INFO_SAMP_FREQ:
304 ret = scmi_iio_get_odr_val(iio_dev, val, val2);
305 return ret ? ret : IIO_VAL_INT_PLUS_MICRO;
306 case IIO_CHAN_INFO_RAW:
307 sensor_config = FIELD_PREP(SCMI_SENS_CFG_SENSOR_ENABLED_MASK,
308 SCMI_SENS_CFG_SENSOR_ENABLE);
> 309 err = sensor->handle->sensor_ops->config_set(
310 sensor->handle, sensor->sensor_info->id, sensor_config);
311 if (err)
312 dev_err(&iio_dev->dev,
313 "Error in enabling sensor %s err %d",
314 sensor->sensor_info->name, err);
315
316 err = sensor->handle->sensor_ops->reading_get_timestamped(
317 sensor->handle, sensor->sensor_info->id,
318 sensor->sensor_info->num_axis,
319 (struct scmi_sensor_reading *)&readings);
320 if (err) {
321 dev_err(&iio_dev->dev,
322 "Error in reading raw attribute for sensor %s err %d",
323 sensor->sensor_info->name, err);
324 return err;
325 }
326
327 sensor_config = FIELD_PREP(SCMI_SENS_CFG_SENSOR_ENABLED_MASK,
328 SCMI_SENS_CFG_SENSOR_DISABLE);
329 err = sensor->handle->sensor_ops->config_set(
330 sensor->handle, sensor->sensor_info->id, sensor_config);
331 if (err)
332 dev_err(&iio_dev->dev,
333 "Error in enabling sensor %s err %d",
334 sensor->sensor_info->name, err);
335 /* Use 32-bit value, since practically there is no need in 64 bits */
336 *val = (u32)readings[ch->scan_index].value;
337 return IIO_VAL_INT;
338 default:
339 return -EINVAL;
340 }
341 }
342
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40165 bytes --]
reply other threads:[~2021-09-27 23:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202109280716.guXfc8Nh-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.tryshnivskyy@opensynergy.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.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