tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: a98547e350e9e17e150d23cb0afa1cd587f0a370
commit: a98547e350e9e17e150d23cb0afa1cd587f0a370 [21/21] CHROMIUM: platform/iio:
cros_ec_activity: add body_detection push event
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.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
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout a98547e350e9e17e150d23cb0afa1cd587f0a370
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/iio/common/cros_ec_sensors/cros_ec_activity.c: In function
'cros_ec_activity_push_data':
> drivers/iio/common/cros_ec_sensors/cros_ec_activity.c:232:7:
warning: this statement may fall through [-Wimplicit-fallthrough=]
232 | dir
= IIO_EV_DIR_FALLING;
| ~~~~^~~~~~~~~~~~~~~~~~~~
drivers/iio/common/cros_ec_sensors/cros_ec_activity.c:233:2: note: here
233 | default:
| ^~~~~~~
vim +232 drivers/iio/common/cros_ec_sensors/cros_ec_activity.c
204
205 static int cros_ec_activity_push_data(
206 struct iio_dev *indio_dev,
207 s16 *data,
208 s64 timestamp)
209 {
210 struct ec_response_activity_data *activity_data =
211 (struct ec_response_activity_data *)data;
212 enum motionsensor_activity activity = activity_data->activity;
213 uint8_t state = activity_data->state;
214 const struct cros_ec_sensors_state *st = iio_priv(indio_dev);
215 const struct iio_chan_spec *chan;
216 const struct iio_event_spec *event;
217 enum iio_event_direction dir;
218 int index;
219 u64 ev;
220
221 switch (activity) {
222 case MOTIONSENSE_ACTIVITY_BODY_DETECTION:
223 index = st->body_detection_channel_index;
224 dir = state ? IIO_EV_DIR_FALLING : IIO_EV_DIR_RISING;
225 break;
226 case MOTIONSENSE_ACTIVITY_SIG_MOTION:
227 index = st->sig_motion_channel_index;
228 dir = IIO_EV_DIR_FALLING;
229 break;
230 case MOTIONSENSE_ACTIVITY_DOUBLE_TAP:
231 index = st->double_tap_channel_index;
232 dir = IIO_EV_DIR_FALLING;
233 default:
234 dev_warn(&indio_dev->dev, "Unknown activity: %d\n", activity);
235 return 0;
236 }
237 chan = &st->channels[index];
238 event = &chan->event_spec[0];
239
240 ev = IIO_UNMOD_EVENT_CODE(chan->type, index, event->type, dir);
241 iio_push_event(indio_dev, ev, timestamp);
242 return 0;
243 }
244
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org