All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>,
	jic23@kernel.org, lars@metafoo.de, mchehab+huawei@kernel.org,
	ardeleanalex@gmail.com, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	mike.looijmans@topic.nl, devicetree@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	thomas.haemmerle@leica-geosystems.com
Subject: Re: [PATCH V4 1/6] iio: accel: bmi088: Modified the scale calculate
Date: Thu, 26 May 2022 01:53:00 +0800	[thread overview]
Message-ID: <202205260151.TTnXYfeD-lkp@intel.com> (raw)
In-Reply-To: <20220525130828.2394919-2-Qing-wu.Li@leica-geosystems.com.cn>

Hi LI,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on v5.18 next-20220525]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/LI-Qingwu/iio-accel-bmi088-support-BMI085-BMI090L/20220525-211157
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: x86_64-randconfig-a016 (https://download.01.org/0day-ci/archive/20220526/202205260151.TTnXYfeD-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d52a6e75b0c402c7f3b42a2b1b2873f151220947)
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/intel-lab-lkp/linux/commit/71cdfb0a9a6ddbf8737a46bc6161fb921b1ac2f4
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review LI-Qingwu/iio-accel-bmi088-support-BMI085-BMI090L/20220525-211157
        git checkout 71cdfb0a9a6ddbf8737a46bc6161fb921b1ac2f4
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/iio/accel/bmi088-accel-core.c:341:10: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                           reg = FIELD_GET(BMIO088_ACCEL_ACC_RANGE_MSK, reg);
                                 ^
   1 error generated.


vim +/FIELD_GET +341 drivers/iio/accel/bmi088-accel-core.c

   278	
   279	static int bmi088_accel_read_raw(struct iio_dev *indio_dev,
   280					 struct iio_chan_spec const *chan,
   281					 int *val, int *val2, long mask)
   282	{
   283		struct bmi088_accel_data *data = iio_priv(indio_dev);
   284		struct device *dev = regmap_get_device(data->regmap);
   285		int ret;
   286		int reg;
   287	
   288		switch (mask) {
   289		case IIO_CHAN_INFO_RAW:
   290			switch (chan->type) {
   291			case IIO_TEMP:
   292				ret = pm_runtime_resume_and_get(dev);
   293				if (ret)
   294					return ret;
   295	
   296				ret = bmi088_accel_get_temp(data, val);
   297				goto out_read_raw_pm_put;
   298			case IIO_ACCEL:
   299				ret = pm_runtime_resume_and_get(dev);
   300				if (ret)
   301					return ret;
   302	
   303				ret = iio_device_claim_direct_mode(indio_dev);
   304				if (ret)
   305					goto out_read_raw_pm_put;
   306	
   307				ret = bmi088_accel_get_axis(data, chan, val);
   308				iio_device_release_direct_mode(indio_dev);
   309				if (!ret)
   310					ret = IIO_VAL_INT;
   311	
   312				goto out_read_raw_pm_put;
   313			default:
   314				return -EINVAL;
   315			}
   316		case IIO_CHAN_INFO_OFFSET:
   317			switch (chan->type) {
   318			case IIO_TEMP:
   319				/* Offset applies before scale */
   320				*val = BMI088_ACCEL_TEMP_OFFSET/BMI088_ACCEL_TEMP_UNIT;
   321				return IIO_VAL_INT;
   322			default:
   323				return -EINVAL;
   324			}
   325		case IIO_CHAN_INFO_SCALE:
   326			switch (chan->type) {
   327			case IIO_TEMP:
   328				/* 0.125 degrees per LSB */
   329				*val = BMI088_ACCEL_TEMP_UNIT;
   330				return IIO_VAL_INT;
   331			case IIO_ACCEL:
   332				ret = pm_runtime_resume_and_get(dev);
   333				if (ret)
   334					return ret;
   335	
   336				ret = regmap_read(data->regmap,
   337						  BMI088_ACCEL_REG_ACC_RANGE, &reg);
   338				if (ret)
   339					goto out_read_raw_pm_put;
   340	
 > 341				reg = FIELD_GET(BMIO088_ACCEL_ACC_RANGE_MSK, reg);
   342				*val  = data->chip_info->scale_table[reg][0];
   343				*val2 = data->chip_info->scale_table[reg][1];
   344				ret = IIO_VAL_INT_PLUS_MICRO;
   345	
   346				goto out_read_raw_pm_put;
   347			default:
   348				return -EINVAL;
   349			}
   350		case IIO_CHAN_INFO_SAMP_FREQ:
   351			ret = pm_runtime_resume_and_get(dev);
   352			if (ret)
   353				return ret;
   354	
   355			ret = bmi088_accel_get_sample_freq(data, val, val2);
   356			goto out_read_raw_pm_put;
   357		default:
   358			break;
   359		}
   360	
   361		return -EINVAL;
   362	
   363	out_read_raw_pm_put:
   364		pm_runtime_mark_last_busy(dev);
   365		pm_runtime_put_autosuspend(dev);
   366	
   367		return ret;
   368	}
   369	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  reply	other threads:[~2022-05-25 17:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 13:08 [PATCH V4 0/6] iio: accel: bmi088: support BMI085 BMI090L LI Qingwu
2022-05-25 13:08 ` [PATCH V4 1/6] iio: accel: bmi088: Modified the scale calculate LI Qingwu
2022-05-25 17:53   ` kernel test robot [this message]
2022-05-25 13:08 ` [PATCH V4 2/6] iio: accel: bmi088: Make it possible to config scales LI Qingwu
2022-05-25 13:08 ` [PATCH V4 3/6] iio: accel: bmi088: modified the device name LI Qingwu
2022-05-25 13:08 ` [PATCH V4 4/6] iio: accel: bmi088: Add support for bmi085 accel LI Qingwu
2022-05-25 13:08 ` [PATCH V4 5/6] iio: accel: bmi088: Add support for bmi090l accel LI Qingwu
2022-05-25 13:08 ` [PATCH V4 6/6] dt-bindings: iio: accel: Add bmi085 and bmi090l bindings LI Qingwu

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=202205260151.TTnXYfeD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Qing-wu.Li@leica-geosystems.com.cn \
    --cc=ardeleanalex@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mchehab+huawei@kernel.org \
    --cc=mike.looijmans@topic.nl \
    --cc=robh+dt@kernel.org \
    --cc=thomas.haemmerle@leica-geosystems.com \
    --subject='Re: [PATCH V4 1/6] iio: accel: bmi088: Modified the scale calculate' \
    /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

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.