[PATCH] staging: sm750fb: Fix CamelCase variable naming

Subsystems: staging - silicon motion sm750 frame buffer driver, staging subsystem, the rest

STALE574d

4 messages, 2 authors, 2025-03-06 · open the first message on its own page

[PATCH] staging: sm750fb: Fix CamelCase variable naming

From: Gabriel Lima Luz <hidden>
Date: 2025-02-28 16:24:05

Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Avoid CamelCase

Signed-off-by: Gabriel Lima Luz <redacted>
---
 drivers/staging/sm750fb/ddk750_power.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index 63c9e8b6ffb3..33e852fe6949 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -3,10 +3,10 @@
 #define DDK750_POWER_H__
 
 enum dpms {
-	crtDPMS_ON = 0x0,
-	crtDPMS_STANDBY = 0x1,
-	crtDPMS_SUSPEND = 0x2,
-	crtDPMS_OFF = 0x3,
+	crt_DPMS_ON = 0x0,
+	crt_DPMS_STANDBY = 0x1,
+	crt_DPMS_SUSPEND = 0x2,
+	crt_DPMS_OFF = 0x3,
 };
 
 #define set_DAC(off) {							\
-- 
2.43.0

Re: [PATCH] staging: sm750fb: Fix CamelCase variable naming

From: Dan Carpenter <hidden>
Date: 2025-02-28 17:40:06

On Fri, Feb 28, 2025 at 01:23:54PM -0300, Gabriel Lima Luz wrote:
quoted hunk
Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Avoid CamelCase

Signed-off-by: Gabriel Lima Luz <redacted>
---
 drivers/staging/sm750fb/ddk750_power.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index 63c9e8b6ffb3..33e852fe6949 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -3,10 +3,10 @@
 #define DDK750_POWER_H__
 
 enum dpms {
-	crtDPMS_ON = 0x0,
-	crtDPMS_STANDBY = 0x1,
-	crtDPMS_SUSPEND = 0x2,
-	crtDPMS_OFF = 0x3,
+	crt_DPMS_ON = 0x0,
+	crt_DPMS_STANDBY = 0x1,
+	crt_DPMS_SUSPEND = 0x2,
+	crt_DPMS_OFF = 0x3,
 };
 
It seems these are not used.  Just delete them.

regards,
dan carpenter

Re: [PATCH] staging: sm750fb: Fix CamelCase variable naming

From: Gabriel Lima Luz <hidden>
Date: 2025-03-06 19:40:10

Em sex, 2025-02-28 às 20:40 +0300, Dan Carpenter escreveu:
On Fri, Feb 28, 2025 at 01:23:54PM -0300, Gabriel Lima Luz wrote:
quoted
Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Avoid CamelCase

Signed-off-by: Gabriel Lima Luz <redacted>
---
 drivers/staging/sm750fb/ddk750_power.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_power.h
b/drivers/staging/sm750fb/ddk750_power.h
index 63c9e8b6ffb3..33e852fe6949 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -3,10 +3,10 @@
 #define DDK750_POWER_H__
 
 enum dpms {
-	crtDPMS_ON = 0x0,
-	crtDPMS_STANDBY = 0x1,
-	crtDPMS_SUSPEND = 0x2,
-	crtDPMS_OFF = 0x3,
+	crt_DPMS_ON = 0x0,
+	crt_DPMS_STANDBY = 0x1,
+	crt_DPMS_SUSPEND = 0x2,
+	crt_DPMS_OFF = 0x3,
 };
 
It seems these are not used.  Just delete them.

regards,
dan carpenter
The dpms enum is used in the definition of the 
ddk750_set_dpms function in ddk750_power.h file and
this function is called in ddk750_display.c on line 158.

If I were to delete it, what changes should I make to 
the function mentioned above ? 

this is my first contribution, thanks for all the help.

best regards,
Gabriel Lima

Re: [PATCH] staging: sm750fb: Fix CamelCase variable naming

From: Dan Carpenter <hidden>
Date: 2025-03-06 20:08:49

On Thu, Mar 06, 2025 at 04:40:05PM -0300, Gabriel Lima Luz wrote:
Em sex, 2025-02-28 às 20:40 +0300, Dan Carpenter escreveu:
quoted
On Fri, Feb 28, 2025 at 01:23:54PM -0300, Gabriel Lima Luz wrote:
quoted
Adhere to Linux kernel coding style.

Reported by checkpatch:

CHECK: Avoid CamelCase

Signed-off-by: Gabriel Lima Luz <redacted>
---
 drivers/staging/sm750fb/ddk750_power.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sm750fb/ddk750_power.h
b/drivers/staging/sm750fb/ddk750_power.h
index 63c9e8b6ffb3..33e852fe6949 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -3,10 +3,10 @@
 #define DDK750_POWER_H__
 
 enum dpms {
-	crtDPMS_ON = 0x0,
-	crtDPMS_STANDBY = 0x1,
-	crtDPMS_SUSPEND = 0x2,
-	crtDPMS_OFF = 0x3,
+	crt_DPMS_ON = 0x0,
+	crt_DPMS_STANDBY = 0x1,
+	crt_DPMS_SUSPEND = 0x2,
+	crt_DPMS_OFF = 0x3,
 };
 
It seems these are not used.  Just delete them.

regards,
dan carpenter
The dpms enum is used in the definition of the 
ddk750_set_dpms function in ddk750_power.h file and
this function is called in ddk750_display.c on line 158.

If I were to delete it, what changes should I make to 
the function mentioned above ? 

this is my first contribution, thanks for all the help.
Huh.  Using a enum for shifting isn't the right thing.  It should
be unsigned int.

The enum does serve as documentation.  Maybe just change it to
a comment or something next to the ddk750_set_dpms() function.

The ddk750_set_dpms() function does a weird thing:

	value = (value & ~SYSTEM_CTRL_DPMS_MASK) | state;

state is something in 0x3 but SYSTEM_CTRL_DPMS_MASK is
(0x3u << 30).  I bet it should match the on both sides of the
if statement:

	value = (value & ~SYSTEM_CTRL_DPMS_MASK) | (state << 30);

But I can't test it so who knows?

regards,
dan carpenter

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help