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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-x015-01110856 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/iio/accel/mma8452.c:21:
   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) ||
                  ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> drivers/iio/accel/mma8452.c:682:3: note: in expansion of macro 'if'
      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))
                    ^
   include/linux/compiler.h:147:28: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                               ^
>> drivers/iio/accel/mma8452.c:682:3: note: in expansion of macro 'if'
      if ((!state && mma8452_freefall_mode_enabled) ||
      ^
   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) ||
                  ^
   include/linux/compiler.h:147:40: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                                           ^
>> drivers/iio/accel/mma8452.c:682:3: note: in expansion of macro 'if'
      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))
                    ^
   include/linux/compiler.h:147:40: note: in definition of macro '__trace_if'
     if (__builtin_constant_p((cond)) ? !!(cond) :   \
                                           ^
>> drivers/iio/accel/mma8452.c:682:3: note: in expansion of macro 'if'
      if ((!state && mma8452_freefall_mode_enabled) ||
      ^
   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) ||
                  ^
   include/linux/compiler.h:158:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> drivers/iio/accel/mma8452.c:682:3: note: in expansion of macro 'if'
      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))
                    ^
   include/linux/compiler.h:158:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> drivers/iio/accel/mma8452.c:682:3: note: in expansion of macro 'if'
      if ((!state && mma8452_freefall_mode_enabled) ||
      ^

vim +/if +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


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux