Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH v2] staging: sm750fb: fix CamelCase variables name in sm750
@ 2026-05-26 13:16 Emmanuel Arias
  2026-05-26 16:20 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Emmanuel Arias @ 2026-05-26 13:16 UTC (permalink / raw)
  To: sudipm.mukherjee, teddy.wang, gregkh
  Cc: linux-fbdev, linux-staging, linux-kernel, Emmanuel Arias,
	kernel test robot

Replace CamelCase variable name with snake_case:
- pvReg -> pv_reg
- setAllEngOff -> set_all_eng_off

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202605171049.KbaBnrJV-lkp@intel.com/
Signed-off-by: Emmanuel Arias <eamanu@riseup.net>
---
 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(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 996a586a3727..9b30627a19d0 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -755,7 +755,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 	 * must be set after crtc member initialized
 	 */
 	crtc->cursor.offset = crtc->o_screen + crtc->vidmem_size - 1024;
-	crtc->cursor.mmio = sm750_dev->pvReg +
+	crtc->cursor.mmio = sm750_dev->pv_reg +
 		0x800f0 + (int)crtc->channel * 0x140;
 
 	crtc->cursor.max_h = 64;
@@ -860,7 +860,7 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)
 	sm750_dev->init_parm.mem_clk = 0;
 	sm750_dev->init_parm.master_clk = 0;
 	sm750_dev->init_parm.power_mode = 0;
-	sm750_dev->init_parm.setAllEngOff = 0;
+	sm750_dev->init_parm.set_all_eng_off = 0;
 	sm750_dev->init_parm.reset_memory = 1;
 
 	/* defaultly turn g_hwcursor on for both view */
@@ -1059,7 +1059,7 @@ static void lynxfb_pci_remove(struct pci_dev *pdev)
 	sm750fb_framebuffer_release(sm750_dev);
 	arch_phys_wc_del(sm750_dev->mtrr.vram);
 
-	iounmap(sm750_dev->pvReg);
+	iounmap(sm750_dev->pv_reg);
 	iounmap(sm750_dev->vmem);
 	pci_release_region(pdev, 1);
 	kfree(g_settings);
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index d2c522e67f26..e8885133da2e 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -44,7 +44,7 @@ struct init_status {
 	ushort chip_clk;
 	ushort mem_clk;
 	ushort master_clk;
-	ushort setAllEngOff;
+	ushort set_all_eng_off;
 	ushort reset_memory;
 };
 
@@ -97,7 +97,7 @@ struct sm750_dev {
 	unsigned long vidreg_start;
 	__u32 vidmem_size;
 	__u32 vidreg_size;
-	void __iomem *pvReg;
+	void __iomem *pv_reg;
 	unsigned char __iomem *vmem;
 	/* locks*/
 	spinlock_t slock;
diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index 6f7c354a34a1..2e2c7cffddab 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -40,18 +40,18 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
 	}
 
 	/* now map mmio and vidmem */
-	sm750_dev->pvReg =
+	sm750_dev->pv_reg =
 		ioremap(sm750_dev->vidreg_start, sm750_dev->vidreg_size);
-	if (!sm750_dev->pvReg) {
+	if (!sm750_dev->pv_reg) {
 		dev_err(&pdev->dev, "mmio failed\n");
 		ret = -EFAULT;
 		goto err_release_region;
 	}
 
-	sm750_dev->accel.dpr_base = sm750_dev->pvReg + DE_BASE_ADDR_TYPE1;
-	sm750_dev->accel.dp_port_base = sm750_dev->pvReg + DE_PORT_ADDR_TYPE1;
+	sm750_dev->accel.dpr_base = sm750_dev->pv_reg + DE_BASE_ADDR_TYPE1;
+	sm750_dev->accel.dp_port_base = sm750_dev->pv_reg + DE_PORT_ADDR_TYPE1;
 
-	mmio750 = sm750_dev->pvReg;
+	mmio750 = sm750_dev->pv_reg;
 	sm750_set_chip_type(sm750_dev->devid, sm750_dev->revid);
 
 	sm750_dev->vidmem_start = pci_resource_start(pdev, 0);
@@ -75,7 +75,7 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
 	return 0;
 
 err_unmap_reg:
-	iounmap(sm750_dev->pvReg);
+	iounmap(sm750_dev->pv_reg);
 err_release_region:
 	pci_release_region(pdev, 1);
 	return ret;
-- 
2.53.0


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

* Re: [PATCH v2] staging: sm750fb: fix CamelCase variables name in sm750
  2026-05-26 13:16 [PATCH v2] staging: sm750fb: fix CamelCase variables name in sm750 Emmanuel Arias
@ 2026-05-26 16:20 ` Greg KH
  2026-05-26 20:30   ` eamanu
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2026-05-26 16:20 UTC (permalink / raw)
  To: Emmanuel Arias
  Cc: sudipm.mukherjee, teddy.wang, linux-fbdev, linux-staging,
	linux-kernel, kernel test robot

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?

> - setAllEngOff -> set_all_eng_off
> 
> Reported-by: kernel test robot <lkp@intel.com>

The test robot told you to make this change?

> Closes: https://lore.kernel.org/oe-kbuild-all/202605171049.KbaBnrJV-lkp@intel.com/
> Signed-off-by: Emmanuel Arias <eamanu@riseup.net>
> ---
>  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?

thanks,

greg k-h

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

* Re: [PATCH v2] staging: sm750fb: fix CamelCase variables name in sm750
  2026-05-26 16:20 ` Greg KH
@ 2026-05-26 20:30   ` eamanu
  2026-07-07  9:07     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: eamanu @ 2026-05-26 20:30 UTC (permalink / raw)
  To: Greg KH
  Cc: sudipm.mukherjee, teddy.wang, linux-fbdev, linux-staging,
	linux-kernel, kernel test robot

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 <lkp@intel.com>
> 
> 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/202605171049.KbaBnrJV-lkp@intel.com/
>> Signed-off-by: Emmanuel Arias <eamanu@riseup.net>
>> ---
>>  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

> 
> thanks,
> 
> greg k-h

Cheers,
Emmanuel

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

* Re: [PATCH v2] staging: sm750fb: fix CamelCase variables name in sm750
  2026-05-26 20:30   ` eamanu
@ 2026-07-07  9:07     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2026-07-07  9:07 UTC (permalink / raw)
  To: eamanu
  Cc: sudipm.mukherjee, teddy.wang, linux-fbdev, linux-staging,
	linux-kernel, kernel test robot

On Tue, May 26, 2026 at 08:30:56PM +0000, eamanu@riseup.net 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 <lkp@intel.com>
> > 
> > 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/202605171049.KbaBnrJV-lkp@intel.com/
> >> Signed-off-by: Emmanuel Arias <eamanu@riseup.net>
> >> ---
> >>  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

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

end of thread, other threads:[~2026-07-07  9:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 13:16 [PATCH v2] staging: sm750fb: fix CamelCase variables name in sm750 Emmanuel Arias
2026-05-26 16:20 ` Greg KH
2026-05-26 20:30   ` eamanu
2026-07-07  9:07     ` Greg KH

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