From: kernel test robot <lkp@intel.com>
To: Stefan Popa <stefan.popa@analog.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-kernel@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Alexandru Tachici <alexandru.tachici@analog.com>
Subject: drivers/iio/accel/adxl372.c:949:3: warning: converting the result of '<<' to a boolean always evaluates to true
Date: Fri, 15 Jan 2021 02:19:41 +0800 [thread overview]
Message-ID: <202101150231.fTcE6qLr-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 11173 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 65f0d2414b7079556fbbcc070b3d1c9f9587606d
commit: b0fc6783d4ae58f796fb183c40dbc7fa3199d51d iio: accel: adxl372: Add support for FIFO peak mode
date: 4 months ago
config: mips-randconfig-r026-20210114 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 68ff52ffead2ba25cca442778ab19286000daad7)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0fc6783d4ae58f796fb183c40dbc7fa3199d51d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b0fc6783d4ae58f796fb183c40dbc7fa3199d51d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/interrupt.h:8:
In file included from include/linux/cpumask.h:13:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:52:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:45:9: note: expanded from macro 'ATOMIC_OPS'
return xchg(&v->counter, n); \
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from drivers/iio/accel/adxl372.c:10:
In file included from include/linux/interrupt.h:8:
In file included from include/linux/cpumask.h:13:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:257:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_SIP_OP(atomic, int, subu, ll, sc)
^
arch/mips/include/asm/atomic.h:251:7: note: expanded from macro 'ATOMIC_SIP_OP'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from drivers/iio/accel/adxl372.c:10:
In file included from include/linux/interrupt.h:8:
In file included from include/linux/cpumask.h:13:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:261:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_SIP_OP(atomic64, s64, dsubu, lld, scd)
^
arch/mips/include/asm/atomic.h:251:7: note: expanded from macro 'ATOMIC_SIP_OP'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from drivers/iio/accel/adxl372.c:10:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:5:
In file included from include/linux/context_tracking_state.h:5:
In file included from include/linux/percpu.h:7:
In file included from include/linux/smp.h:15:
In file included from include/linux/smp_types.h:5:
include/linux/llist.h:222:9: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
return xchg(&head->first, NULL);
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from drivers/iio/accel/adxl372.c:10:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:7:
In file included from include/linux/lockdep.h:27:
include/linux/debug_locks.h:17:9: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
return xchg(&debug_locks, 0);
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from drivers/iio/accel/adxl372.c:14:
In file included from include/linux/spi/spi.h:14:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:33:
In file included from include/linux/pgtable.h:6:
arch/mips/include/asm/pgtable.h:210:3: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
cmpxchg64(&buddy->pte, 0, _PAGE_GLOBAL);
^
arch/mips/include/asm/cmpxchg.h:220:2: note: expanded from macro 'cmpxchg64'
cmpxchg((ptr), (o), (n)); \
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from drivers/iio/accel/adxl372.c:14:
In file included from include/linux/spi/spi.h:14:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:33:
In file included from include/linux/pgtable.h:6:
arch/mips/include/asm/pgtable.h:210:3: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/cmpxchg.h:220:2: note: expanded from macro 'cmpxchg64'
cmpxchg((ptr), (o), (n)); \
^
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
>> drivers/iio/accel/adxl372.c:949:3: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
set_mask_bits(&st->int1_bitmask, ADXL372_INT1_MAP_ACT_MSK,
^
include/linux/bitops.h:269:11: note: expanded from macro 'set_mask_bits'
} while (cmpxchg(ptr, old__, new__) != old__); \
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
>> drivers/iio/accel/adxl372.c:949:3: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
include/linux/bitops.h:269:11: note: expanded from macro 'set_mask_bits'
} while (cmpxchg(ptr, old__, new__) != old__); \
^
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
drivers/iio/accel/adxl372.c:953:3: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
set_mask_bits(&st->int1_bitmask, ADXL372_INT1_MAP_INACT_MSK,
^
include/linux/bitops.h:269:11: note: expanded from macro 'set_mask_bits'
} while (cmpxchg(ptr, old__, new__) != old__); \
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
drivers/iio/accel/adxl372.c:953:3: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
include/linux/bitops.h:269:11: note: expanded from macro 'set_mask_bits'
} while (cmpxchg(ptr, old__, new__) != old__); \
^
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
16 warnings generated.
vim +949 drivers/iio/accel/adxl372.c
940
941 static int adxl372_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan,
942 enum iio_event_type type, enum iio_event_direction dir,
943 int state)
944 {
945 struct adxl372_state *st = iio_priv(indio_dev);
946
947 switch (dir) {
948 case IIO_EV_DIR_RISING:
> 949 set_mask_bits(&st->int1_bitmask, ADXL372_INT1_MAP_ACT_MSK,
950 ADXL372_INT1_MAP_ACT_MODE(state));
951 break;
952 case IIO_EV_DIR_FALLING:
953 set_mask_bits(&st->int1_bitmask, ADXL372_INT1_MAP_INACT_MSK,
954 ADXL372_INT1_MAP_INACT_MODE(state));
955 break;
956 default:
957 return -EINVAL;
958 }
959
960 return adxl372_set_interrupts(st, st->int1_bitmask, 0);
961 }
962
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36681 bytes --]
next reply other threads:[~2021-01-14 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 18:19 kernel test robot [this message]
2021-01-14 18:24 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202101150231.fTcE6qLr-lkp@intel.com \
--to=lkp@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alexandru.tachici@analog.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stefan.popa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®