drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:484:1: warning: 'inline' is not at beginning of declaration

From: kernel test robot
Date: Wed Mar 30 2022 - 02:22:48 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1c24a186398f59c80adb9a967486b65c1423a59d
commit: 04e6fedb18f6899453e59a748fb95be56ef73836 iio: imu: st_lsm6dsx: add mount matrix support
date: 2 years, 2 months ago
config: x86_64-randconfig-a003-20220328 (https://download.01.org/0day-ci/archive/20220330/202203301438.ye1Y6gf5-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=04e6fedb18f6899453e59a748fb95be56ef73836
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 04e6fedb18f6899453e59a748fb95be56ef73836
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c:63:
>> drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:484:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
484 | static const inline struct iio_mount_matrix *
| ^~~~~~
--
In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:41:
>> drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:484:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
484 | static const inline struct iio_mount_matrix *
| ^~~~~~
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:494:44: warning: 'st_lsm6dsx_accel_ext_info' defined but not used [-Wunused-const-variable=]
494 | static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +/inline +484 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h

483
> 484 static const inline struct iio_mount_matrix *
485 st_lsm6dsx_get_mount_matrix(const struct iio_dev *iio_dev,
486 const struct iio_chan_spec *chan)
487 {
488 struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev);
489 struct st_lsm6dsx_hw *hw = sensor->hw;
490
491 return &hw->orientation;
492 }
493

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