All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: fbtft: Prefer using the BIT macro
@ 2018-10-04 12:14 Mamta Shukla
  2018-10-04 16:53 ` [Outreachy kernel] " Shraddha Barke
  0 siblings, 1 reply; 3+ messages in thread
From: Mamta Shukla @ 2018-10-04 12:14 UTC (permalink / raw)
  To: outreachy-kernel

Replace all occurrences of (1<<x) with BIT(x) to fix checkpatch issue.
CHECK:Prefer using the BIT macro

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>

---
change in v2:

'Replace' in place of 'Replacing'.


 drivers/staging/fbtft/fbtft.h | 56 +++++++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 25302ff..ac427ba 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -355,39 +355,39 @@ static void __exit fbtft_driver_module_exit(void)                          \
 #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 {                                                         \
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Outreachy kernel] [PATCH v2] staging: fbtft: Prefer using the BIT macro
  2018-10-04 12:14 [PATCH v2] staging: fbtft: Prefer using the BIT macro Mamta Shukla
@ 2018-10-04 16:53 ` Shraddha Barke
  0 siblings, 0 replies; 3+ messages in thread
From: Shraddha Barke @ 2018-10-04 16:53 UTC (permalink / raw)
  To: mamtashukla555; +Cc: outreachy-kernel

[-- Attachment #1: Type: text/plain, Size: 4397 bytes --]

On Thu, Oct 4, 2018 at 5:24 AM Mamta Shukla <mamtashukla555@gmail.com>
wrote:

> Replace all occurrences of (1<<x) with BIT(x) to fix checkpatch issue.
> CHECK:Prefer using the BIT macro
>
> Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
>
> ---
> change in v2:
>
> 'Replace' in place of 'Replacing'.
>
>
Hello Mamta,

I think this patch should've been a v3 since now you've sent 2 v2 patches.
You can add different version changes like so:

---
Changes in v3:
- Fixed Changelog
Changes in v2:
 - 'Replace' in place of 'Replacing'.


>  drivers/staging/fbtft/fbtft.h | 56
> +++++++++++++++++++++----------------------
>  1 file changed, 28 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> index 25302ff..ac427ba 100644
> --- a/drivers/staging/fbtft/fbtft.h
> +++ b/drivers/staging/fbtft/fbtft.h
> @@ -355,39 +355,39 @@ static void __exit fbtft_driver_module_exit(void)
>                       \
>  #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 {                                                         \
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/20181004121447.GA9212%40armorer
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Shraddha

[-- Attachment #2: Type: text/html, Size: 6381 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] staging: fbtft: Prefer using the BIT macro
@ 2018-10-04 11:35 Mamta Shukla
  0 siblings, 0 replies; 3+ messages in thread
From: Mamta Shukla @ 2018-10-04 11:35 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: mamtashukla555

Replace all occurrences of (1<<x) with BIT(x) to fix checkpatch issue.
CHECK:Prefer using the BIT macro

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>

change in v2:

  'Replace' in place of 'Replacing'.
---
 drivers/staging/fbtft/fbtft.h | 56 +++++++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 25302ff..ac427ba 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -355,39 +355,39 @@ static void __exit fbtft_driver_module_exit(void)                          \
 #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 {                                                         \
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-04 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 12:14 [PATCH v2] staging: fbtft: Prefer using the BIT macro Mamta Shukla
2018-10-04 16:53 ` [Outreachy kernel] " Shraddha Barke
  -- strict thread matches above, loose matches on Subject: below --
2018-10-04 11:35 Mamta Shukla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.