staging: sm750fb: style cleanup in `lynx_accel`
cover staging: sm750fb: style cleanup in `lynx_accel`
This set of patches covers two style cleanups in struct lynx_accel defined in drivers/staging/sm750fb/sm750.h.
PATCH #1: rename dprBase to dpr_base
PATCH #2: rename dpPortBase to dp_port_base
Eric Florin (2):
staging: sm750fb: rename dprBase to dpr_base
staging: sm750fb: rename dpPortBase in lynx_accel
drivers/staging/sm750fb/sm750.h | 4 ++-- drivers/staging/sm750fb/sm750_accel.c | 6 +++--- drivers/staging/sm750fb/sm750_hw.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.49.0.1112.g889b7c5bd8-goog
PATCH 1/2 staging: sm750fb: rename dprBase to dpr_base
Rename dprBase to dpr_base to conform with kernel style guidelines as reported by checkpatch.pl
CHECK: Avoid CamelCase: <dprBase>
--- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_accel.c | 4 ++-- drivers/staging/sm750fb/sm750_hw.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/sm750.h +1 -1
@@ -50,7 +50,7 @@ struct init_status {struct lynx_accel {/* base virtual address of DPR registers */ -volatile unsigned char __iomem *dprBase; +volatile unsigned char __iomem *dpr_base;/* base virtual address of de data port */ volatile unsigned char __iomem *dpPortBase;
drivers/staging/sm750fb/sm750_accel.c +2 -2
@@ -19,12 +19,12 @@#include "sm750_accel.h" static inline void write_dpr (struct lynx_accel *accel,int offset,u32 regValue) { -writel (regValue, accel->dprBase + offset); +writel (regValue, accel->dpr_base + offset); }static inline u32 read_dpr (struct lynx_accel *accel,int offset) { -return readl (accel->dprBase + offset); +return readl (accel->dpr_base + offset); }static inline void write_dpPort (struct lynx_accel *accel,u32 data)
drivers/staging/sm750fb/sm750_hw.c +1 -1
@@ -58,7 +58,7 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev) }pr_info ("mmio virtual addr = %p\n" , sm750_dev->pvReg); - sm750_dev->accel.dprBase = sm750_dev->pvReg +DE_BASE_ADDR_TYPE1 ; + sm750_dev->accel.dpr_base = sm750_dev->pvReg +DE_BASE_ADDR_TYPE1 ; sm750_dev->accel.dpPortBase = sm750_dev->pvReg +DE_PORT_ADDR_TYPE1 ; mmio750 = sm750_dev->pvReg;
Signature · 1 line
2.49.0.1112.g889b7c5bd8-goog
Greg KH
maintainerRe: [PATCH 1/2] staging: sm750fb: rename dprBase to dpr_base
Quoted 17 lines · Eric Florin
Rename
dprBasetodpr_baseto conform with kernel style guidelines as reported by checkpatch.plCHECK: Avoid CamelCase: <dprBase>
Signed-off-by Eric Florin <[email protected]>--- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_accel.c | 4 ++-- drivers/staging/sm750fb/sm750_hw.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/staging/sm750fb/sm750.h +0
-0
drivers/staging/sm750fb/sm750.h struct init_status { · line 53
Quoted 5 lines
drivers/staging/sm750fb/sm750.h +1
-1@@ -50,7 +50,7 @@ struct init_status {struct lynx_accel {/* base virtual address of DPR registers */ -volatile unsigned char __iomem *dprBase; +volatile unsigned char __iomem *dpr_base;
Are you sure this isn't coming directly from a hardware data sheet or description somewhere? Based on the type, it really looks like it is. If not, please document it properly that you have researched this in the changelog text when resending.
Don't change variable names that reflect external names, that just makes for more confusion over time.
thanks,
greg k-h
PATCH 2/2 staging: sm750fb: rename dpPortBase in lynx_accel
In reply to Eric FlorinRename dpPortBase to dp_port_base to conform with kernel style guidelines as reported by checkpatch.pl
CHECK: Avoid CamelCase: <dpPortBase>
--- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_accel.c | 2 +- drivers/staging/sm750fb/sm750_hw.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/sm750fb/sm750.h +1 -1
@@ -52,7 +52,7 @@ struct lynx_accel {/* base virtual address of DPR registers */ volatile unsigned char __iomem *dpr_base;/* base virtual address of de data port */ -volatile unsigned char __iomem *dpPortBase; +volatile unsigned char __iomem *dp_port_base;/* function pointers */ void (*de_init)(struct lynx_accel *accel);
drivers/staging/sm750fb/sm750_accel.c +1 -1
@@ -29,7 +29,7 @@ static inline u32 read_dpr(struct lynx_accel *accel, int offset)static inline void write_dpPort (struct lynx_accel *accel,u32 data) { -writel (data, accel->dpPortBase); +writel (data, accel->dp_port_base); }void sm750_hw_de_init (struct lynx_accel *accel)
drivers/staging/sm750fb/sm750_hw.c +1 -1
@@ -59,7 +59,7 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)pr_info ("mmio virtual addr = %p\n" , sm750_dev->pvReg); sm750_dev->accel.dpr_base = sm750_dev->pvReg +DE_BASE_ADDR_TYPE1 ; - sm750_dev->accel.dpPortBase = sm750_dev->pvReg +DE_PORT_ADDR_TYPE1 ; + sm750_dev->accel.dp_port_base = sm750_dev->pvReg +DE_PORT_ADDR_TYPE1 ; mmio750 = sm750_dev->pvReg;sm750_set_chip_type (sm750_dev->devid, sm750_dev->revid);
Signature · 1 line
2.49.0.1112.g889b7c5bd8-goog
Greg KH
maintainerRe: [PATCH 2/2] staging: sm750fb: rename dpPortBase in lynx_accel
Quoted 17 lines · Eric Florin
Rename
dpPortBasetodp_port_baseto conform with kernel style guidelines as reported by checkpatch.plCHECK: Avoid CamelCase: <dpPortBase>
Signed-off-by Eric Florin <[email protected]>--- drivers/staging/sm750fb/sm750.h | 2 +- drivers/staging/sm750fb/sm750_accel.c | 2 +- drivers/staging/sm750fb/sm750_hw.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)drivers/staging/sm750fb/sm750.h +0
-0
drivers/staging/sm750fb/sm750.h struct lynx_accel { · line 55
Quoted 5 lines
drivers/staging/sm750fb/sm750.h +1
-1@@ -52,7 +52,7 @@ struct lynx_accel {/* base virtual address of DPR registers */ volatile unsigned char __iomem *dpr_base;/* base virtual address of de data port */ -volatile unsigned char __iomem *dpPortBase; +volatile unsigned char __iomem *dp_port_base;
Same here, are you sure this doesn't come directly from the hardware spec?
thanks,
greg k-h