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(-)
sm750 driver has sm750_hw_cursor_* functions, which are named in
camelcase. Rename them to snake case to follow the function naming
convention.
Signed-off-by: Kloudifold <cloudifold.3125@gmail.com>
---
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 <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202303110849.X24WnHnM-lkp@intel.com/
---
---
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(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index effc7fcc3..a1254f693 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -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)
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.40.0
On Sat, Mar 18, 2023 at 09:35:49PM +0800, Kloudifold wrote: > sm750 driver has sm750_hw_cursor_* functions, which are named in > camelcase. Rename them to snake case to follow the function naming > convention. > > Signed-off-by: Kloudifold <cloudifold.3125@gmail.com> > > --- > Changes in v3: > - Add this changelog (Philipp) > - Move lkp tags and link to the correct location in commit log (Alison) Hi Kloudifold, Good to include tags, but let's get them to the 'TAG' location. The message you received from lkp is: If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202303171454.sScrVVOh-lkp@intel.com/ So, you take those 2 lines, and put them above your Signed-off-by: Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/oe-kbuild-all/202303171454.sScrVVOh-lkp@intel.com/ Signed-off-by: Kloudifold <cloudifold.3125@gmail.com> This is documented, but it's also a pattern that you can search for in the lore archives to see how folks before you did it. > - 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 <lkp@intel.com> > Link: https://lore.kernel.org/oe-kbuild-all/202303110849.X24WnHnM-lkp@intel.com/ So - the above lines, starting with 'This v2 patch...' can be removed, since you've stated it as a Change in v2. wrt the other feedback about checkpatch failing - test you git commit hook (per the first patch tutorial) and be sure you're doing a final checkpatch on the formatted patch. Keep at it Kloudifold :) Alison > --- > --- > 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(-) > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > index effc7fcc3..a1254f693 100644 > --- a/drivers/staging/sm750fb/sm750.c > +++ b/drivers/staging/sm750fb/sm750.c > @@ -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) > 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.40.0 >
On Sat, Mar 18, 2023 at 09:35:49PM +0800, Kloudifold wrote: > sm750 driver has sm750_hw_cursor_* functions, which are named in > camelcase. Rename them to snake case to follow the function naming > convention. > > Signed-off-by: Kloudifold <cloudifold.3125@gmail.com> > Delete this blank line before the ---. > --- > 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 <lkp@intel.com> > Link: https://lore.kernel.org/oe-kbuild-all/202303110849.X24WnHnM-lkp@intel.com/ > --- > --- Delete these two --- lines. > 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(-) I would have ignored the issues above but when I went to apply the patch git complained about whitespace problems. So then I ran checkpatch on the patch and it complains a lot. ERROR: code indent should use tabs where possible #61: FILE: drivers/staging/sm750fb/sm750.c:130: +^I^I^I^I ^Ifbcursor->image.dx - info->var.xoffset,$ WARNING: please, no space before tabs #61: FILE: drivers/staging/sm750fb/sm750.c:130: +^I^I^I^I ^Ifbcursor->image.dx - info->var.xoffset,$ CHECK: Alignment should match open parenthesis #61: FILE: drivers/staging/sm750fb/sm750.c:130: + sm750_hw_cursor_set_pos(cursor, + fbcursor->image.dx - info->var.xoffset, ERROR: code indent should use tabs where possible #62: FILE: drivers/staging/sm750fb/sm750.c:131: +^I^I^I^I ^Ifbcursor->image.dy - info->var.yoffset);$ WARNING: please, no space before tabs #62: FILE: drivers/staging/sm750fb/sm750.c:131: +^I^I^I^I ^Ifbcursor->image.dy - info->var.yoffset);$ total: 2 errors, 2 warnings, 1 checks, 99 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. NOTE: Whitespace errors detected. You may wish to use scripts/cleanpatch or scripts/cleanfile "[PATCH v3] staging: sm750: Rename sm750_hw_cursor_* functions to" has style problems, please review. regards, dan carpenter
Dan Carpenter wrote: > On Sat, Mar 18, 2023 at 09:35:49PM +0800, Kloudifold wrote: [...] > > > --- > > 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 <lkp@intel.com> > > Link: https://lore.kernel.org/oe-kbuild-all/202303110849.X24WnHnM-lkp@intel.com/ > > --- > > --- > > Delete these two --- lines. > Yes the 2 --- lines are not needed but... I'd like to clarify because I think some of the tools insert these automatically. I've included a bunch of examples below and the patches they generate as examples. Please follow along if you are not sure what I mean. To summarize you should only insert 1 '---' line in your manually created commit message. Do not add one to the cover letter either. Any other lines which are created by the tools are fine. Just leave them. So for this example... _This_ is _wrong_[1] _This_ is _correct_[2] The correct example [2] results in a patch like [3]. But notice how B4 has added my 'cover' into the single patch, patch? And it has a bunch of '---' lines? Specifically: <quote> --- Nothing really to be said here. This would be a cover letter if the patch series had more than 1 patch in it... --- Changes in v2: show version info example. --- </quote> This is because b4 defaults to using the cover letter as part of the single patch background information. When using b4 to send a single patch I leave my cover letter blank. So if you leave the b4 cover letter blank[4] you get a correctly formatted patch as in [5]. But _please_ _note_ that there are still 3 '---' lines in the final patch output. 2 of which are around the changes section. The following quote is perfectly fine. <quote> --- Changes in v2: show version info example. --- </quote> I hope this helps clarify because I'm worried that folks may be trying to edit the emails that the tools are generating and I don't think that is required. Ira [1] 13:39:43 > git sh commit b513858163640433f7938ff93848a5af1e675383 (HEAD -> b4/outreachy-demo) Author: Ira Weiny <ira.weiny@intel.com> Date: Mon Mar 20 13:14:51 2023 -0700 Documentation: Example staging doc change Update the documentation with an example showing how to update the documentation. Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- Changes in v2: show version info example. --- diff --git a/Documentation/staging/index.rst b/Documentation/staging/index.rst index ded8254bc0d7..2de034ddd059 100644 --- a/Documentation/staging/index.rst +++ b/Documentation/staging/index.rst @@ -1,5 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 +Fixing staging documentation somehow. + Unsorted Documentation ====================== [2] 13:41:03 > git sh commit 352cbf83a2da890ba974c043ae6047a625210ea2 (HEAD -> b4/outreachy-demo) Author: Ira Weiny <ira.weiny@intel.com> Date: Mon Mar 20 13:14:51 2023 -0700 Documentation: Example staging doc change Update the documentation with an example showing how to update the documentation. Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- Changes in v2: show version info example. diff --git a/Documentation/staging/index.rst b/Documentation/staging/index.rst index ded8254bc0d7..2de034ddd059 100644 --- a/Documentation/staging/index.rst +++ b/Documentation/staging/index.rst @@ -1,5 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 +Fixing staging documentation somehow. + Unsorted Documentation ====================== [3] <email headers> ... Subject: [PATCH] Documentation: Example staging doc change ... </email headers> Update the documentation with an example showing how to update the documentation. Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- Nothing really to be said here. This would be a cover letter if the patch series had more than 1 patch in it... --- Changes in v2: show version info example. --- Documentation/staging/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/staging/index.rst b/Documentation/staging/index.rst index ded8254bc0d7..2de034ddd059 100644 --- a/Documentation/staging/index.rst +++ b/Documentation/staging/index.rst @@ -1,5 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 +Fixing staging documentation somehow. + Unsorted Documentation ====================== --- base-commit: 38e04b3e4240a6d8fb43129ebad41608db64bc6f change-id: 20230320-outreachy-demo-bfa128532a93 Best regards, -- Ira Weiny <ira.weiny@intel.com> [4] Cover example # Lines starting with # will be removed from the cover letter. You can # use them to add notes or reminders to yourself. If you want to use # markdown headers in your cover letter, start the line with ">#". # You can add trailers to the cover letter. Any email addresses found in # these trailers will be added to the addresses specified/generated # during the b4 send stage. You can also run "b4 prep --auto-to-cc" to # auto-populate the To: and Cc: trailers based on the code being # modified. To: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> [5] <email headers> ... Subject: [PATCH] Documentation: Example staging doc change ... </email headers> Update the documentation with an example showing how to update the documentation. Signed-off-by: Ira Weiny <ira.weiny@intel.com> --- Changes in v2: show version info example. --- Documentation/staging/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/staging/index.rst b/Documentation/staging/index.rst index ded8254bc0d7..2de034ddd059 100644 --- a/Documentation/staging/index.rst +++ b/Documentation/staging/index.rst @@ -1,5 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 +Fixing staging documentation somehow. + Unsorted Documentation ====================== --- base-commit: 38e04b3e4240a6d8fb43129ebad41608db64bc6f change-id: 20230320-outreachy-demo-bfa128532a93 Best regards, -- Ira Weiny <ira.weiny@intel.com>
Fair enough. Also I wouldn't have said anything if the patch had been checkpatch clean. I was testing to see if the extra --- lines mattered and that's when git complained about white space problems and it's like you say, the extra --- lines don't cause an issue. regards, dan carpenter
On Sat, Mar 18, 2023 at 09:35:49PM +0800, Kloudifold wrote: > sm750 driver has sm750_hw_cursor_* functions, which are named in > camelcase. Rename them to snake case to follow the function naming > convention. Hi Kloudifold, The driver name is not required in the description above. You can write something like "Following sm750_hw...* functions ..." and then list the functions with the transformed names for quick reference. See this example below. sm750_hw_cursor_setSize ==> sm750_hw_cursor_set_size Rest all looks good to me. Deepak. > > Signed-off-by: Kloudifold <cloudifold.3125@gmail.com> > > --- > 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 <lkp@intel.com> > Link: https://lore.kernel.org/oe-kbuild-all/202303110849.X24WnHnM-lkp@intel.com/ > --- > --- > 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(-) > > diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c > index effc7fcc3..a1254f693 100644 > --- a/drivers/staging/sm750fb/sm750.c > +++ b/drivers/staging/sm750fb/sm750.c > @@ -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) > 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.40.0 > >
© 2016 - 2023 Red Hat, Inc.