staging: sm750fb: rename variables to avoid CamelCase
PATCH 1/1 staging: sm750fb: rename variables to avoid CamelCase
Rename 'pvReg' to 'pv_reg' and 'setAllEngOff' to 'set_all_eng_off' throughout the driver to comply with the Linux kernel coding style.
--- 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(-)
drivers/staging/sm750fb/sm750.c +3 -3
@@ -743,7 +743,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 ;
@@ -848,7 +848,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 */
@@ -1047,7 +1047,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);
drivers/staging/sm750fb/sm750.h +2 -2
@@ -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;
drivers/staging/sm750fb/sm750_hw.c +6 -6
@@ -23,18 +23,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 );
@@ -58,7 +58,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;
Signature · 1 line
2.43.0
Greg KH
maintainerQuoted 15 lines · André Moreira
Rename 'pvReg' to '
pv_reg' and 'setAllEngOff' to 'set_all_eng_off' throughout the driver to comply with the Linux kernel coding style.Signed-off-by André Moreira <[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(-)drivers/staging/sm750fb/sm750.c +0
-0
drivers/staging/sm750fb/sm750.c static int lynxfb_set_fbinfo(struct fb_info *info, int index) · line 746
Quoted 5 lines
drivers/staging/sm750fb/sm750.c +1
-1@@ -743,7 +743,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 +
This variable name is still in hungarian notation, which is not allowed in kernel variable names.
thanks,
greg k-h
PATCH v2 1/1 staging: sm750fb: rename variables to comply with kernel style
Rename 'pvReg' to 'regs' to remove Hungarian notation, and rename 'setAllEngOff' to 'set_all_eng_off' to avoid CamelCase throughout the driver. This complies with the Linux kernel coding style.
--- 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(-)
drivers/staging/sm750fb/sm750.c +3 -3
@@ -743,7 +743,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->regs +0x800f0 + (int )crtc->channel *0x140 ; crtc->cursor.max_h =64 ;
@@ -848,7 +848,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 */
@@ -1047,7 +1047,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->regs);iounmap (sm750_dev->vmem);pci_release_region (pdev,1 );kfree (g_settings);
drivers/staging/sm750fb/sm750.h +2 -2
@@ -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 *regs;unsigned char __iomem *vmem;/* locks*/ spinlock_t slock;
drivers/staging/sm750fb/sm750_hw.c +6 -6
@@ -23,18 +23,18 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev) }/* now map mmio and vidmem */ - sm750_dev->pvReg = + sm750_dev->regs =ioremap (sm750_dev->vidreg_start, sm750_dev->vidreg_size); -if (!sm750_dev->pvReg) { +if (!sm750_dev->regs) {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->regs +DE_BASE_ADDR_TYPE1 ; + sm750_dev->accel.dp_port_base = sm750_dev->regs +DE_PORT_ADDR_TYPE1 ; - mmio750 = sm750_dev->pvReg; + mmio750 = sm750_dev->regs;sm750_set_chip_type (sm750_dev->devid, sm750_dev->revid); sm750_dev->vidmem_start =pci_resource_start (pdev,0 );
@@ -58,7 +58,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->regs); err_release_region:pci_release_region (pdev,1 );return ret;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerRe: [PATCH v2] staging: sm750fb: rename variables to comply with kernel style
Quoted 105 lines · André Moreira
Rename 'pvReg' to 'regs' to remove Hungarian notation, and rename 'setAllEngOff' to '
set_all_eng_off' to avoid CamelCase throughout the driver. This complies with the Linux kernel coding style.Signed-off-by André Moreira <[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(-)drivers/staging/sm750fb/sm750.c +3
-3@@ -743,7 +743,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->regs +0x800f0 + (int )crtc->channel *0x140 ; crtc->cursor.max_h =64 ;@@ -848,7 +848,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 */ @@ -1047,7 +1047,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->regs);iounmap (sm750_dev->vmem);pci_release_region (pdev,1 );kfree (g_settings);drivers/staging/sm750fb/sm750.h +2
-2@@ -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 *regs;unsigned char __iomem *vmem;/* locks*/ spinlock_t slock;drivers/staging/sm750fb/sm750_hw.c +6
-6@@ -23,18 +23,18 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev) }/* now map mmio and vidmem */ - sm750_dev->pvReg = + sm750_dev->regs =ioremap (sm750_dev->vidreg_start, sm750_dev->vidreg_size); -if (!sm750_dev->pvReg) { +if (!sm750_dev->regs) {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->regs +DE_BASE_ADDR_TYPE1 ; + sm750_dev->accel.dp_port_base = sm750_dev->regs +DE_PORT_ADDR_TYPE1 ; - mmio750 = sm750_dev->pvReg; + mmio750 = sm750_dev->regs;sm750_set_chip_type (sm750_dev->devid, sm750_dev->revid); sm750_dev->vidmem_start =pci_resource_start (pdev,0 );@@ -58,7 +58,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->regs); err_release_region:pci_release_region (pdev,1 );return ret;Signature · 1 line
2.43.0
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/process/submitting-patches.rst for what needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
PATCH v3 1/1 staging: sm750fb: rename variables to comply with kernel style
In reply to Greg KHRename 'pvReg' to 'regs' to remove Hungarian notation, and rename 'setAllEngOff' to 'set_all_eng_off' to avoid CamelCase throughout the driver.
---
Changes in v3:
- Added changelog history to satisfy the bot.
Changes in v2:
- Renamed 'pv_reg' to 'regs' to completely remove Hungarian notation, based on Greg KH's feedback.
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(-)
drivers/staging/sm750fb/sm750.c +3 -3
@@ -743,7 +743,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->regs +0x800f0 + (int )crtc->channel *0x140 ; crtc->cursor.max_h =64 ;
@@ -848,7 +848,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 */
@@ -1047,7 +1047,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->regs);iounmap (sm750_dev->vmem);pci_release_region (pdev,1 );kfree (g_settings);
drivers/staging/sm750fb/sm750.h +2 -2
@@ -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 *regs;unsigned char __iomem *vmem;/* locks*/ spinlock_t slock;
drivers/staging/sm750fb/sm750_hw.c +6 -6
@@ -23,18 +23,18 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev) }/* now map mmio and vidmem */ - sm750_dev->pvReg = + sm750_dev->regs =ioremap (sm750_dev->vidreg_start, sm750_dev->vidreg_size); -if (!sm750_dev->pvReg) { +if (!sm750_dev->regs) {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->regs +DE_BASE_ADDR_TYPE1 ; + sm750_dev->accel.dp_port_base = sm750_dev->regs +DE_PORT_ADDR_TYPE1 ; - mmio750 = sm750_dev->pvReg; + mmio750 = sm750_dev->regs;sm750_set_chip_type (sm750_dev->devid, sm750_dev->revid); sm750_dev->vidmem_start =pci_resource_start (pdev,0 );
@@ -58,7 +58,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->regs); err_release_region:pci_release_region (pdev,1 );return ret;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerRe: [PATCH v3] staging: sm750fb: rename variables to comply with kernel style
Quoted 11 lines · André Moreira
Rename 'pvReg' to 'regs' to remove Hungarian notation, and rename 'setAllEngOff' to '
set_all_eng_off' to avoid CamelCase throughout the driver.Signed-off-by André Moreira <[email protected]>---
Changes in v3:
- Added changelog history to satisfy the bot.Changes in v2:
- Renamed 'pv_reg' to 'regs' to completely remove Hungarian notation, based on Greg KH's feedback.
Does not apply to the staging-testing branch :(
PATCH v4 1/1 staging: sm750fb: rename variables to comply with kernel style
In reply to Greg KHRename 'setAllEngOff' to 'set_all_eng_off' within the 'init_status' struct to avoid CamelCase and comply with the Linux kernel coding style.
---
v4:
- Drop register renames 'pvReg' to 'regs' as they were merged via another upstream patch.
- Keep only the 'init_status' CamelCase cleanup.
drivers/staging/sm750fb/sm750.h | 9 +++++++++
1 file changed, 9 insertions(+)
drivers/staging/sm750fb/sm750.h +9 -0
@@ -39,6 +39,15 @@ enum sm750_path { sm750_pnc = 3, /* panel and crt */ }; +struct init_status { +ushort power_mode; +/* below three clocks are in unit of MHZ*/ +ushort chip_clk; +ushort mem_clk; +ushort master_clk; +ushort set_all_eng_off; +ushort reset_memory; +};struct lynx_accel {/* base virtual address of DPR registers */
Signature · 1 line
2.43.0
Re: [PATCH v4] staging: sm750fb: rename variables to comply with kernel style
Please disregard this v4 patch.
Upon closer inspection, the 'init_status' struct has been completely removed from the driver by a previous upstream commit, making this cleanup obsolete. Sorry for the noise.
Em ter., 7 de jul. de 2026 às 10:17, André Moreira <[email protected]> escreveu:
Quoted 36 lines
Rename 'setAllEngOff' to '
set_all_eng_off' within the 'init_status' struct to avoid CamelCase and comply with the Linux kernel coding style.Signed-off-by André Moreira <[email protected]>---
v4:
- Drop register renames 'pvReg' to 'regs' as they were merged via another upstream patch.
- Keep only the 'init_status' CamelCase cleanup.
drivers/staging/sm750fb/sm750.h| 9 +++++++++1 file changed, 9 insertions(+)drivers/staging/sm750fb/sm750.h +9
-1@@ -39,6 +39,15 @@ enum sm750_path { sm750_pnc = 3, /* panel and crt */ }; +struct init_status { +ushort power_mode; +/* below three clocks are in unit of MHZ*/ +ushort chip_clk; +ushort mem_clk; +ushort master_clk; +ushort set_all_eng_off; +ushort reset_memory; +};struct lynx_accel {/* base virtual address of DPR registers */ --2.43.0
Greg Kroah-Hartman
maintainerRe: [PATCH v4] staging: sm750fb: rename variables to comply with kernel style
In reply to André MoreiraQuoted 20 lines · André Moreira
Rename 'setAllEngOff' to '
set_all_eng_off' within the 'init_status' struct to avoid CamelCase and comply with the Linux kernel coding style.Signed-off-by André Moreira <[email protected]>---
v4:
- Drop register renames 'pvReg' to 'regs' as they were merged via another upstream patch.
- Keep only the 'init_status' CamelCase cleanup.
drivers/staging/sm750fb/sm750.h| 9 +++++++++1 file changed, 9 insertions(+)drivers/staging/sm750fb/sm750.h +0
-0@@ -39,6 +39,15 @@ enum sm750_path { sm750_pnc = 3, /* panel and crt */ };
drivers/staging/sm750fb/sm750.h enum sm750_path { · line 51
Quoted 10 lines
drivers/staging/sm750fb/sm750.h +9
-0+struct init_status { +ushort power_mode; +/* below three clocks are in unit of MHZ*/ +ushort chip_clk; +ushort mem_clk; +ushort master_clk; +ushort set_all_eng_off; +ushort reset_memory; +};
The description of this patch seems to have nothing to do with the diff itself :(
Did something go wrong?
PATCH v5 1/1 staging: sm750fb: rename variables to comply with kernel style
In reply to Greg KHRename 'setAllEngOff' to 'set_all_eng_off' within the 'init_status' struct to avoid CamelCase and comply with the Linux kernel coding style. Also update its usage within sm750.c to prevent compilation errors.
---
v5:
- Fix broken diff from v4 that was accidentally recreating the entire struct.
- Update the variable usage inside drivers/staging/sm750fb/sm750.c to prevent compilation errors.
v4:
- Drop register renames 'pvReg' to 'regs' as they were merged via another upstream patch.
- Keep only the 'init_status' CamelCase cleanup.
v3:
- Added changelog history to satisfy the bot.
v2:
- Renamed 'pv_reg' to 'regs' to completely remove Hungarian notation, based on Greg KH's feedback.
drivers/staging/sm750fb/sm750.c | 2 +- drivers/staging/sm750fb/sm750.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/sm750fb/sm750.c +1 -1
@@ -848,7 +848,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 */
drivers/staging/sm750fb/sm750.h +1 -1
@@ -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; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerRe: [PATCH v5] staging: sm750fb: rename variables to comply with kernel style
Quoted 43 lines · André Moreira
Rename 'setAllEngOff' to '
set_all_eng_off' within the 'init_status' struct to avoid CamelCase and comply with the Linux kernel coding style. Also update its usage withinsm750.cto prevent compilation errors.Signed-off-by André Moreira <[email protected]>---
v5:
- Fix broken diff from v4 that was accidentally recreating the entire struct.
- Update the variable usage insidedrivers/staging/sm750fb/sm750.cto prevent compilation errors.v4:
- Drop register renames 'pvReg' to 'regs' as they were merged via another upstream patch.
- Keep only the 'init_status' CamelCase cleanup.v3:
- Added changelog history to satisfy the bot.v2:
- Renamed 'pv_reg' to 'regs' to completely remove Hungarian notation, based on Greg KH's feedback.drivers/staging/sm750fb/sm750.c | 2 +- drivers/staging/sm750fb/sm750.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/staging/sm750fb/sm750.c +1
-1@@ -848,7 +848,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 */ drivers/staging/sm750fb/sm750.h +0
-0
drivers/staging/sm750fb/sm750.h struct init_status { · line 50
Quoted 8 lines
drivers/staging/sm750fb/sm750.h +1
-1@@ -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; };
If this variable is only set, and never read, why is it here at all? Why not just remove it entirely?
thanks,
greg k-h
PATCH v6 1/1 staging: sm750fb: Remove unused variable 'setAllEngOff'
In reply to Greg KHThe variable 'setAllEngOff' within the 'init_status' struct is only set to zero during setup but its value is never read anywhere else in the driver. Remove it entirely to clean up the code.
---
v6:
- Change patch approach from renaming CamelCase to entirely removing the unused 'setAllEngOff' variable, based on Greg KH's feedback.
v5:
- Fix broken diff from v4 that was accidentally recreating the entire struct.
- Update the variable usage inside drivers/staging/sm750fb/sm750.c to prevent compilation errors.
v4:
- Drop register renames 'pvReg' to 'regs' as they were merged via another upstream patch.
- Keep only the 'init_status' CamelCase cleanup.
v3:
- Added changelog history to satisfy the bot.
v2:
- Renamed 'pv_reg' to 'regs' to completely remove Hungarian notation, based on Greg KH's feedback.
drivers/staging/sm750fb/sm750.c | 1 - drivers/staging/sm750fb/sm750.h | 1 - 2 files changed, 2 deletions(-)
drivers/staging/sm750fb/sm750.c +0 -1
@@ -848,7 +848,6 @@ 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.reset_memory =1 ;/* defaultly turn g_hwcursor on for both view */
drivers/staging/sm750fb/sm750.h +0 -1
@@ -44,7 +44,6 @@ struct init_status {ushort chip_clk;ushort mem_clk;ushort master_clk; -ushort setAllEngOff;ushort reset_memory; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerRe: [PATCH v6] staging: sm750fb: Remove unused variable 'setAllEngOff'
Quoted 9 lines · André Moreira
The variable 'setAllEngOff' within the '
init_status' struct is only set to zero during setup but its value is never read anywhere else in the driver. Remove it entirely to clean up the code.Signed-off-by André Moreira <[email protected]>---
v6:
- Change patch approach from renaming CamelCase to entirely removing the unused 'setAllEngOff' variable, based on Greg KH's feedback.
This doesn't apply to my tree at all. Can you rebase against the staging-testing branch and resend?
thanks,
greg k-h
Re: [PATCH v6] staging: sm750fb: Remove unused variable 'setAllEngOff'
Hi Greg,
Please disregard this patch. Upon rebasing against staging-testing, I noticed that 'setAllEngOff' was recently renamed to 'set_all_eng_off' and its value is now actually being read/used inside drivers/staging/sm750fb/ddk750_chip.c.
Thank you for your time!
Regards,
André
Em qua., 8 de jul. de 2026 às 09:01, Greg Kroah-Hartman <[email protected]> escreveu:
Quoted 18 lines · André Moreira
Quoted 9 lines
The variable 'setAllEngOff' within the '
init_status' struct is only set to zero during setup but its value is never read anywhere else in the driver. Remove it entirely to clean up the code.Signed-off-by André Moreira <[email protected]>---
v6:
- Change patch approach from renaming CamelCase to entirely removing the unused 'setAllEngOff' variable, based on Greg KH's feedback.This doesn't apply to my tree at all. Can you rebase against the staging-testing branch and resend?
thanks,
greg k-h