* [PATCH] mfd: cgbc-core: cleanup signedness in cgbc_session_request()
@ 2025-03-12 8:34 Dan Carpenter
2025-03-14 11:48 ` (subset) " Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-03-12 8:34 UTC (permalink / raw)
To: Thomas Richard; +Cc: Lee Jones, linux-kernel, kernel-janitors
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".
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/mfd/cgbc-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
index 85283c8dde25..0b3788c2c1af 100644
--- a/drivers/mfd/cgbc-core.c
+++ b/drivers/mfd/cgbc-core.c
@@ -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);
--
2.47.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: (subset) [PATCH] mfd: cgbc-core: cleanup signedness in cgbc_session_request()
2025-03-12 8:34 [PATCH] mfd: cgbc-core: cleanup signedness in cgbc_session_request() Dan Carpenter
@ 2025-03-14 11:48 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2025-03-14 11:48 UTC (permalink / raw)
To: Thomas Richard, Dan Carpenter; +Cc: Lee Jones, linux-kernel, kernel-janitors
On Wed, 12 Mar 2025 11:34:50 +0300, Dan Carpenter wrote:
> 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 [李琼斯]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-14 11:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-12 8:34 [PATCH] mfd: cgbc-core: cleanup signedness in cgbc_session_request() Dan Carpenter
2025-03-14 11:48 ` (subset) " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®