From: Ian Abbott <abbotti@mev.co.uk>
To: Ranjith Thangavel <ranjithece24@gmail.com>, gregkh@linuxfoundation.org
Cc: hsweeten@visionengravers.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] comedi: cb_pcidda: Fix coding style - use BIT macro
Date: Thu, 12 Nov 2015 18:02:10 +0000 [thread overview]
Message-ID: <5644D422.7090601@mev.co.uk> (raw)
In-Reply-To: <1447259271-14326-1-git-send-email-ranjithece24@gmail.com>
On 11/11/15 16:27, Ranjith Thangavel wrote:
> BIT macro is used for defining BIT location instead of
> shifting operator - coding style issue
>
> Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
> ---
> drivers/staging/comedi/drivers/cb_pcidda.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
> index b00a36a..ccb37d1 100644
> --- a/drivers/staging/comedi/drivers/cb_pcidda.c
> +++ b/drivers/staging/comedi/drivers/cb_pcidda.c
> @@ -51,13 +51,13 @@
>
> /* DAC registers */
> #define CB_DDA_DA_CTRL_REG 0x00 /* D/A Control Register */
> -#define CB_DDA_DA_CTRL_SU (1 << 0) /* Simultaneous update */
> -#define CB_DDA_DA_CTRL_EN (1 << 1) /* Enable specified DAC */
> +#define CB_DDA_DA_CTRL_SU BIT(0) /* Simultaneous update */
> +#define CB_DDA_DA_CTRL_EN BIT(1) /* Enable specified DAC */
> #define CB_DDA_DA_CTRL_DAC(x) ((x) << 2) /* Specify DAC channel */
> #define CB_DDA_DA_CTRL_RANGE2V5 (0 << 6) /* 2.5V range */
> #define CB_DDA_DA_CTRL_RANGE5V (2 << 6) /* 5V range */
> #define CB_DDA_DA_CTRL_RANGE10V (3 << 6) /* 10V range */
> -#define CB_DDA_DA_CTRL_UNIP (1 << 8) /* Unipolar range */
> +#define CB_DDA_DA_CTRL_UNIP BIT(8) /* Unipolar range */
>
> #define DACALIBRATION1 4 /* D/A CALIBRATION REGISTER 1 */
> /* write bits */
>
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/ )=-
next prev parent reply other threads:[~2015-11-12 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 16:27 Ranjith Thangavel
2015-11-12 18:02 ` Ian Abbott [this message]
2015-11-12 18:09 ` Fabio Estevam
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=5644D422.7090601@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ranjithece24@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
Powered by JetHome