Skip to contentSkip to conversation

Rename variables in sm750fb driver

PATCH In review Dorine Tipo 4 participants 16 messages Mar 7, 2024 – Mar 9, 2024

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

v3 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?)

Updates since V2:
Incorporated feedback from <[email protected]> and reverted the sii164GetDeviceID since it breaks the build.

Dorine Tipo (8):
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 Revert "Staging: sm750fb: Rename variable sii164GetDeviceID"

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

--
2.25.1

#1 lore raw

PATCH v3 1/8 Staging: sm750fb: Rename sii164ResetChip

Rename variable sii164ResetChip to sii164_reset_chip to silence checkpatch warning Avoid CamelCase

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

V3: Reverted a commit in the same patch series

 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

#2 lore raw

Re: [PATCH v3 1/8] Staging: sm750fb: Rename sii164ResetChip

Quoted 10 lines · Dorine Tipo

Rename variable sii164ResetChip to sii164_reset_chip to silence checkpatch warning Avoid CamelCase

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

V3: Reverted a commit in the same patch series

You we can't revert a patch which was never applied. Please wait at least a day between resends.

Quoted 9 lines
 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +0 -0
index 3fb14eff2de1..6dee95e60a6e 100644

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

Quoted 5 lines
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
@@ -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,

From looking at this patch you would assume that it would break the build but actually it seems that SII164_FULL_FUNCTIONS is never defined. The advice is always to just delete dead code.

We can't apply any of these patches...

regards,
dan carpenter

maintainer
#3 lore raw

Re: [PATCH v3 1/8] Staging: sm750fb: Rename sii164ResetChip

In reply to Dorine Tipo
Quoted 19 lines · Dorine Tipo

Rename variable sii164ResetChip to sii164_reset_chip to silence checkpatch warning Avoid CamelCase

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

V3: Reverted a commit in the same patch series

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

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

Quoted 8 lines
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
@@ -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,

You did not compile with this change applied, did you?

If so, can you show us the steps you did? There still is a function called sii164ResetChip() in the tree after you apply this commit, and there is no function called sii164_reset_chip(), right?

confused,

greg k-h

#4 lore raw

Apology and Request for Resubmitting Patch

In reply to Dorine Tipo

Dear maintainers,

I hope this message finds you well. I am writing to offer my sincere apologies for the frustration and disappointment caused by my recent submissions of patches with unresolved issues.

Upon careful investigation into the issue to debug the problem, I realize that my approach to addressing checkpatch warnings in the code was incomplete. While I corrected the assignments of variables to resolve the warnings, I neglected to rectify the corresponding declarations of these variables.
I understand that this oversight not only failed to meet the standards expected of contributions but also created unnecessary work for you as maintainers.

I take full responsibility for my actions and the impact they have had on the project and your workload. Please accept my heartfelt apologies for any inconvenience and frustration caused.

In light of this, I would like to request the opportunity to resubmit a new patch that addresses both the assignment and declaration of the variables to resolve the issue effectively. To ensure that such oversights are not repeated in the future, I am committed to implementing stricter review processes and improving my attention to detail.

#5 lore raw

Re: Apology and Request for Resubmitting Patch

Quoted 13 lines · Dorine Tipo

Dear maintainers,

I hope this message finds you well. I am writing to offer my sincere apologies for the frustration and disappointment caused by my recent submissions of patches with unresolved issues.

Upon careful investigation into the issue to debug the problem, I realize that my approach to addressing checkpatch warnings in the code was incomplete. While I corrected the assignments of variables to resolve the warnings, I neglected to rectify the corresponding declarations of these variables.
I understand that this oversight not only failed to meet the standards expected of contributions but also created unnecessary work for you as maintainers.

Quoted 7 lines

I take full responsibility for my actions and the impact they have had on the project and your workload. Please accept my heartfelt apologies for any inconvenience and frustration caused.

In light of this, I would like to request the opportunity to resubmit a new patch that addresses both the assignment and declaration of the variables to resolve the issue effectively. To ensure that such oversights are not repeated in the future, I am committed to implementing stricter review processes and improving my attention to detail.

No need to apologize. The point is to learn. Compiling Linux kernel code is also complex, due to the intervention of ifdefs.

I would suggest to just throw away what you have done so far, pull Greg's tree again, and start over. You can also be a bit less ambitious, and just do one thing. When that is accepted, you can go on from there.

Good luck!

julia

#7 lore raw

PATCH v3 2/8 Staging: sm750fb: Rename variable sii164GetChipString

In reply to Dorine Tipo

Rename variable sii164GetChipString to sii164Get_chip_string to fix checkpatch warning Avoid CamelCase

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

V3: Reverted a commit in the same patch series

 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

#8 lore raw

PATCH v3 3/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 the patch to a series.
Fixed errors within the patch.
Compiled the kernel

V3: Reverted a commit in the same patch series

 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

#9 lore raw

PATCH v3 4/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 the patch to a series.
Fixed errors within the patch.
Compiled the kernel

V3: Reverted a commit in the same patch series

 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

#10 lore raw

PATCH v3 5/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 the patch to a series.
Compiled the kernel

V3: Reverted a commit in the same patch series

 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

#11 lore raw

PATCH v3 6/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 the patch to a series.
Compiled the kernel

V3: Reverted a commit in the same patch series

 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

#12 lore raw

PATCH v3 7/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 the patch to a series.
Compiled the kernel

V3: Reverted a commit in the same patch series

 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

#13 lore raw

PATCH v3 8/8 Revert "Staging: sm750fb: Rename variable sii164GetDeviceID"

In reply to Dorine Tipo

This reverts commit 30c83463c8dcdc808d4f10d44c5a4f19d3b5f1f4.

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

V3: Reverted a commit in this commit

 drivers/staging/sm750fb/ddk750_dvi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_dvi.c +1 -1
index 6fef1ab484c1..c572967bcd1a 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 = sii164_get_device_id,
+		.get_device_id = sii164GetDeviceID,
 #ifdef SII164_FULL_FUNCTIONS
 		.reset_chip = sii164_reset_chip,
 		.get_chip_string = sii164_get_chip_string,

--
2.25.1

maintainer
#14 lore raw

Re: [PATCH v3 8/8] Revert "Staging: sm750fb: Rename variable sii164GetDeviceID"

Quoted 1 line · Dorine Tipo

This reverts commit 30c83463c8dcdc808d4f10d44c5a4f19d3b5f1f4.

This is not an object in Linus's tree, or my development tree, it is local only to your tree, right?

And you aren't saying _why_ it must be reverted, what is wrong with it?

confused,

greg k-h

#15 lore raw
In reply to Dorine Tipo
Quoted 29 lines · Dorine Tipo

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?)

Quoted 3 lines

Updates since V2:
Incorporated feedback from <[email protected]> and reverted the sii164GetDeviceID since it breaks the build.

Hello Dorine.

Thank you for your efforts.

However, I don't understand how you can just change a variable reference and not change the definition at the same time. So I wonder how any of the patches can compile. Are there some ifdefs that mean that the code is actually ignores?

Do you get a .o file for the relevant file? If so, do you see any ifdefs in the code that might affect the code you changed?

julia

Quoted 19 lines

Dorine Tipo (8):
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 Revert "Staging: sm750fb: Rename variable sii164GetDeviceID"

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

--
2.25.1