diff mbox series

[net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification()

Message ID Y3OPo6AOL6PTvXFU@kili (mailing list archive)
State Accepted
Commit b4b221bd79a1c698d9653e3ae2c3cb61cdc9aee7
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ethernet: renesas: Fix return type in rswitch_etha_wait_link_verification() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: From:/Signed-off-by: email address mismatch: 'From: Dan Carpenter <error27@gmail.com>' != 'Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>'
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter Nov. 15, 2022, 1:09 p.m. UTC
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(-)

Comments

Geert Uytterhoeven Nov. 15, 2022, 2:22 p.m. UTC | #1
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
Yoshihiro Shimoda Nov. 15, 2022, 11:37 p.m. UTC | #2
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
patchwork-bot+netdevbpf@kernel.org Nov. 17, 2022, 1:40 p.m. UTC | #3
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!
diff mbox series

Patch

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);