* [PATCH] staging: olpc_dcon: Prefer using the BIT macro
@ 2016-09-15 15:11 Anchal Jain
2016-09-15 15:37 ` Greg KH
2016-09-15 19:12 ` [Outreachy kernel] " Julia Lawall
0 siblings, 2 replies; 3+ messages in thread
From: Anchal Jain @ 2016-09-15 15:11 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, jon.nettleton
Replace all occurences of (1<<x) by BIT(x) in the file olpc_dcon.h to get rid
of checkpatch.pl "CHECK" output "Prefer using the BIT macro"
Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
drivers/staging/olpc_dcon/olpc_dcon.h | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.h b/drivers/staging/olpc_dcon/olpc_dcon.h
index 215e7ec..23a48a1 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.h
+++ b/drivers/staging/olpc_dcon/olpc_dcon.h
@@ -9,18 +9,18 @@
#define DCON_REG_ID 0
#define DCON_REG_MODE 1
-#define MODE_PASSTHRU (1<<0)
-#define MODE_SLEEP (1<<1)
-#define MODE_SLEEP_AUTO (1<<2)
-#define MODE_BL_ENABLE (1<<3)
-#define MODE_BLANK (1<<4)
-#define MODE_CSWIZZLE (1<<5)
-#define MODE_COL_AA (1<<6)
-#define MODE_MONO_LUMA (1<<7)
-#define MODE_SCAN_INT (1<<8)
-#define MODE_CLOCKDIV (1<<9)
-#define MODE_DEBUG (1<<14)
-#define MODE_SELFTEST (1<<15)
+#define MODE_PASSTHRU bit(0)
+#define MODE_SLEEP bit(1)
+#define MODE_SLEEP_AUTO bit(2)
+#define MODE_BL_ENABLE bit(3)
+#define MODE_BLANK bit(4)
+#define MODE_CSWIZZLE bit(5)
+#define MODE_COL_AA bit(6)
+#define MODE_MONO_LUMA bit(7)
+#define MODE_SCAN_INT bit(8)
+#define MODE_CLOCKDIV bit(9)
+#define MODE_DEBUG bit(14)
+#define MODE_SELFTEST bit(15)
#define DCON_REG_HRES 0x2
#define DCON_REG_HTOTAL 0x3
@@ -35,11 +35,11 @@
#define DCON_REG_MEM_OPT_B 0x42
/* Load Delay Locked Loop (DLL) settings for clock delay */
-#define MEM_DLL_CLOCK_DELAY (1<<0)
+#define MEM_DLL_CLOCK_DELAY bit(0)
/* Memory controller power down function */
-#define MEM_POWER_DOWN (1<<8)
+#define MEM_POWER_DOWN bit(8)
/* Memory controller software reset */
-#define MEM_SOFT_RESET (1<<0)
+#define MEM_SOFT_RESET bit(0)
/* Status values */
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: olpc_dcon: Prefer using the BIT macro
2016-09-15 15:11 [PATCH] staging: olpc_dcon: Prefer using the BIT macro Anchal Jain
@ 2016-09-15 15:37 ` Greg KH
2016-09-15 19:12 ` [Outreachy kernel] " Julia Lawall
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-09-15 15:37 UTC (permalink / raw)
To: Anchal Jain; +Cc: outreachy-kernel, jon.nettleton
On Thu, Sep 15, 2016 at 08:41:58PM +0530, Anchal Jain wrote:
> Replace all occurences of (1<<x) by BIT(x) in the file olpc_dcon.h to get rid
> of checkpatch.pl "CHECK" output "Prefer using the BIT macro"
>
>
> Signed-off-by: Anchal Jain <anchalj109@gmail.com>
> ---
> drivers/staging/olpc_dcon/olpc_dcon.h | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/staging/olpc_dcon/olpc_dcon.h b/drivers/staging/olpc_dcon/olpc_dcon.h
> index 215e7ec..23a48a1 100644
> --- a/drivers/staging/olpc_dcon/olpc_dcon.h
> +++ b/drivers/staging/olpc_dcon/olpc_dcon.h
> @@ -9,18 +9,18 @@
> #define DCON_REG_ID 0
> #define DCON_REG_MODE 1
>
> -#define MODE_PASSTHRU (1<<0)
> -#define MODE_SLEEP (1<<1)
> -#define MODE_SLEEP_AUTO (1<<2)
> -#define MODE_BL_ENABLE (1<<3)
> -#define MODE_BLANK (1<<4)
> -#define MODE_CSWIZZLE (1<<5)
> -#define MODE_COL_AA (1<<6)
> -#define MODE_MONO_LUMA (1<<7)
> -#define MODE_SCAN_INT (1<<8)
> -#define MODE_CLOCKDIV (1<<9)
> -#define MODE_DEBUG (1<<14)
> -#define MODE_SELFTEST (1<<15)
> +#define MODE_PASSTHRU bit(0)
> +#define MODE_SLEEP bit(1)
> +#define MODE_SLEEP_AUTO bit(2)
> +#define MODE_BL_ENABLE bit(3)
> +#define MODE_BLANK bit(4)
> +#define MODE_CSWIZZLE bit(5)
> +#define MODE_COL_AA bit(6)
> +#define MODE_MONO_LUMA bit(7)
> +#define MODE_SCAN_INT bit(8)
> +#define MODE_CLOCKDIV bit(9)
> +#define MODE_DEBUG bit(14)
> +#define MODE_SELFTEST bit(15)
did you build this patch?
Please do so before sending in changes, it will save everyone a lot of
time :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: olpc_dcon: Prefer using the BIT macro
2016-09-15 15:11 [PATCH] staging: olpc_dcon: Prefer using the BIT macro Anchal Jain
2016-09-15 15:37 ` Greg KH
@ 2016-09-15 19:12 ` Julia Lawall
1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2016-09-15 19:12 UTC (permalink / raw)
To: Anchal Jain; +Cc: outreachy-kernel, gregkh, jon.nettleton
The subject should say what you have done, not give the checkpatch
message. Here what you have done is replace a bit shift by a use of BIT.
On Thu, 15 Sep 2016, Anchal Jain wrote:
> Replace all occurences of (1<<x) by BIT(x) in the file olpc_dcon.h to get rid
> of checkpatch.pl "CHECK" output "Prefer using the BIT macro"
The macro is BIT, not bit.
julia
>
>
> Signed-off-by: Anchal Jain <anchalj109@gmail.com>
> ---
> drivers/staging/olpc_dcon/olpc_dcon.h | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/staging/olpc_dcon/olpc_dcon.h b/drivers/staging/olpc_dcon/olpc_dcon.h
> index 215e7ec..23a48a1 100644
> --- a/drivers/staging/olpc_dcon/olpc_dcon.h
> +++ b/drivers/staging/olpc_dcon/olpc_dcon.h
> @@ -9,18 +9,18 @@
> #define DCON_REG_ID 0
> #define DCON_REG_MODE 1
>
> -#define MODE_PASSTHRU (1<<0)
> -#define MODE_SLEEP (1<<1)
> -#define MODE_SLEEP_AUTO (1<<2)
> -#define MODE_BL_ENABLE (1<<3)
> -#define MODE_BLANK (1<<4)
> -#define MODE_CSWIZZLE (1<<5)
> -#define MODE_COL_AA (1<<6)
> -#define MODE_MONO_LUMA (1<<7)
> -#define MODE_SCAN_INT (1<<8)
> -#define MODE_CLOCKDIV (1<<9)
> -#define MODE_DEBUG (1<<14)
> -#define MODE_SELFTEST (1<<15)
> +#define MODE_PASSTHRU bit(0)
> +#define MODE_SLEEP bit(1)
> +#define MODE_SLEEP_AUTO bit(2)
> +#define MODE_BL_ENABLE bit(3)
> +#define MODE_BLANK bit(4)
> +#define MODE_CSWIZZLE bit(5)
> +#define MODE_COL_AA bit(6)
> +#define MODE_MONO_LUMA bit(7)
> +#define MODE_SCAN_INT bit(8)
> +#define MODE_CLOCKDIV bit(9)
> +#define MODE_DEBUG bit(14)
> +#define MODE_SELFTEST bit(15)
>
> #define DCON_REG_HRES 0x2
> #define DCON_REG_HTOTAL 0x3
> @@ -35,11 +35,11 @@
> #define DCON_REG_MEM_OPT_B 0x42
>
> /* Load Delay Locked Loop (DLL) settings for clock delay */
> -#define MEM_DLL_CLOCK_DELAY (1<<0)
> +#define MEM_DLL_CLOCK_DELAY bit(0)
> /* Memory controller power down function */
> -#define MEM_POWER_DOWN (1<<8)
> +#define MEM_POWER_DOWN bit(8)
> /* Memory controller software reset */
> -#define MEM_SOFT_RESET (1<<0)
> +#define MEM_SOFT_RESET bit(0)
>
> /* Status values */
>
> --
> 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/20160915151150.GA6172%40life-desktop.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-15 19:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 15:11 [PATCH] staging: olpc_dcon: Prefer using the BIT macro Anchal Jain
2016-09-15 15:37 ` Greg KH
2016-09-15 19:12 ` [Outreachy kernel] " Julia Lawall
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.