Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1267294 > unrolled thread
| Started by | Ranjith Thangavel <ranjithece24@gmail.com> |
|---|---|
| First post | 2015-11-11 17:30 +0100 |
| Last post | 2015-11-12 19:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] comedi: cb_pcidda: Fix coding style - use BIT macro Ranjith Thangavel <ranjithece24@gmail.com> - 2015-11-11 17:30 +0100
Re: [PATCH] comedi: cb_pcidda: Fix coding style - use BIT macro Ian Abbott <abbotti@mev.co.uk> - 2015-11-12 19:10 +0100
Re: [PATCH] comedi: cb_pcidda: Fix coding style - use BIT macro Fabio Estevam <festevam@gmail.com> - 2015-11-12 19:10 +0100
| From | Ranjith Thangavel <ranjithece24@gmail.com> |
|---|---|
| Date | 2015-11-11 17:30 +0100 |
| Subject | [PATCH] comedi: cb_pcidda: Fix coding style - use BIT macro |
| Message-ID | <qtGrx-592-41@gated-at.bofh.it> |
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 */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Ian Abbott <abbotti@mev.co.uk> |
|---|---|
| Date | 2015-11-12 19:10 +0100 |
| Message-ID | <qu4tP-3RE-13@gated-at.bofh.it> |
| In reply to | #1267294 |
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/ )=- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Fabio Estevam <festevam@gmail.com> |
|---|---|
| Date | 2015-11-12 19:10 +0100 |
| Message-ID | <qu4tQ-3RE-25@gated-at.bofh.it> |
| In reply to | #1267294 |
On Wed, Nov 11, 2015 at 2:27 PM, Ranjith Thangavel <ranjithece24@gmail.com> wrote: > BIT macro is used for defining BIT location instead of > shifting operator - coding style issue I would not call it a coding style issue. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web