netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification()
@ 2022-11-15 13:09 Dan Carpenter
  2022-11-15 14:22 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-11-15 13:09 UTC (permalink / raw)
  To: Sergey Shtylyov, Yoshihiro Shimoda
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, netdev, linux-renesas-soc, kernel-janitors

The rswitch_etha_wait_link_verification() is supposed to return zero
on success or negative error codes.  Unfortunately it is declared as a
bool so the caller treats everything as success.

Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/ethernet/renesas/rswitch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index f0168fedfef9..231e8c688b89 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -920,7 +920,7 @@ static void rswitch_etha_write_mac_address(struct rswitch_etha *etha, const u8 *
 		  etha->addr + MRMAC1);
 }
 
-static bool rswitch_etha_wait_link_verification(struct rswitch_etha *etha)
+static int rswitch_etha_wait_link_verification(struct rswitch_etha *etha)
 {
 	iowrite32(MLVC_PLV, etha->addr + MLVC);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification()
  2022-11-15 13:09 [PATCH net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() Dan Carpenter
@ 2022-11-15 14:22 ` Geert Uytterhoeven
  2022-11-15 23:37 ` Yoshihiro Shimoda
  2022-11-17 13:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2022-11-15 14:22 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Sergey Shtylyov, Yoshihiro Shimoda, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Andrew Lunn, netdev,
	linux-renesas-soc, kernel-janitors

On Tue, Nov 15, 2022 at 2:14 PM Dan Carpenter <error27@gmail.com> wrote:
> The rswitch_etha_wait_link_verification() is supposed to return zero
> on success or negative error codes.  Unfortunately it is declared as a
> bool so the caller treats everything as success.
>
> Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification()
  2022-11-15 13:09 [PATCH net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() Dan Carpenter
  2022-11-15 14:22 ` Geert Uytterhoeven
@ 2022-11-15 23:37 ` Yoshihiro Shimoda
  2022-11-17 13:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Yoshihiro Shimoda @ 2022-11-15 23:37 UTC (permalink / raw)
  To: Dan Carpenter, Sergey Shtylyov
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, netdev@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org,
	kernel-janitors@vger.kernel.org

Hi Dan,

> From: Dan Carpenter, Sent: Tuesday, November 15, 2022 10:10 PM
> 
> The rswitch_etha_wait_link_verification() is supposed to return zero
> on success or negative error codes.  Unfortunately it is declared as a
> bool so the caller treats everything as success.
> 
> Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda

> ---
>  drivers/net/ethernet/renesas/rswitch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
> index f0168fedfef9..231e8c688b89 100644
> --- a/drivers/net/ethernet/renesas/rswitch.c
> +++ b/drivers/net/ethernet/renesas/rswitch.c
> @@ -920,7 +920,7 @@ static void rswitch_etha_write_mac_address(struct rswitch_etha *etha, const u8 *
>  		  etha->addr + MRMAC1);
>  }
> 
> -static bool rswitch_etha_wait_link_verification(struct rswitch_etha *etha)
> +static int rswitch_etha_wait_link_verification(struct rswitch_etha *etha)
>  {
>  	iowrite32(MLVC_PLV, etha->addr + MLVC);
> 
> --
> 2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification()
  2022-11-15 13:09 [PATCH net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() Dan Carpenter
  2022-11-15 14:22 ` Geert Uytterhoeven
  2022-11-15 23:37 ` Yoshihiro Shimoda
@ 2022-11-17 13:40 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-17 13:40 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: s.shtylyov, yoshihiro.shimoda.uh, davem, edumazet, kuba, pabeni,
	andrew, netdev, linux-renesas-soc, kernel-janitors

Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 15 Nov 2022 16:09:55 +0300 you wrote:
> The rswitch_etha_wait_link_verification() is supposed to return zero
> on success or negative error codes.  Unfortunately it is declared as a
> bool so the caller treats everything as success.
> 
> Fixes: 3590918b5d07 ("net: ethernet: renesas: Add support for "Ethernet Switch"")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification()
    https://git.kernel.org/netdev/net-next/c/b4b221bd79a1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-17 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 13:09 [PATCH net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() Dan Carpenter
2022-11-15 14:22 ` Geert Uytterhoeven
2022-11-15 23:37 ` Yoshihiro Shimoda
2022-11-17 13:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).