staging: sm750: Rename sm750_hw_cursor_* functions to snake_case
Subsystems (2)
PATCH v5 1/1 staging: sm750: Rename sm750_hw_cursor_* functions to snake_case
sm750 driver has sm750_hw_cursor_* functions, which are named in camelcase. Rename them to snake case to follow the function naming convention.
- sm750_hw_cursor_setSize => sm750_hw_cursor_set_size
- sm750_hw_cursor_setPos => sm750_hw_cursor_set_pos
- sm750_hw_cursor_setColor => sm750_hw_cursor_set_color
- sm750_hw_cursor_setData => sm750_hw_cursor_set_data
- sm750_hw_cursor_setData2 => sm750_hw_cursor_set_data2
---
Changes in v5:
- Include missed recipients in v4, no functional change to the code
Changes in v4:
- Update the commit msg (Deepak)
- Use tabs replace 8 spaces
This v4 patch was prompted by 2 errors, 2 warnings and 1 checks reported by the scripts/checkpatch.pl, which detected the style problem.
Changes in v3:
- Add this changelog (Philipp)
- Move lkp tags and link to the correct location in commit log (Alison)
- Update the commit msg (Philip)
- Update the commit log (Bagas, Julia)
Changes in v2:
- Use new function names in call sites (LKP)
This v2 patch was prompted by an error reported by the Linux test robot, which detected the compile error.
--- drivers/staging/sm750fb/sm750.c | 22 +++++++++++----------- drivers/staging/sm750fb/sm750_cursor.c | 14 +++++++------- drivers/staging/sm750fb/sm750_cursor.h | 12 ++++++------ 3 files changed, 24 insertions(+), 24 deletions(-)
drivers/staging/sm750fb/sm750.c +11 -11
@@ -121,14 +121,14 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)sm750_hw_cursor_disable (cursor);if (fbcursor->set &FB_CUR_SETSIZE ) -sm750_hw_cursor_setSize (cursor, - fbcursor->image.width, - fbcursor->image.height); +sm750_hw_cursor_set_size (cursor, + fbcursor->image.width, + fbcursor->image.height);if (fbcursor->set &FB_CUR_SETPOS ) -sm750_hw_cursor_setPos (cursor, - fbcursor->image.dx - info->var.xoffset, - fbcursor->image.dy - info->var.yoffset); +sm750_hw_cursor_set_pos (cursor, + fbcursor->image.dx - info->var.xoffset, + fbcursor->image.dy - info->var.yoffset);if (fbcursor->set &FB_CUR_SETCMAP ) {/* get the 16bit color of kernel means */
@@ -142,14 +142,14 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) ((info->cmap.green[fbcursor->image.bg_color] &0xfc00 ) >>5 ) | ((info->cmap.blue[fbcursor->image.bg_color] &0xf800 ) >>11 ); -sm750_hw_cursor_setColor (cursor, fg, bg); +sm750_hw_cursor_set_color (cursor, fg, bg); }if (fbcursor->set & (FB_CUR_SETSHAPE |FB_CUR_SETIMAGE )) { -sm750_hw_cursor_setData (cursor, - fbcursor->rop, - fbcursor->image.data, - fbcursor->mask); +sm750_hw_cursor_set_data (cursor, + fbcursor->rop, + fbcursor->image.data, + fbcursor->mask); }if (fbcursor->enable)
drivers/staging/sm750fb/sm750_cursor.c +7 -7
@@ -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;
drivers/staging/sm750fb/sm750_cursor.h +6 -6
@@ -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
Signature · 1 line
2.40.0
On Tue, Mar 28, 2023 at 07:16:54PM +0800, Kloudifold wrote:
Hi Kloudifold,
Quoted 1 line
sm750 driver has sm750_hw_cursor_* functions, which are named in
As mentioned earlier, the driver name "sm750" is not required here. You can simply start the line with "The driver ...".
Quoted 9 lines
camelcase. Rename them to snake case to follow the function naming convention.
-
sm750_hw_cursor_setSize=>sm750_hw_cursor_set_size
-sm750_hw_cursor_setPos=>sm750_hw_cursor_set_pos
-sm750_hw_cursor_setColor=>sm750_hw_cursor_set_color
-sm750_hw_cursor_setData=>sm750_hw_cursor_set_data
-sm750_hw_cursor_setData2=>sm750_hw_cursor_set_data2
Quoted 5 lines
Signed-off-by Kloudifold <[email protected]>---
Changes in v5:
- Include missed recipients in v4, no functional change to the code
I still do not see the full maintainer list on this patch. If I do the following:
$ perl scripts/get_maintainer.pl --separator , --nokeywords --nogit --nogit-fallback --norolestats drivers/staging/sm750fb/sm750.c
I get the following list:
Sudip Mukherjee <[email protected]>,Teddy Wang <[email protected]>,Greg Kroah-Hartman <[email protected]>,[email protected],[email protected],[email protected]
You are still missing these mailing list in your to list: [email protected],[email protected]
Are you doing anything different to get the maintainer list? What?
Thank you,
Deepak.
Quoted 149 lines
Changes in v4:
- Update the commit msg (Deepak)
- Use tabs replace 8 spacesThis v4 patch was prompted by 2 errors, 2 warnings and 1 checks reported by the
scripts/checkpatch.pl, which detected the style problem.Changes in v3:
- Add this changelog (Philipp)
- Move lkp tags and link to the correct location in commit log (Alison)
- Update the commit msg (Philip)
- Update the commit log (Bagas, Julia)Changes in v2:
- Use new function names in call sites (LKP)This v2 patch was prompted by an error reported by the Linux test robot, which detected the compile error.
Reported-by kernel test robot <[email protected]>--- drivers/staging/sm750fb/sm750.c | 22 +++++++++++----------- drivers/staging/sm750fb/sm750_cursor.c | 14 +++++++------- drivers/staging/sm750fb/sm750_cursor.h | 12 ++++++------ 3 files changed, 24 insertions(+), 24 deletions(-)drivers/staging/sm750fb/sm750.c +11
-11@@ -121,14 +121,14 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)sm750_hw_cursor_disable (cursor);if (fbcursor->set &FB_CUR_SETSIZE ) -sm750_hw_cursor_setSize (cursor, - fbcursor->image.width, - fbcursor->image.height); +sm750_hw_cursor_set_size (cursor, + fbcursor->image.width, + fbcursor->image.height);if (fbcursor->set &FB_CUR_SETPOS ) -sm750_hw_cursor_setPos (cursor, - fbcursor->image.dx - info->var.xoffset, - fbcursor->image.dy - info->var.yoffset); +sm750_hw_cursor_set_pos (cursor, + fbcursor->image.dx - info->var.xoffset, + fbcursor->image.dy - info->var.yoffset);if (fbcursor->set &FB_CUR_SETCMAP ) {/* get the 16bit color of kernel means */ @@ -142,14 +142,14 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) ((info->cmap.green[fbcursor->image.bg_color] &0xfc00 ) >>5 ) | ((info->cmap.blue[fbcursor->image.bg_color] &0xf800 ) >>11 ); -sm750_hw_cursor_setColor (cursor, fg, bg); +sm750_hw_cursor_set_color (cursor, fg, bg); }if (fbcursor->set & (FB_CUR_SETSHAPE |FB_CUR_SETIMAGE )) { -sm750_hw_cursor_setData (cursor, - fbcursor->rop, - fbcursor->image.data, - fbcursor->mask); +sm750_hw_cursor_set_data (cursor, + fbcursor->rop, + fbcursor->image.data, + fbcursor->mask); }if (fbcursor->enable)drivers/staging/sm750fb/sm750_cursor.c +7
-7@@ -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;drivers/staging/sm750fb/sm750_cursor.h +6
-6@@ -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 Signature · 1 line
2.40.0