staging: sm750fb: rename pvReg to pv_reg
PATCH 1/2 staging: sm750fb: rename pvReg to pv_reg
Rename pvReg to pv_reg to comply with kernel coding style (checkpatch.pl) and improve readability.
--- drivers/staging/sm750fb/sm750.c | 4 ++-- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_hw.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/sm750fb/sm750.c +2 -2
@@ -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 ;
@@ -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 +1 -1
@@ -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.54.0
PATCH 2/2 staging: sm750fb: rename setAllEngOff
Rename setAllEngOff to set_all_eng_off to comply with kernel coding style and improve readability.
--- 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.54.0
Re: [PATCH 2/2] staging: sm750fb: rename setAllEngOff
Quoted 27 lines · Onish Sharma
Rename setAllEngOff to
set_all_eng_offto comply with kernel coding style and improve readability.Signed-off-by Onish Sharma <[email protected]>--- 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 49
Quoted 7 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; };
There are no users? Why not just delete it.
regards,
dan carpenter
Quoted 4 lines · Onish Sharma
Rename pvReg to
pv_regto comply with kernel coding style (checkpatch.pl) and improve readability.Signed-off-by Onish Sharma <[email protected]>
pv stands for pointer void. It's Hungarian notation and it's not allowed.
regards,
dan carpenter
PATCH v2 1/1 staging: sm750fb: rename pv_reg to io_base
Rename pv_reg to io_base to follow kernel naming style and improve readability.
No functional changes intended.
--- drivers/staging/sm750fb/sm750.c | 4 ++-- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_hw.c | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/sm750fb/sm750.c +2 -2
@@ -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->pv_reg + + crtc->cursor.mmio = sm750_dev->io_base +0x800f0 + (int )crtc->channel *0x140 ; crtc->cursor.max_h =64 ;
@@ -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->pv_reg); +iounmap (sm750_dev->io_base);iounmap (sm750_dev->vmem);pci_release_region (pdev,1 );kfree (g_settings);
drivers/staging/sm750fb/sm750.h +1 -1
@@ -97,7 +97,7 @@ struct sm750_dev {unsigned long vidreg_start;__u32 vidmem_size;__u32 vidreg_size; -void __iomem *pv_reg; +void __iomem *io_base;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->pv_reg = + sm750_dev->io_base =ioremap (sm750_dev->vidreg_start, sm750_dev->vidreg_size); -if (!sm750_dev->pv_reg) { +if (!sm750_dev->io_base) {dev_err (&pdev->dev,"mmio failed\n" ); ret = -EFAULT ; goto err_release_region; } - 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 ; + sm750_dev->accel.dpr_base = sm750_dev->io_base +DE_BASE_ADDR_TYPE1 ; + sm750_dev->accel.dp_port_base = sm750_dev->io_base +DE_PORT_ADDR_TYPE1 ; - mmio750 = sm750_dev->pv_reg; + mmio750 = sm750_dev->io_base;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->pv_reg); +iounmap (sm750_dev->io_base); err_release_region:pci_release_region (pdev,1 );return ret;
Signature · 1 line
2.54.0
Re: [PATCH v2] staging: sm750fb: rename pv_reg to io_base
Quoted 4 lines · Onish Sharma
Rename
pv_regtoio_baseto follow kernel naming style and improve readability.No functional changes intended.
Run your patches through checkpatch. Also v2 patches need to be sent in a specific format. This should be [PATCH v2 1/2]
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/
Quoted 1 line
---
^^^
There needs to be a note here to say what changed.
regards,
dan carpenter
A message that is not in the archive (sent off-list or not yet received): CAOWJOpvJnSeS=1sO2mujC9tNi9_cQGgJ6S0j6xvkAp8KRnudjg@mail.gmail.com
Re: [PATCH v2] staging: sm750fb: rename pv_reg to io_base
I have submitted patch v3 with note and Signed-off-by line
Regards,
Onish
Quoted 26 lines · neha arora
I have submitted patch v3 with note and Signed-off-by line.
Regards,
OnishQuoted 19 lines · Dan Carpenter
Quoted 4 lines · Onish Sharma
Rename
pv_regtoio_baseto follow kernel naming style and improve readability.No functional changes intended.
Run your patches through checkpatch. Also v2 patches need to be sent in a specific format. This should be [PATCH v2 1/2]
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/
Quoted 1 line
---
^^^
There needs to be a note here to say what changed.regards,
dan carpenter