Skip to contentSkip to conversation

leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

PATCH Applied SurajSonawane2415 2 participants 10 messages Oct 6, 2024 – Oct 16, 2024

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

PATCH 1/1 leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

---
 drivers/leds/rgb/leds-mt6370-rgb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/rgb/leds-mt6370-rgb.c +1 -1
index 10a0b5b45..87805c21e 100644
@@ -587,7 +587,7 @@ static inline int mt6370_mc_pattern_clear(struct led_classdev *lcdev)
 	struct mt6370_led *led = container_of(mccdev, struct mt6370_led, mc);
 	struct mt6370_priv *priv = led->priv;
 	struct mc_subled *subled;
-	int i, ret;
+	int i, ret = 0;
 
 	mutex_lock(&led->priv->lock);
 
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 8 lines · On Sun, 06 Oct 2024, SurajSonawane2415 wrote:

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

Real names only. Please update your .gitconfig.

Quoted 20 lines
---
 drivers/leds/rgb/leds-mt6370-rgb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/rgb/leds-mt6370-rgb.c +1 -1
index 10a0b5b45..87805c21e 100644
@@ -587,7 +587,7 @@ static inline int mt6370_mc_pattern_clear(struct led_classdev *lcdev)
 	struct mt6370_led *led = container_of(mccdev, struct mt6370_led, mc);
 	struct mt6370_priv *priv = led->priv;
 	struct mc_subled *subled;
-	int i, ret;
+	int i, ret = 0;
 
 	mutex_lock(&led->priv->lock);
 
Signature · 1 line
2.34.1
Signature · 1 line
Lee Jones [李琼斯]
#2 lore raw
Quoted 28 lines · Lee Jones
Quoted 8 lines · On Sun, 06 Oct 2024, SurajSonawane2415 wrote:

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

Real names only. Please update your .gitconfig.

Quoted 15 lines
---
  drivers/leds/rgb/leds-mt6370-rgb.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/rgb/leds-mt6370-rgb.c +1 -1
index 10a0b5b45..87805c21e 100644
@@ -587,7 +587,7 @@ static inline int mt6370_mc_pattern_clear(struct led_classdev *lcdev)
  	struct mt6370_led *led = container_of(mccdev, struct mt6370_led, mc);
  	struct mt6370_priv *priv = led->priv;
  	struct mc_subled *subled;
-	int i, ret;
+	int i, ret = 0;
 
Quoted 6 lines
Quoted 5 lines
drivers/leds/rgb/leds-mt6370-rgb.c +0 -0
  	mutex_lock(&led->priv->lock);
 
Signature · 1 line
2.34.1

Thanks for the feedback. I'll update my .gitconfig to use my real name for future patches.

Best regards,
Suraj Sonawane

maintainer Applied
#3 lore raw

Re: (subset) [PATCH] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

In reply to SurajSonawane2415
Quoted 8 lines · On Sun, 06 Oct 2024 18:43:37 +0530, SurajSonawane2415 wrote:

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

[...]

Applied, thanks!

[1/1] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

      commit: b5a5659aebfffbcddb81abafe042fb4044b6ff9e

--
Lee Jones [李琼斯]

#4 lore raw

Re: (subset) [PATCH] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

Quoted 10 lines · Lee Jones
Quoted 8 lines · On Sun, 06 Oct 2024 18:43:37 +0530, SurajSonawane2415 wrote:

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

[...]

Quoted 8 lines

Applied, thanks!

[1/1] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

       commit: b5a5659aebfffbcddb81abafe042fb4044b6ff9e

--
Lee Jones [李琼斯]

Thank you! I'm glad the patch was applied. I'll ensure future patches follow the necessary guidelines.

Best regards,
Suraj Sonawane

maintainer
#5 lore raw

Re: (subset) [PATCH] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

Quoted 13 lines · Suraj Sonawane
Quoted 12 lines · Lee Jones
Quoted 8 lines · On Sun, 06 Oct 2024 18:43:37 +0530, SurajSonawane2415 wrote:

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

[...]

Applied, thanks!

Quoted 8 lines
Quoted 6 lines

[1/1] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

       commit: b5a5659aebfffbcddb81abafe042fb4044b6ff9e

--
Lee Jones [李琼斯]

Thank you! I'm glad the patch was applied. I'll ensure future patches follow the necessary guidelines.

Sorry, this is a tooling error. The patch was not meant to be applied.

Please resubmit it using your updated .gitconfig file.

Signature · 1 line
Lee Jones [李琼斯]
#6 lore raw

PATCH v2 1/1 leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

---
V1 : https://lore.kernel.org/linux-arm-kernel/[email protected]/T/
V2 : Updated .gitconfig to use the real name "Suraj Sonawane" as per the feedback.

 drivers/leds/rgb/leds-mt6370-rgb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/rgb/leds-mt6370-rgb.c +1 -1
index 10a0b5b45..87805c21e 100644
@@ -587,7 +587,7 @@ static inline int mt6370_mc_pattern_clear(struct led_classdev *lcdev)
 	struct mt6370_led *led = container_of(mccdev, struct mt6370_led, mc);
 	struct mt6370_priv *priv = led->priv;
 	struct mc_subled *subled;
-	int i, ret;
+	int i, ret = 0;
 
 	mutex_lock(&led->priv->lock);
 
Signature · 1 line
2.34.1
maintainer Applied
#7 lore raw

Re: (subset) [PATCH v2] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

Quoted 8 lines · Suraj Sonawane

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

[...]

Applied, thanks!

[1/1] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

      commit: 6cbf5c99541ac681cf5c6155b582dfbcd879eae3

--
Lee Jones [李琼斯]

#8 lore raw

Re: (subset) [PATCH v2] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

Quoted 10 lines · Lee Jones
Quoted 8 lines · Suraj Sonawane

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

[...]

Quoted 8 lines

Applied, thanks!

[1/1] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

       commit: 6cbf5c99541ac681cf5c6155b582dfbcd879eae3

--
Lee Jones [李琼斯]

Thanks a lot!

#9 lore raw

Re: (subset) [PATCH] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

In reply to Lee Jones
Quoted 15 lines · Lee Jones
Quoted 15 lines · Lee Jones
Quoted 14 lines · On Sun, 06 Oct 2024 18:43:37 +0530, SurajSonawane2415 wrote:
Quoted 8 lines

Fix the uninitialized symbol 'ret' in the function mt6370_mc_pattern_clear to resolve the following warning:
drivers/leds/rgb/leds-mt6370-rgb.c:604 mt6370_mc_pattern_clear()
error: uninitialized symbol 'ret'.
Initialize 'ret' to 0 to prevent undefined behavior from uninitialized access.

[...]

Applied, thanks!

[1/1] leds: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear

        commit: b5a5659aebfffbcddb81abafe042fb4044b6ff9e
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

--
Lee Jones [李琼斯]

Thank you! I'm glad the patch was applied. I'll ensure future patches follow the necessary guidelines.

Sorry, this is a tooling error. The patch was not meant to be applied.

Please resubmit it using your updated .gitconfig file.

Thank you. I have updated my .gitconfig to use my real name "Suraj Sonawane" as requested and have resubmitted the patch.

Best regards,
Suraj Sonawane