Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1607303

Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT.

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT.
Date 2017-03-23 10:40 +0100
Message-ID <to7nQ-jM-13@gated-at.bofh.it> (permalink)
References <tnRCq-5tR-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 22, 2017 at 10:12:34PM +0530, Arushi Singhal wrote:
>  /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_SETUP) */
> -#define AD7746_CAPSETUP_CAPEN		(1 << 7)
> -#define AD7746_CAPSETUP_CIN2		(1 << 6) /* AD7746 only */
> -#define AD7746_CAPSETUP_CAPDIFF		(1 << 5)
> -#define AD7746_CAPSETUP_CACHOP		(1 << 0)
> +#define AD7746_CAPSETUP_CAPEN		(BIT(7))
> +#define AD7746_CAPSETUP_CIN2		(BIT(6)) /* AD7746 only */
> +#define AD7746_CAPSETUP_CAPDIFF		(BIT(5))
> +#define AD7746_CAPSETUP_CACHOP		(BIT(0))

Extra parens.

regards,
dan carpenter

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2] staging: iio: Replace a bit shift by a use of BIT. Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-03-22 17:50 +0100
  Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT. Jonathan Cameron <jic23@kernel.org> - 2017-03-22 20:40 +0100
  Re: [Outreachy kernel] [PATCH v2] staging: iio: Replace a bit shift  by a use of BIT. Julia Lawall <julia.lawall@lip6.fr> - 2017-03-22 22:50 +0100
  Re: [PATCH v2] staging: iio: Replace a bit shift by a use of BIT. Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-23 10:40 +0100

csiph-web