Skip to contentSkip to conversation

Rename Variables in sm750fb driver

PATCH Superseded Dorine Tipo 2 participants 10 messages Mar 7, 2024

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Rename Variables in sm750fb driver

Hello,

This V2 series addresses the Avoid CamelCase checkpatch warning by renaming the variables in sm750fb driver to use snake_case.

Patch 1 renames variable sii164GetDeviceID to sii164_get_device_id.

Patch 2 renames variable sii164ResetChip to sii164_reset_chip.

Patch 3 renames variable sii164GetChipString to sii164_get_chip_string.

Patch 4 renames variable sii164SetPower to sii164_set_power.

Patch 5 renames variable sii164EnableHotPlugDetection to sii164_enable_hot_plug_detection.

Patch 6 renames variable sii164IsConnected to sii164_is_connected.

Patch 7 renames variable sii164CheckInterrupt to sii164_check_interrupt.

Patch 8 renames variable sii164ClearInterrupt to sii164_clear_interrupt.

Updates since V1:
Incorporated feedback from <[email protected]> to fix the warnings in the patches and create a patch series for the same. I have also compiled the entire kernel and it compiled successfully. (I understand this is not sufficient and would be happy to run further tests. Should I run kselftests on the module?)

Dorine Tipo (8):
Staging: sm750fb: Rename variable sii164GetDeviceID
Staging: sm750fb: Rename sii164ResetChip
Staging: sm750fb: Rename variable sii164GetChipString
Staging: sm750fb: Rename variable sii164SetPower
Staging: sm750fb: Rename variable sii164EnableHotPlugDetection
Staging: sm750fb: Rename variable sii164IsConnected
Staging: sm750fb: Rename variable sii164CheckInterrupt
Staging: sm750fb: Rename Variable sii164ClearInterrupt

 drivers/staging/sm750fb/ddk750_dvi.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--
2.25.1

#1 lore raw

PATCH v2 1/8 Staging: sm750fb: Rename variable sii164GetDeviceID

Rename variable sii164GetDeviceID to sii164_get_device_id to silence checkpatch warning Avoid CamelCase

---
V2: Added the patch to a series.
Fixed erroers within the patch.
Compiled the kernel

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index 8b81e8642f9e..3fb14eff2de1 100644
@@ -16,7 +16,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 	{
 		.init = sii164_init_chip,
 		.get_vendor_id = sii164_get_vendor_id,
-		.get_device_id = sii164GetDeviceID,
+		.get_device_id = sii164_get_device_id,
 #ifdef SII164_FULL_FUNCTIONS
 		.reset_chip = sii164ResetChip,
 		.get_chip_string = sii164GetChipString,

--
2.25.1

#2 lore raw

Re: [PATCH v2 1/8] Staging: sm750fb: Rename variable sii164GetDeviceID

Quoted 17 lines · Dorine Tipo

Rename variable sii164GetDeviceID to sii164_get_device_id to silence checkpatch warning Avoid CamelCase

---
V2: Added the patch to a series.
Fixed erroers within the patch.
Compiled the kernel

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +0 -0
index 8b81e8642f9e..3fb14eff2de1 100644

drivers/staging/sm750fb/ddk750_dvi.c static struct dvi_ctrl_device dcft_supported_dvi_controller[] = { · line 19

Quoted 5 lines
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
@@ -16,7 +16,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 	{
 		.init = sii164_init_chip,
 		.get_vendor_id = sii164_get_vendor_id,
-		.get_device_id = sii164GetDeviceID,
+		.get_device_id = sii164_get_device_id,

You have to compile the kernel after every patch. Like apply *just* this patch, then rebuild. It breaks.

regards,
dan carpenter

#3 lore raw

PATCH v2 2/8 Staging: sm750fb: Rename sii164ResetChip

In reply to Dorine Tipo

Rename variable sii164ResetChip to sii164_reset_chip to silence checkpatch warning Avoid CamelCase

---
V2: Added patch to series
Fixed patch warnings
Compiled the kernel

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index 3fb14eff2de1..6dee95e60a6e 100644
@@ -18,7 +18,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 		.get_vendor_id = sii164_get_vendor_id,
 		.get_device_id = sii164_get_device_id,
 #ifdef SII164_FULL_FUNCTIONS
-		.reset_chip = sii164ResetChip,
+		.reset_chip = sii164_reset_chip,
 		.get_chip_string = sii164GetChipString,
 		.set_power = sii164SetPower,
 		.enable_hot_plug_detection = sii164EnableHotPlugDetection,

--
2.25.1

#4 lore raw

PATCH v2 3/8 Staging: sm750fb: Rename variable sii164GetChipString

In reply to Dorine Tipo

Rename variable sii164GetChipString to sii164_get_chip_string to fix checkpatch warning Avoid CamelCase.

---
V2: fixed the name in the commit message.
Added the patch to the series.
Compiled the kernel to test the changes.

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index 6dee95e60a6e..e568c210e2bd 100644
@@ -19,7 +19,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 		.get_device_id = sii164_get_device_id,
 #ifdef SII164_FULL_FUNCTIONS
 		.reset_chip = sii164_reset_chip,
-		.get_chip_string = sii164GetChipString,
+		.get_chip_string = sii164_get_chip_string,
 		.set_power = sii164SetPower,
 		.enable_hot_plug_detection = sii164EnableHotPlugDetection,
 		.is_connected = sii164IsConnected,

--
2.25.1

#5 lore raw

PATCH v2 4/8 Staging: sm750fb: Rename variable sii164SetPower

In reply to Dorine Tipo

Rename variable sii164SetPower to sii164_set_power to silence checkpatch warning Avoid CamelCase

---
V2: Added patch to series
Fixed patch warnings
Compiled the kernel to test my changes

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index e568c210e2bd..c12df1f9fb00 100644
@@ -20,7 +20,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 #ifdef SII164_FULL_FUNCTIONS
 		.reset_chip = sii164_reset_chip,
 		.get_chip_string = sii164_get_chip_string,
-		.set_power = sii164SetPower,
+		.set_power = sii164_set_power,
 		.enable_hot_plug_detection = sii164EnableHotPlugDetection,
 		.is_connected = sii164IsConnected,
 		.check_interrupt = sii164CheckInterrupt,

--
2.25.1

#6 lore raw

PATCH v2 5/8 Staging: sm750fb: Rename variable sii164EnableHotPlugDetection

In reply to Dorine Tipo

Rename variable sii164EnableHotPlugDetection to sii164_enable_hot_plug_detection to silence checkpatch warning Avoid CamelCase

---
V2: Added patch to series
Fixed patch warnings
Compiled the kernel

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index c12df1f9fb00..1ce44c50617a 100644
@@ -21,7 +21,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 		.reset_chip = sii164_reset_chip,
 		.get_chip_string = sii164_get_chip_string,
 		.set_power = sii164_set_power,
-		.enable_hot_plug_detection = sii164EnableHotPlugDetection,
+		.enable_hot_plug_detection = sii164_enable_hot_plug_detection,
 		.is_connected = sii164IsConnected,
 		.check_interrupt = sii164CheckInterrupt,
 		.clear_interrupt = sii164ClearInterrupt,

--
2.25.1

#7 lore raw

PATCH v2 6/8 Staging: sm750fb: Rename variable sii164IsConnected

In reply to Dorine Tipo

Rename variable sii164IsConnected to sii164_is_connected to silence the checkpatch warning Avoid CamelCase

---
V2: Added patch to series
compiled the kernel

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index 1ce44c50617a..ac1aab77da28 100644
@@ -22,7 +22,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 		.get_chip_string = sii164_get_chip_string,
 		.set_power = sii164_set_power,
 		.enable_hot_plug_detection = sii164_enable_hot_plug_detection,
-		.is_connected = sii164IsConnected,
+		.is_connected = sii164_is_connected,
 		.check_interrupt = sii164CheckInterrupt,
 		.clear_interrupt = sii164ClearInterrupt,
 #endif

--
2.25.1

#8 lore raw

PATCH v2 7/8 Staging: sm750fb: Rename variable sii164CheckInterrupt

In reply to Dorine Tipo

Rename variable sii164CheckInterrupt to sii164_check_interrupt to silence checkpatch warning Avoid CamelCase

---
V2: Added patch to series
Compiled the kernel successfully

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index ac1aab77da28..1def02be4cce 100644
@@ -23,7 +23,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 		.set_power = sii164_set_power,
 		.enable_hot_plug_detection = sii164_enable_hot_plug_detection,
 		.is_connected = sii164_is_connected,
-		.check_interrupt = sii164CheckInterrupt,
+		.check_interrupt = sii164_check_interrupt,
 		.clear_interrupt = sii164ClearInterrupt,
 #endif
 	},

--
2.25.1

#9 lore raw

PATCH v2 8/8 Staging: sm750fb: Rename Variable sii164ClearInterrupt

In reply to Dorine Tipo

Rename variable sii164ClearInterrupt to sii164_clear_interrupt to fix a checkpatch warning

---
V2: Added patch to series
Compiled the kernel

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index 1def02be4cce..6fef1ab484c1 100644
@@ -24,7 +24,7 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
 		.enable_hot_plug_detection = sii164_enable_hot_plug_detection,
 		.is_connected = sii164_is_connected,
 		.check_interrupt = sii164_check_interrupt,
-		.clear_interrupt = sii164ClearInterrupt,
+		.clear_interrupt = sii164_clear_interrupt,
 #endif
 	},
 #endif

--
2.25.1