Skip to contentSkip to conversation

mfd: cgbc-core: cleanup signedness in cgbc_session_request()

PATCH Applied Dan Carpenter 2 participants 2 messages Mar 12, 2025 – Mar 14, 2025

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

PATCH 1/1 mfd: cgbc-core: cleanup signedness in cgbc_session_request()

This doesn't affect how the code works because there are some implicit casts, but the "ret" variable is used to hold negative error codes so it should be type int.

Declare it as "int" instead of "unsigned int".

---
 drivers/mfd/cgbc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/cgbc-core.c +1 -1
index 85283c8dde25..0b3788c2c1af 100644
@@ -96,7 +96,7 @@ static int cgbc_session_command(struct cgbc_device_data *cgbc, u8 cmd)
 
 static int cgbc_session_request(struct cgbc_device_data *cgbc)
 {
-	unsigned int ret;
+	int ret;
 
 	ret = cgbc_wait_device(cgbc);
 
Signature · 1 line
2.47.2
maintainer Applied
#1 lore raw

Re: (subset) [PATCH] mfd: cgbc-core: cleanup signedness in cgbc_session_request()

Quoted 8 lines · Dan Carpenter

This doesn't affect how the code works because there are some implicit casts, but the "ret" variable is used to hold negative error codes so it should be type int.

Declare it as "int" instead of "unsigned int".

[...]

Applied, thanks!

[1/1] mfd: cgbc-core: cleanup signedness in cgbc_session_request()

      commit: 3ce71a089364813c5ca953d7bf527b6ba477d5da

--
Lee Jones [李琼斯]