lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5zruqfmohoaohr2qwqug33dsar5q3fubhspbwuisxxblni6h4@paioiqyjzeg5>
Date: Mon, 9 Sep 2024 23:21:52 -0400
From: Alex Lanzano <lanzano.alex@...il.com>
To: kernel test robot <lkp@...el.com>
Cc: Jonathan Cameron <jic23@...nel.org>, 
	Lars-Peter Clausen <lars@...afoo.de>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Jagath Jog J <jagathjog1996@...il.com>, Ramona Gradinariu <ramona.bolboaca13@...il.com>, 
	Nuno Sa <nuno.sa@...log.com>, oe-kbuild-all@...ts.linux.dev, skhan@...uxfoundation.org, 
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] iio: imu: Add i2c driver for bmi270 imu

On Tue, Sep 10, 2024 at 01:03:04AM GMT, kernel test robot wrote:
> Hi Alex,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on jic23-iio/togreg]
> [also build test ERROR on robh/for-next linus/master v6.11-rc7 next-20240909]
> [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/Alex-Lanzano/dt-bindings-iio-imu-add-bmi270-bindings/20240909-123509
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> patch link:    https://lore.kernel.org/r/20240909043254.611589-3-lanzano.alex%40gmail.com
> patch subject: [PATCH v3 2/2] iio: imu: Add i2c driver for bmi270 imu
> config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20240910/202409100026.17N3K11W-lkp@intel.com/config)
> compiler: m68k-linux-gcc (GCC) 14.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240910/202409100026.17N3K11W-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@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202409100026.17N3K11W-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/iio/imu/bmi270/bmi270_core.c: In function 'bmi270_configure_imu':
> >> drivers/iio/imu/bmi270/bmi270_core.c:180:31: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
>      180 |                               FIELD_PREP(BMI270_ACC_CONF_ODR_MSK,
>          |                               ^~~~~~~~~~
> 
> 
> vim +/FIELD_PREP +180 drivers/iio/imu/bmi270/bmi270_core.c
> 
>    165	
>    166	static int bmi270_configure_imu(struct bmi270_data *bmi270_device)
>    167	{
>    168		int ret;
>    169		struct device *dev = bmi270_device->dev;
>    170		struct regmap *regmap = bmi270_device->regmap;
>    171	
>    172		ret = regmap_set_bits(regmap, BMI270_PWR_CTRL_REG,
>    173				      BMI270_PWR_CTRL_AUX_EN_MSK |
>    174				      BMI270_PWR_CTRL_GYR_EN_MSK |
>    175				      BMI270_PWR_CTRL_ACCEL_EN_MSK);
>    176		if (ret)
>    177			return dev_err_probe(dev, ret, "Failed to enable accelerometer and gyroscope");
>    178	
>    179		ret = regmap_set_bits(regmap, BMI270_ACC_CONF_REG,
>  > 180				      FIELD_PREP(BMI270_ACC_CONF_ODR_MSK,
>    181						 BMI270_ACC_CONF_ODR_100HZ) |
>    182				      FIELD_PREP(BMI270_ACC_CONF_BWP_MSK,
>    183						 BMI270_ACC_CONF_BWP_NORMAL_MODE) |
>    184				      BMI270_PWR_CONF_ADV_PWR_SAVE_MSK);
>    185		if (ret)
>    186			return dev_err_probe(dev, ret, "Failed to configure accelerometer");
>    187	
>    188		ret = regmap_set_bits(regmap, BMI270_GYR_CONF_REG,
>    189				      FIELD_PREP(BMI270_GYR_CONF_ODR_MSK,
>    190						 BMI270_GYR_CONF_ODR_200HZ) |
>    191				      FIELD_PREP(BMI270_GYR_CONF_BWP_MSK,
>    192						 BMI270_GYR_CONF_BWP_NORMAL_MODE) |
>    193				      BMI270_PWR_CONF_ADV_PWR_SAVE_MSK);
>    194		if (ret)
>    195			return dev_err_probe(dev, ret, "Failed to configure gyroscope");
>    196	
>    197		/* Enable FIFO_WKUP, Disable ADV_PWR_SAVE and FUP_EN */
>    198		ret = regmap_write(regmap, BMI270_PWR_CONF_REG,
>    199				   BMI270_PWR_CONF_FIFO_WKUP_MSK);
>    200		if (ret)
>    201			return dev_err_probe(dev, ret, "Failed to set power configuration");
>    202	
>    203		return 0;
>    204	}
>    205	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

I am having trouble reproducing this build error on both jic23-iio/togreg and
linus/master v6.11.rc7 on an aarch64 box with the same compiler version.
Maybe a config option is causing this?

However, I will add #include <linux/bitfield.h> to remedy this issue if
some edge case is being hit.

Best regards,
Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ