public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>,
	hsweeten@visionengravers.com, gregkh@linuxfoundation.org,
	mahfouz.saif.elyazal@gmail.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: comedi: dt2801: Prefer using the BIT macro
Date: Mon, 11 Jan 2016 17:31:57 +0000	[thread overview]
Message-ID: <5693E70D.7090909@mev.co.uk> (raw)
In-Reply-To: <20160111160428.GA8839@Karyakshetra>

On 11/01/16 16:04, Bhaktipriya Shridhar wrote:
> As suggested by checkpatch.pl, this patch replaces bit shifting on 1 with the
> BIT(x) macro.
>
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
> ---
>   drivers/staging/comedi/drivers/dt2801.c | 18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c
> index 80e38de..6c7b4d2 100644
> --- a/drivers/staging/comedi/drivers/dt2801.c
> +++ b/drivers/staging/comedi/drivers/dt2801.c
> @@ -68,17 +68,17 @@ Configuration options:
>   /* Command modifiers (only used with read/write), EXTTRIG can be
>      used with some other commands.
>   */
> -#define DT_MOD_DMA     (1<<4)
> -#define DT_MOD_CONT    (1<<5)
> -#define DT_MOD_EXTCLK  (1<<6)
> -#define DT_MOD_EXTTRIG (1<<7)
> +#define DT_MOD_DMA     BIT(4)
> +#define DT_MOD_CONT    BIT(5)
> +#define DT_MOD_EXTCLK  BIT(6)
> +#define DT_MOD_EXTTRIG BIT(7)
>
>   /* Bits in status register */
> -#define DT_S_DATA_OUT_READY   (1<<0)
> -#define DT_S_DATA_IN_FULL     (1<<1)
> -#define DT_S_READY            (1<<2)
> -#define DT_S_COMMAND          (1<<3)
> -#define DT_S_COMPOSITE_ERROR  (1<<7)
> +#define DT_S_DATA_OUT_READY   BIT(0)
> +#define DT_S_DATA_IN_FULL     BIT(1)
> +#define DT_S_READY            BIT(2)
> +#define DT_S_COMMAND          BIT(3)
> +#define DT_S_COMPOSITE_ERROR  BIT(7)
>
>   /* registers */
>   #define DT2801_DATA		0
> --
> 2.1.4
>

Thanks!

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

      reply	other threads:[~2016-01-11 17:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 16:04 [PATCH] staging: comedi: dt2801: Prefer using the BIT macro Bhaktipriya Shridhar
2016-01-11 17:31 ` Ian Abbott [this message]

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=5693E70D.7090909@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=bhaktipriya96@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahfouz.saif.elyazal@gmail.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