Re: [PATCH v3] iio: mma8452: add freefall detection for Freescale's accelerometers

From: kbuild test robot
Date: Wed Jan 13 2016 - 06:40:19 EST


Hi Martin,

[auto build test WARNING on next-20160113]
[cannot apply to v4.4-rc8 v4.4-rc7 v4.4-rc6 v4.4]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Martin-Kepplinger/iio-mma8452-add-freefall-detection-for-Freescale-s-accelerometers/20160113-192756
config: x86_64-randconfig-x017-01110856 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

drivers/iio/accel/mma8452.c: In function 'mma8452_write_event_config':
>> drivers/iio/accel/mma8452.c:682:15: warning: the address of 'mma8452_freefall_mode_enabled' will always evaluate as 'true' [-Waddress]
if ((!state && mma8452_freefall_mode_enabled) ||
^
drivers/iio/accel/mma8452.c:683:17: warning: the address of 'mma8452_freefall_mode_enabled' will always evaluate as 'true' [-Waddress]
(state && !mma8452_freefall_mode_enabled))
^

vim +682 drivers/iio/accel/mma8452.c

666 return -EINVAL;
667 }
668 }
669
670 static int mma8452_write_event_config(struct iio_dev *indio_dev,
671 const struct iio_chan_spec *chan,
672 enum iio_event_type type,
673 enum iio_event_direction dir,
674 int state)
675 {
676 struct mma8452_data *data = iio_priv(indio_dev);
677 const struct mma_chip_info *chip = data->chip_info;
678 int val;
679
680 switch (dir) {
681 case IIO_EV_DIR_FALLING:
> 682 if ((!state && mma8452_freefall_mode_enabled) ||
683 (state && !mma8452_freefall_mode_enabled))
684 return mma8452_set_freefall_mode(data, state);
685 else
686 return 0;
687 case IIO_EV_DIR_RISING:
688 val = i2c_smbus_read_byte_data(data->client, chip->ev_cfg);
689 if (val < 0)
690 return val;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data