public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: sm750: Rename camel case functions in sm750_cursor.*
@ 2023-03-10 21:33 Kloudifold
  2023-03-10 21:39 ` Julia Lawall
  2023-03-11  1:06 ` kernel test robot
  0 siblings, 2 replies; 8+ messages in thread
From: Kloudifold @ 2023-03-10 21:33 UTC (permalink / raw)
  To: teddy.wang, sudipm.mukherjee, gregkh, linux-staging, outreachy
  Cc: linux-kernel

This patch fixes the "CHECK: Avoid CamelCase" reported by
checkpatch.pl by renaming camel case functions.

Signed-off-by: Kloudifold <cloudifold.3125@gmail.com>
---
 drivers/staging/sm750fb/sm750_cursor.c | 14 +++++++-------
 drivers/staging/sm750fb/sm750_cursor.h | 12 ++++++------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
index 43e6f52c2..ff643e33f 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -58,13 +58,13 @@ void sm750_hw_cursor_disable(struct lynx_cursor *cursor)
 	poke32(HWC_ADDRESS, 0);
 }
 
-void sm750_hw_cursor_setSize(struct lynx_cursor *cursor, int w, int h)
+void sm750_hw_cursor_set_size(struct lynx_cursor *cursor, int w, int h)
 {
 	cursor->w = w;
 	cursor->h = h;
 }
 
-void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)
+void sm750_hw_cursor_set_pos(struct lynx_cursor *cursor, int x, int y)
 {
 	u32 reg;
 
@@ -73,7 +73,7 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)
 	poke32(HWC_LOCATION, reg);
 }
 
-void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)
+void sm750_hw_cursor_set_color(struct lynx_cursor *cursor, u32 fg, u32 bg)
 {
 	u32 reg = (fg << HWC_COLOR_12_2_RGB565_SHIFT) &
 		HWC_COLOR_12_2_RGB565_MASK;
@@ -82,8 +82,8 @@ void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)
 	poke32(HWC_COLOR_3, 0xffe0);
 }
 
-void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
-			     const u8 *pcol, const u8 *pmsk)
+void sm750_hw_cursor_set_data(struct lynx_cursor *cursor, u16 rop,
+			      const u8 *pcol, const u8 *pmsk)
 {
 	int i, j, count, pitch, offset;
 	u8 color, mask, opr;
@@ -132,8 +132,8 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
 	}
 }
 
-void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop,
-			      const u8 *pcol, const u8 *pmsk)
+void sm750_hw_cursor_set_data2(struct lynx_cursor *cursor, u16 rop,
+			       const u8 *pcol, const u8 *pmsk)
 {
 	int i, j, count, pitch, offset;
 	u8 color, mask;
diff --git a/drivers/staging/sm750fb/sm750_cursor.h b/drivers/staging/sm750fb/sm750_cursor.h
index b59643dd6..88fa02f63 100644
--- a/drivers/staging/sm750fb/sm750_cursor.h
+++ b/drivers/staging/sm750fb/sm750_cursor.h
@@ -5,11 +5,11 @@
 /* hw_cursor_xxx works for voyager,718 and 750 */
 void sm750_hw_cursor_enable(struct lynx_cursor *cursor);
 void sm750_hw_cursor_disable(struct lynx_cursor *cursor);
-void sm750_hw_cursor_setSize(struct lynx_cursor *cursor, int w, int h);
-void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y);
-void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg);
-void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
-			     const u8 *data, const u8 *mask);
-void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop,
+void sm750_hw_cursor_set_size(struct lynx_cursor *cursor, int w, int h);
+void sm750_hw_cursor_set_pos(struct lynx_cursor *cursor, int x, int y);
+void sm750_hw_cursor_set_color(struct lynx_cursor *cursor, u32 fg, u32 bg);
+void sm750_hw_cursor_set_data(struct lynx_cursor *cursor, u16 rop,
 			      const u8 *data, const u8 *mask);
+void sm750_hw_cursor_set_data2(struct lynx_cursor *cursor, u16 rop,
+			       const u8 *data, const u8 *mask);
 #endif
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Re: [PATCH] staging: sm750: Rename camel case functions in sm750_cursor.*
@ 2023-03-10 21:47 Kloudifold
  2023-03-10 21:52 ` Julia Lawall
  0 siblings, 1 reply; 8+ messages in thread
From: Kloudifold @ 2023-03-10 21:47 UTC (permalink / raw)
  To: julia.lawall
  Cc: teddy.wang, sudipm.mukherjee, gregkh, linux-staging, outreachy,
	linux-kernel

Thank you for your advice! Should I change this patch and patch message
and resend it?

On Sat, 11 Mar 2023 at 05:39, Julia Lawall <julia.lawall@inria.fr> wrote:
>
> You don't need the filename in the subject.
>
> On Sat, 11 Mar 2023, Kloudifold wrote:
>
> > This patch fixes the "CHECK: Avoid CamelCase" reported by
> > checkpatch.pl by renaming camel case functions.
> >
> > Signed-off-by: Kloudifold <cloudifold.3125@gmail.com>
> > ---
> >  drivers/staging/sm750fb/sm750_cursor.c | 14 +++++++-------
> >  drivers/staging/sm750fb/sm750_cursor.h | 12 ++++++------
> >  2 files changed, 13 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
> > index 43e6f52c2..ff643e33f 100644
> > --- a/drivers/staging/sm750fb/sm750_cursor.c
> > +++ b/drivers/staging/sm750fb/sm750_cursor.c
> > @@ -58,13 +58,13 @@ void sm750_hw_cursor_disable(struct lynx_cursor *cursor)
> >       poke32(HWC_ADDRESS, 0);
> >  }
> >
> > -void sm750_hw_cursor_setSize(struct lynx_cursor *cursor, int w, int h)
> > +void sm750_hw_cursor_set_size(struct lynx_cursor *cursor, int w, int h)
> >  {
> >       cursor->w = w;
> >       cursor->h = h;
> >  }
> >
> > -void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)
> > +void sm750_hw_cursor_set_pos(struct lynx_cursor *cursor, int x, int y)
> >  {
> >       u32 reg;
> >
> > @@ -73,7 +73,7 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)
> >       poke32(HWC_LOCATION, reg);
> >  }
> >
> > -void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)
> > +void sm750_hw_cursor_set_color(struct lynx_cursor *cursor, u32 fg, u32 bg)
> >  {
> >       u32 reg = (fg << HWC_COLOR_12_2_RGB565_SHIFT) &
> >               HWC_COLOR_12_2_RGB565_MASK;
> > @@ -82,8 +82,8 @@ void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)
> >       poke32(HWC_COLOR_3, 0xffe0);
> >  }
> >
> > -void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
> > -                          const u8 *pcol, const u8 *pmsk)
> > +void sm750_hw_cursor_set_data(struct lynx_cursor *cursor, u16 rop,
> > +                           const u8 *pcol, const u8 *pmsk)
>
> The indentation of the second line looks random.  It's not a multiple of
> the tabs, and it doesn't line up with the right side of the (.  So there
> doesn't seem to be any need to change it for this patch.


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [PATCH] staging: sm750: Rename camel case functions in sm750_cursor.*
@ 2023-03-10 22:23 Kloudifold
  2023-03-11  8:53 ` Julia Lawall
  0 siblings, 1 reply; 8+ messages in thread
From: Kloudifold @ 2023-03-10 22:23 UTC (permalink / raw)
  To: Julia Lawall
  Cc: teddy.wang, sudipm.mukherjee, gregkh, linux-staging, outreachy,
	linux-kernel


On Sat, 11 Mar 2023 at 05:39, Julia Lawall <julia.lawall@inria.fr> wrote:
>
> You don't need the filename in the subject.
>
> On Sat, 11 Mar 2023, Kloudifold wrote:
>
> > This patch fixes the "CHECK: Avoid CamelCase" reported by
> > checkpatch.pl by renaming camel case functions.
> >
> > Signed-off-by: Kloudifold <cloudifold.3125@gmail.com>
> > ---
> >  drivers/staging/sm750fb/sm750_cursor.c | 14 +++++++-------
> >  drivers/staging/sm750fb/sm750_cursor.h | 12 ++++++------
> >  2 files changed, 13 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
> > index 43e6f52c2..ff643e33f 100644
> > --- a/drivers/staging/sm750fb/sm750_cursor.c
> > +++ b/drivers/staging/sm750fb/sm750_cursor.c
> > @@ -58,13 +58,13 @@ void sm750_hw_cursor_disable(struct lynx_cursor *cursor)
> >       poke32(HWC_ADDRESS, 0);
> >  }
> >
> > -void sm750_hw_cursor_setSize(struct lynx_cursor *cursor, int w, int h)
> > +void sm750_hw_cursor_set_size(struct lynx_cursor *cursor, int w, int h)
> >  {
> >       cursor->w = w;
> >       cursor->h = h;
> >  }
> >
> > -void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)
> > +void sm750_hw_cursor_set_pos(struct lynx_cursor *cursor, int x, int y)
> >  {
> >       u32 reg;
> >
> > @@ -73,7 +73,7 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)
> >       poke32(HWC_LOCATION, reg);
> >  }
> >
> > -void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)
> > +void sm750_hw_cursor_set_color(struct lynx_cursor *cursor, u32 fg, u32 bg)
> >  {
> >       u32 reg = (fg << HWC_COLOR_12_2_RGB565_SHIFT) &
> >               HWC_COLOR_12_2_RGB565_MASK;
> > @@ -82,8 +82,8 @@ void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)
> >       poke32(HWC_COLOR_3, 0xffe0);
> >  }
> >
> > -void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop,
> > -                          const u8 *pcol, const u8 *pmsk)
> > +void sm750_hw_cursor_set_data(struct lynx_cursor *cursor, u16 rop,
> > +                           const u8 *pcol, const u8 *pmsk)
>
> The indentation of the second line looks random.  It's not a multiple of
> the tabs, and it doesn't line up with the right side of the (.  So there
> doesn't seem to be any need to change it for this patch.
>

Acturally, if you set tabs be 8 characters as it said in Linux kernel coding
style, it lines up with the right side of the (.

The checkpatch.pl didn't say "CHECK: Alignment should match open parenthesis".

It shows up didn't line up the ( may because tabs are 4 characters in
mails.

So, should I just change the subject of the email? If I want to resend this patch,
should I make it a reply to this current discussion string or something else?



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

end of thread, other threads:[~2023-03-13  0:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10 21:33 [PATCH] staging: sm750: Rename camel case functions in sm750_cursor.* Kloudifold
2023-03-10 21:39 ` Julia Lawall
2023-03-11  1:06 ` kernel test robot
2023-03-13  0:38   ` Ira Weiny
  -- strict thread matches above, loose matches on Subject: below --
2023-03-10 21:47 Kloudifold
2023-03-10 21:52 ` Julia Lawall
2023-03-10 22:23 Kloudifold
2023-03-11  8:53 ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox