Skip to contentSkip to conversation

staging: sm750fb: style cleanup in `lynx_accel`

PATCH In review Eric Florin 2 participants 5 messages May 18, 2025 – May 21, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index aff69661c8e6..a2342c69a65a 100644
@@ -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
index 44b9e3fe3a41..97791f1b0123 100644
@@ -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
index 64b199061d14..159a5ad621f2 100644
@@ -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
maintainer
#2 lore raw

Re: [PATCH 1/2] staging: sm750fb: rename dprBase to dpr_base

Quoted 17 lines · Eric Florin

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 +0 -0
index aff69661c8e6..a2342c69a65a 100644

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

#3 lore raw

PATCH 2/2 staging: sm750fb: rename dpPortBase in lynx_accel

In reply to Eric Florin

Rename 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
index a2342c69a65a..0ed1e18611ba 100644
@@ -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
index 97791f1b0123..7ac2e7b6ea0f 100644
@@ -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
index 159a5ad621f2..75ceb594fcb1 100644
@@ -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
maintainer
#4 lore raw

Re: [PATCH 2/2] staging: sm750fb: rename dpPortBase in lynx_accel

Quoted 17 lines · Eric Florin

Rename 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 +0 -0
index a2342c69a65a..0ed1e18611ba 100644

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