* [PATCH] usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap()
@ 2024-07-12 14:05 Dan Carpenter
2024-07-15 7:11 ` Marco Felsch
2024-07-30 8:41 ` Heikki Krogerus
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2024-07-12 14:05 UTC (permalink / raw)
To: Marco Felsch
Cc: Heikki Krogerus, Greg Kroah-Hartman, RD Babiera, Guenter Roeck,
linux-usb, linux-kernel, kernel-janitors
The tcpci_check_std_output_cap() function is supposed to return negative
error codes but it's declared as type bool so the error handling doesn't
work. Declare it as an int instead.
Fixes: 62ce9ef14797 ("usb: typec: tcpci: add support to set connector orientation")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/usb/typec/tcpm/tcpci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
index 8a18d561b063..b5e49af48f43 100644
--- a/drivers/usb/typec/tcpm/tcpci.c
+++ b/drivers/usb/typec/tcpm/tcpci.c
@@ -67,7 +67,7 @@ static int tcpci_write16(struct tcpci *tcpci, unsigned int reg, u16 val)
return regmap_raw_write(tcpci->regmap, reg, &val, sizeof(u16));
}
-static bool tcpci_check_std_output_cap(struct regmap *regmap, u8 mask)
+static int tcpci_check_std_output_cap(struct regmap *regmap, u8 mask)
{
unsigned int reg;
int ret;
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap()
2024-07-12 14:05 [PATCH] usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap() Dan Carpenter
@ 2024-07-15 7:11 ` Marco Felsch
2024-07-30 8:41 ` Heikki Krogerus
1 sibling, 0 replies; 3+ messages in thread
From: Marco Felsch @ 2024-07-15 7:11 UTC (permalink / raw)
To: Dan Carpenter
Cc: Heikki Krogerus, Greg Kroah-Hartman, RD Babiera, Guenter Roeck,
linux-usb, linux-kernel, kernel-janitors
Hi,
On 24-07-12, Dan Carpenter wrote:
> The tcpci_check_std_output_cap() function is supposed to return negative
> error codes but it's declared as type bool so the error handling doesn't
> work. Declare it as an int instead.
sorry I missed this :/ in the first place, thank you for the fix.
> Fixes: 62ce9ef14797 ("usb: typec: tcpci: add support to set connector orientation")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap()
2024-07-12 14:05 [PATCH] usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap() Dan Carpenter
2024-07-15 7:11 ` Marco Felsch
@ 2024-07-30 8:41 ` Heikki Krogerus
1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2024-07-30 8:41 UTC (permalink / raw)
To: Dan Carpenter
Cc: Marco Felsch, Greg Kroah-Hartman, RD Babiera, Guenter Roeck,
linux-usb, linux-kernel, kernel-janitors
On Fri, Jul 12, 2024 at 09:05:50AM -0500, Dan Carpenter wrote:
> The tcpci_check_std_output_cap() function is supposed to return negative
> error codes but it's declared as type bool so the error handling doesn't
> work. Declare it as an int instead.
>
> Fixes: 62ce9ef14797 ("usb: typec: tcpci: add support to set connector orientation")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tcpm/tcpci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c
> index 8a18d561b063..b5e49af48f43 100644
> --- a/drivers/usb/typec/tcpm/tcpci.c
> +++ b/drivers/usb/typec/tcpm/tcpci.c
> @@ -67,7 +67,7 @@ static int tcpci_write16(struct tcpci *tcpci, unsigned int reg, u16 val)
> return regmap_raw_write(tcpci->regmap, reg, &val, sizeof(u16));
> }
>
> -static bool tcpci_check_std_output_cap(struct regmap *regmap, u8 mask)
> +static int tcpci_check_std_output_cap(struct regmap *regmap, u8 mask)
> {
> unsigned int reg;
> int ret;
> --
> 2.43.0
--
heikki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-30 8:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-12 14:05 [PATCH] usb: typec: tcpci: Fix error code in tcpci_check_std_output_cap() Dan Carpenter
2024-07-15 7:11 ` Marco Felsch
2024-07-30 8:41 ` Heikki Krogerus
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®