Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1240137 > unrolled thread
| Started by | Ronit Halder <ronit.crj@gmail.com> |
|---|---|
| First post | 2015-10-06 05:20 +0200 |
| Last post | 2015-10-06 10:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] Staging: fbtft: Use BIT macro Ronit Halder <ronit.crj@gmail.com> - 2015-10-06 05:20 +0200
Re: [PATCH] Staging: fbtft: Use BIT macro Michał Kępień <kernel@kempniu.pl> - 2015-10-06 10:10 +0200
| From | Ronit Halder <ronit.crj@gmail.com> |
|---|---|
| Date | 2015-10-06 05:20 +0200 |
| Subject | [PATCH] Staging: fbtft: Use BIT macro |
| Message-ID | <qgqXf-27p-3@gated-at.bofh.it> |
Replace (1 << x) by BIT(x)
Signed-off-by: Ronit halder <ronit.crj@gmail.com>
---
drivers/staging/fbtft/fb_ssd1351.c | 4 +--
drivers/staging/fbtft/fbtft.h | 56 +++++++++++++++++++-------------------
2 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ssd1351.c b/drivers/staging/fbtft/fb_ssd1351.c
index eb45b27..28cc5d9 100644
--- a/drivers/staging/fbtft/fb_ssd1351.c
+++ b/drivers/staging/fbtft/fb_ssd1351.c
@@ -80,10 +80,10 @@ static int set_var(struct fbtft_par *par)
switch (par->info->var.rotate) {
case 0:
- write_reg(par, 0xA0, remap | 0x00 | 1<<4);
+ write_reg(par, 0xA0, remap | 0x00 | BIT(4));
break;
case 270:
- write_reg(par, 0xA0, remap | 0x03 | 1<<4);
+ write_reg(par, 0xA0, remap | 0x03 | BIT(4));
break;
case 180:
write_reg(par, 0xA0, remap | 0x02);
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 6dd42b2..375af6b 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -374,39 +374,39 @@ module_exit(fbtft_driver_module_exit);
#define DEBUG_LEVEL_6 (DEBUG_LEVEL_4 | DEBUG_LEVEL_5)
#define DEBUG_LEVEL_7 0xFFFFFFFF
-#define DEBUG_DRIVER_INIT_FUNCTIONS (1<<3)
-#define DEBUG_TIME_FIRST_UPDATE (1<<4)
-#define DEBUG_TIME_EACH_UPDATE (1<<5)
-#define DEBUG_DEFERRED_IO (1<<6)
-#define DEBUG_FBTFT_INIT_FUNCTIONS (1<<7)
+#define DEBUG_DRIVER_INIT_FUNCTIONS BIT(3)
+#define DEBUG_TIME_FIRST_UPDATE BIT(4)
+#define DEBUG_TIME_EACH_UPDATE BIT(5)
+#define DEBUG_DEFERRED_IO BIT(6)
+#define DEBUG_FBTFT_INIT_FUNCTIONS BIT(7)
/* fbops */
-#define DEBUG_FB_READ (1<<8)
-#define DEBUG_FB_WRITE (1<<9)
-#define DEBUG_FB_FILLRECT (1<<10)
-#define DEBUG_FB_COPYAREA (1<<11)
-#define DEBUG_FB_IMAGEBLIT (1<<12)
-#define DEBUG_FB_SETCOLREG (1<<13)
-#define DEBUG_FB_BLANK (1<<14)
+#define DEBUG_FB_READ BIT(8)
+#define DEBUG_FB_WRITE BIT(9)
+#define DEBUG_FB_FILLRECT BIT(10)
+#define DEBUG_FB_COPYAREA BIT(11)
+#define DEBUG_FB_IMAGEBLIT BIT(12)
+#define DEBUG_FB_SETCOLREG BIT(13)
+#define DEBUG_FB_BLANK BIT(14)
-#define DEBUG_SYSFS (1<<16)
+#define DEBUG_SYSFS BIT(16)
/* fbtftops */
-#define DEBUG_BACKLIGHT (1<<17)
-#define DEBUG_READ (1<<18)
-#define DEBUG_WRITE (1<<19)
-#define DEBUG_WRITE_VMEM (1<<20)
-#define DEBUG_WRITE_REGISTER (1<<21)
-#define DEBUG_SET_ADDR_WIN (1<<22)
-#define DEBUG_RESET (1<<23)
-#define DEBUG_MKDIRTY (1<<24)
-#define DEBUG_UPDATE_DISPLAY (1<<25)
-#define DEBUG_INIT_DISPLAY (1<<26)
-#define DEBUG_BLANK (1<<27)
-#define DEBUG_REQUEST_GPIOS (1<<28)
-#define DEBUG_FREE_GPIOS (1<<29)
-#define DEBUG_REQUEST_GPIOS_MATCH (1<<30)
-#define DEBUG_VERIFY_GPIOS (1<<31)
+#define DEBUG_BACKLIGHT BIT(17)
+#define DEBUG_READ BIT(18)
+#define DEBUG_WRITE BIT(19)
+#define DEBUG_WRITE_VMEM BIT(20)
+#define DEBUG_WRITE_REGISTER BIT(21)
+#define DEBUG_SET_ADDR_WIN BIT(22)
+#define DEBUG_RESET BIT(23)
+#define DEBUG_MKDIRTY BIT(24)
+#define DEBUG_UPDATE_DISPLAY BIT(25)
+#define DEBUG_INIT_DISPLAY BIT(26)
+#define DEBUG_BLANK BIT(27)
+#define DEBUG_REQUEST_GPIOS BIT(28)
+#define DEBUG_FREE_GPIOS BIT(29)
+#define DEBUG_REQUEST_GPIOS_MATCH BIT(30)
+#define DEBUG_VERIFY_GPIOS BIT(31)
#define fbtft_init_dbg(dev, format, arg...) \
do { \
--
2.6.0
--
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 | Michał Kępień <kernel@kempniu.pl> |
|---|---|
| Date | 2015-10-06 10:10 +0200 |
| Message-ID | <qgvtV-iV-27@gated-at.bofh.it> |
| In reply to | #1240137 |
> Replace (1 << x) by BIT(x) > > Signed-off-by: Ronit halder <ronit.crj@gmail.com> Minor nit: you stopped capitalizing your surname in your SoBs sometime between Jul 10 and Aug 19 (judging from a quick peek at git log). > diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h > index 6dd42b2..375af6b 100644 > --- a/drivers/staging/fbtft/fbtft.h > +++ b/drivers/staging/fbtft/fbtft.h > @@ -374,39 +374,39 @@ module_exit(fbtft_driver_module_exit); > #define DEBUG_LEVEL_6 (DEBUG_LEVEL_4 | DEBUG_LEVEL_5) > #define DEBUG_LEVEL_7 0xFFFFFFFF > > -#define DEBUG_DRIVER_INIT_FUNCTIONS (1<<3) > -#define DEBUG_TIME_FIRST_UPDATE (1<<4) > -#define DEBUG_TIME_EACH_UPDATE (1<<5) > -#define DEBUG_DEFERRED_IO (1<<6) > -#define DEBUG_FBTFT_INIT_FUNCTIONS (1<<7) > +#define DEBUG_DRIVER_INIT_FUNCTIONS BIT(3) > +#define DEBUG_TIME_FIRST_UPDATE BIT(4) > +#define DEBUG_TIME_EACH_UPDATE BIT(5) > +#define DEBUG_DEFERRED_IO BIT(6) You put one tab too much in here. > +#define DEBUG_FBTFT_INIT_FUNCTIONS BIT(7) > > /* fbops */ > -#define DEBUG_FB_READ (1<<8) > -#define DEBUG_FB_WRITE (1<<9) > -#define DEBUG_FB_FILLRECT (1<<10) > -#define DEBUG_FB_COPYAREA (1<<11) > -#define DEBUG_FB_IMAGEBLIT (1<<12) > -#define DEBUG_FB_SETCOLREG (1<<13) > -#define DEBUG_FB_BLANK (1<<14) > +#define DEBUG_FB_READ BIT(8) > +#define DEBUG_FB_WRITE BIT(9) > +#define DEBUG_FB_FILLRECT BIT(10) > +#define DEBUG_FB_COPYAREA BIT(11) > +#define DEBUG_FB_IMAGEBLIT BIT(12) > +#define DEBUG_FB_SETCOLREG BIT(13) > +#define DEBUG_FB_BLANK BIT(14) > > -#define DEBUG_SYSFS (1<<16) > +#define DEBUG_SYSFS BIT(16) > > /* fbtftops */ > -#define DEBUG_BACKLIGHT (1<<17) > -#define DEBUG_READ (1<<18) > -#define DEBUG_WRITE (1<<19) > -#define DEBUG_WRITE_VMEM (1<<20) > -#define DEBUG_WRITE_REGISTER (1<<21) > -#define DEBUG_SET_ADDR_WIN (1<<22) > -#define DEBUG_RESET (1<<23) > -#define DEBUG_MKDIRTY (1<<24) > -#define DEBUG_UPDATE_DISPLAY (1<<25) > -#define DEBUG_INIT_DISPLAY (1<<26) > -#define DEBUG_BLANK (1<<27) > -#define DEBUG_REQUEST_GPIOS (1<<28) > -#define DEBUG_FREE_GPIOS (1<<29) > -#define DEBUG_REQUEST_GPIOS_MATCH (1<<30) > -#define DEBUG_VERIFY_GPIOS (1<<31) > +#define DEBUG_BACKLIGHT BIT(17) > +#define DEBUG_READ BIT(18) > +#define DEBUG_WRITE BIT(19) > +#define DEBUG_WRITE_VMEM BIT(20) > +#define DEBUG_WRITE_REGISTER BIT(21) > +#define DEBUG_SET_ADDR_WIN BIT(22) > +#define DEBUG_RESET BIT(23) > +#define DEBUG_MKDIRTY BIT(24) > +#define DEBUG_UPDATE_DISPLAY BIT(25) > +#define DEBUG_INIT_DISPLAY BIT(26) > +#define DEBUG_BLANK BIT(27) > +#define DEBUG_REQUEST_GPIOS BIT(28) > +#define DEBUG_FREE_GPIOS BIT(29) > +#define DEBUG_REQUEST_GPIOS_MATCH BIT(30) > +#define DEBUG_VERIFY_GPIOS BIT(31) Why did you replace spaces with tabs only in the first hunk of your patch? -- Best regards, Michał Kępień -- 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