Re: [PATCH v2] staging: sm750fb: fix CamelCase variables name in sm750

Greg KH <[email protected]> Tue, 7 Jul 2026 11:07:32 +0200
Newsgroups org.kernel.vger.linux-fbdev,dev.linux.lists.linux-staging,org.kernel.vger.linux-kernel
Message-ID <2026070732-shawl-effects-c4c9@gregkh>
On Tue, May 26, 2026 at 08:30:56PM +0000, [email protected] wrote:
> Hi,
> 
> thanks for your reply
> 
> On 2026-05-26 13:20, Greg KH wrote:
> > On Tue, May 26, 2026 at 10:16:31AM -0300, Emmanuel Arias wrote:
> >> Replace CamelCase variable name with snake_case:
> >> - pvReg -> pv_reg
> > 
> > Why are you keeping the "pv_"?  What does that mean?
> 
> Sorry, I'm trying to start contributing in the kernel. I run
> 
>   scripts/checkpatch.pl --file drivers/staging/sm750fb/*.c 
> 
> And the output was:
> 
> drivers/staging/sm750fb/sm750.c
> -------------------------------
> WARNING: static const char * array should probably be static const char
> * const
> #36: FILE: drivers/staging/sm750fb/sm750.c:36:
> +static const char *g_fbmode[] = {NULL, NULL};
> 
> CHECK: Avoid CamelCase: <pvReg>
> #758: FILE: drivers/staging/sm750fb/sm750.c:758:
> +       crtc->cursor.mmio = sm750_dev->pvReg +
> 
> CHECK: Avoid CamelCase: <setAllEngOff>
> #863: FILE: drivers/staging/sm750fb/sm750.c:863:
> +       sm750_dev->init_parm.setAllEngOff = 0;
> 
> total: 0 errors, 1 warnings, 2 checks, 1171 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.
> 
> So I tried to change pvReg for pv_reg and the same for setAllEngOff.
> 
> > 
> >> - setAllEngOff -> set_all_eng_off
> >> 
> >> Reported-by: kernel test robot <[email protected]>
> > 
> > The test robot told you to make this change?
> 
> As I understand the test robot failed because:
> 
> 
>    drivers/staging/sm750fb/sm750_hw.c: In function 'hw_sm750_map':
> >> drivers/staging/sm750fb/sm750_hw.c:43:13: error: 'struct sm750_dev' has no member named 'pvReg'; did you mean 'pv_reg'?
>      sm750_dev->pvReg =
>                 ^~~~~
>                 pv_reg
> 
> > 
> >> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> >> Signed-off-by: Emmanuel Arias <[email protected]>
> >> ---
> >>  drivers/staging/sm750fb/sm750.c    |  6 +++---
> >>  drivers/staging/sm750fb/sm750.h    |  4 ++--
> >>  drivers/staging/sm750fb/sm750_hw.c | 12 ++++++------
> >>  3 files changed, 11 insertions(+), 11 deletions(-)
> > 
> > What changed from v1?
> 
> So, in this v2 I added sm750_hw.c.
> 
> Please let me know if I misunderstood the workflow

The workflow is good, but you changed the name without thinking about
why checkpatch was telling you the current name was bad, and so you need
to pick a correct name for it instead.

Look on the mailing list archives for the many times people have
attempted to do this same thing recently for why this name change is not
the correct one.

thanks,

greg k-h