* [PATCH] staging: sm750fb: Remove typedef
@ 2018-03-15 17:37 Nishka Dasgupta
2018-03-15 17:49 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Nishka Dasgupta @ 2018-03-15 17:37 UTC (permalink / raw)
To: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel; +Cc: Nishka Dasgupta
Change typedef enum to enum and ensure compatibility with the change.
Issue found with checkpatch.
Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
---
Changes in v2:
- Remove leading _ of affected variable declarations.
- Make commit message clearer.
drivers/staging/sm750fb/ddk750_display.c | 2 +-
drivers/staging/sm750fb/ddk750_display.h | 4 ++--
drivers/staging/sm750fb/sm750_hw.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index 7710454..1273e7d 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -111,7 +111,7 @@ static void swPanelPowerSequence(int disp, int delay)
primary_wait_vertical_sync(delay);
}
-void ddk750_setLogicalDispOut(enum _disp_output output)
+void ddk750_setLogicalDispOut(enum disp_output output)
{
unsigned int reg;
diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
index 3eeb02f..7fd101d 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -89,7 +89,7 @@
* LCD1 means panel path TFT1 & panel path DVI (so enable DAC)
* CRT means crt path DSUB
*/
-enum _disp_output {
+enum disp_output {
do_LCD1_PRI = PNL_2_PRI | PRI_TP_ON | PNL_SEQ_ON | DAC_ON,
do_LCD1_SEC = PNL_2_SEC | SEC_TP_ON | PNL_SEQ_ON | DAC_ON,
do_LCD2_PRI = CRT_2_PRI | PRI_TP_ON | DUAL_TFT_ON,
@@ -102,6 +102,6 @@ enum _disp_output {
do_CRT_SEC = CRT_2_SEC | SEC_TP_ON | DPMS_ON | DAC_ON,
};
-void ddk750_setLogicalDispOut(enum _disp_output output);
+void ddk750_setLogicalDispOut(enum disp_output output);
#endif
diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index 3248f88..edeae9d 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -185,7 +185,7 @@ int hw_sm750_output_setMode(struct lynxfb_output *output,
struct fb_fix_screeninfo *fix)
{
int ret;
- enum _disp_output disp_set;
+ enum disp_output disp_set;
int channel;
ret = 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Remove typedef
2018-03-15 17:37 [PATCH] staging: sm750fb: Remove typedef Nishka Dasgupta
@ 2018-03-15 17:49 ` Julia Lawall
2018-03-15 18:01 ` Nishka Dasgupta
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2018-03-15 17:49 UTC (permalink / raw)
To: Nishka Dasgupta; +Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel
On Thu, 15 Mar 2018, Nishka Dasgupta wrote:
> Change typedef enum to enum and ensure compatibility with the change.
> Issue found with checkpatch.
I think that this patch is on top of your previous patch. You need to
undo your previous patch and make a new one on top of Greg's tree.
julia
>
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
> ---
> Changes in v2:
> - Remove leading _ of affected variable declarations.
> - Make commit message clearer.
>
> drivers/staging/sm750fb/ddk750_display.c | 2 +-
> drivers/staging/sm750fb/ddk750_display.h | 4 ++--
> drivers/staging/sm750fb/sm750_hw.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
> index 7710454..1273e7d 100644
> --- a/drivers/staging/sm750fb/ddk750_display.c
> +++ b/drivers/staging/sm750fb/ddk750_display.c
> @@ -111,7 +111,7 @@ static void swPanelPowerSequence(int disp, int delay)
> primary_wait_vertical_sync(delay);
> }
>
> -void ddk750_setLogicalDispOut(enum _disp_output output)
> +void ddk750_setLogicalDispOut(enum disp_output output)
> {
> unsigned int reg;
>
> diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
> index 3eeb02f..7fd101d 100644
> --- a/drivers/staging/sm750fb/ddk750_display.h
> +++ b/drivers/staging/sm750fb/ddk750_display.h
> @@ -89,7 +89,7 @@
> * LCD1 means panel path TFT1 & panel path DVI (so enable DAC)
> * CRT means crt path DSUB
> */
> -enum _disp_output {
> +enum disp_output {
> do_LCD1_PRI = PNL_2_PRI | PRI_TP_ON | PNL_SEQ_ON | DAC_ON,
> do_LCD1_SEC = PNL_2_SEC | SEC_TP_ON | PNL_SEQ_ON | DAC_ON,
> do_LCD2_PRI = CRT_2_PRI | PRI_TP_ON | DUAL_TFT_ON,
> @@ -102,6 +102,6 @@ enum _disp_output {
> do_CRT_SEC = CRT_2_SEC | SEC_TP_ON | DPMS_ON | DAC_ON,
> };
>
> -void ddk750_setLogicalDispOut(enum _disp_output output);
> +void ddk750_setLogicalDispOut(enum disp_output output);
>
> #endif
> diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
> index 3248f88..edeae9d 100644
> --- a/drivers/staging/sm750fb/sm750_hw.c
> +++ b/drivers/staging/sm750fb/sm750_hw.c
> @@ -185,7 +185,7 @@ int hw_sm750_output_setMode(struct lynxfb_output *output,
> struct fb_fix_screeninfo *fix)
> {
> int ret;
> - enum _disp_output disp_set;
> + enum disp_output disp_set;
> int channel;
>
> ret = 0;
> --
> 2.7.4
>
> --
> 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/1521135477-2802-1-git-send-email-nishka.dasgupta_ug18%40ashoka.edu.in.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Remove typedef
2018-03-15 17:49 ` [Outreachy kernel] " Julia Lawall
@ 2018-03-15 18:01 ` Nishka Dasgupta
0 siblings, 0 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2018-03-15 18:01 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel
On Thu, Mar 15, 2018 at 11:19 PM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Thu, 15 Mar 2018, Nishka Dasgupta wrote:
>
>> Change typedef enum to enum and ensure compatibility with the change.
>> Issue found with checkpatch.
>
> I think that this patch is on top of your previous patch. You need to
> undo your previous patch and make a new one on top of Greg's tree.
Thank you for pointing that out! I have done that.
> julia
>
>
>>
>> Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
>> ---
>> Changes in v2:
>> - Remove leading _ of affected variable declarations.
>> - Make commit message clearer.
>>
>> drivers/staging/sm750fb/ddk750_display.c | 2 +-
>> drivers/staging/sm750fb/ddk750_display.h | 4 ++--
>> drivers/staging/sm750fb/sm750_hw.c | 2 +-
>> 3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
>> index 7710454..1273e7d 100644
>> --- a/drivers/staging/sm750fb/ddk750_display.c
>> +++ b/drivers/staging/sm750fb/ddk750_display.c
>> @@ -111,7 +111,7 @@ static void swPanelPowerSequence(int disp, int delay)
>> primary_wait_vertical_sync(delay);
>> }
>>
>> -void ddk750_setLogicalDispOut(enum _disp_output output)
>> +void ddk750_setLogicalDispOut(enum disp_output output)
>> {
>> unsigned int reg;
>>
>> diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
>> index 3eeb02f..7fd101d 100644
>> --- a/drivers/staging/sm750fb/ddk750_display.h
>> +++ b/drivers/staging/sm750fb/ddk750_display.h
>> @@ -89,7 +89,7 @@
>> * LCD1 means panel path TFT1 & panel path DVI (so enable DAC)
>> * CRT means crt path DSUB
>> */
>> -enum _disp_output {
>> +enum disp_output {
>> do_LCD1_PRI = PNL_2_PRI | PRI_TP_ON | PNL_SEQ_ON | DAC_ON,
>> do_LCD1_SEC = PNL_2_SEC | SEC_TP_ON | PNL_SEQ_ON | DAC_ON,
>> do_LCD2_PRI = CRT_2_PRI | PRI_TP_ON | DUAL_TFT_ON,
>> @@ -102,6 +102,6 @@ enum _disp_output {
>> do_CRT_SEC = CRT_2_SEC | SEC_TP_ON | DPMS_ON | DAC_ON,
>> };
>>
>> -void ddk750_setLogicalDispOut(enum _disp_output output);
>> +void ddk750_setLogicalDispOut(enum disp_output output);
>>
>> #endif
>> diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
>> index 3248f88..edeae9d 100644
>> --- a/drivers/staging/sm750fb/sm750_hw.c
>> +++ b/drivers/staging/sm750fb/sm750_hw.c
>> @@ -185,7 +185,7 @@ int hw_sm750_output_setMode(struct lynxfb_output *output,
>> struct fb_fix_screeninfo *fix)
>> {
>> int ret;
>> - enum _disp_output disp_set;
>> + enum disp_output disp_set;
>> int channel;
>>
>> ret = 0;
>> --
>> 2.7.4
>>
>> --
>> 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/1521135477-2802-1-git-send-email-nishka.dasgupta_ug18%40ashoka.edu.in.
>> For more options, visit https://groups.google.com/d/optout.
>>
Regards,
Nishka Dasgupta
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: sm750fb: Remove typedef
2018-03-14 18:49 Nishka Dasgupta
@ 2018-03-14 21:16 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2018-03-14 21:16 UTC (permalink / raw)
To: Nishka Dasgupta; +Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel
On Wed, 14 Mar 2018, Nishka Dasgupta wrote:
> Change typedef enum to enum and add backward compatibility. Issue found
> with checkpatch.
I'm not sure to understand what you mean by backward compatibility.
In the resulting code, it would be better to remove the _ in front of the
enum name. That suggests that it is something hidden, which was the case
but is no longer.
julia
>
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
> ---
> drivers/staging/sm750fb/ddk750_display.c | 2 +-
> drivers/staging/sm750fb/ddk750_display.h | 7 +++----
> drivers/staging/sm750fb/sm750_hw.c | 2 +-
> 3 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
> index c6fd901..7710454 100644
> --- a/drivers/staging/sm750fb/ddk750_display.c
> +++ b/drivers/staging/sm750fb/ddk750_display.c
> @@ -111,7 +111,7 @@ static void swPanelPowerSequence(int disp, int delay)
> primary_wait_vertical_sync(delay);
> }
>
> -void ddk750_setLogicalDispOut(disp_output_t output)
> +void ddk750_setLogicalDispOut(enum _disp_output output)
> {
> unsigned int reg;
>
> diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
> index 523bbf3..3eeb02f 100644
> --- a/drivers/staging/sm750fb/ddk750_display.h
> +++ b/drivers/staging/sm750fb/ddk750_display.h
> @@ -89,7 +89,7 @@
> * LCD1 means panel path TFT1 & panel path DVI (so enable DAC)
> * CRT means crt path DSUB
> */
> -typedef enum _disp_output_t {
> +enum _disp_output {
> do_LCD1_PRI = PNL_2_PRI | PRI_TP_ON | PNL_SEQ_ON | DAC_ON,
> do_LCD1_SEC = PNL_2_SEC | SEC_TP_ON | PNL_SEQ_ON | DAC_ON,
> do_LCD2_PRI = CRT_2_PRI | PRI_TP_ON | DUAL_TFT_ON,
> @@ -100,9 +100,8 @@ typedef enum _disp_output_t {
> */
> do_CRT_PRI = CRT_2_PRI | PRI_TP_ON | DPMS_ON | DAC_ON,
> do_CRT_SEC = CRT_2_SEC | SEC_TP_ON | DPMS_ON | DAC_ON,
> -}
> -disp_output_t;
> +};
>
> -void ddk750_setLogicalDispOut(disp_output_t output);
> +void ddk750_setLogicalDispOut(enum _disp_output output);
>
> #endif
> diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
> index f996f84..3248f88 100644
> --- a/drivers/staging/sm750fb/sm750_hw.c
> +++ b/drivers/staging/sm750fb/sm750_hw.c
> @@ -185,7 +185,7 @@ int hw_sm750_output_setMode(struct lynxfb_output *output,
> struct fb_fix_screeninfo *fix)
> {
> int ret;
> - disp_output_t disp_set;
> + enum _disp_output disp_set;
> int channel;
>
> ret = 0;
> --
> 2.7.4
>
> --
> 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/1521053377-28914-1-git-send-email-nishka.dasgupta_ug18%40ashoka.edu.in.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-15 18:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 17:37 [PATCH] staging: sm750fb: Remove typedef Nishka Dasgupta
2018-03-15 17:49 ` [Outreachy kernel] " Julia Lawall
2018-03-15 18:01 ` Nishka Dasgupta
-- strict thread matches above, loose matches on Subject: below --
2018-03-14 18:49 Nishka Dasgupta
2018-03-14 21:16 ` [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.