Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] bnx2x: correct a  mistake when show error code
@ 2020-08-29 10:36 Yi Li
  2020-08-29 11:00 ` Yi Li
  2020-08-30  7:58 ` [EXT] " Igor Russkikh
  0 siblings, 2 replies; 3+ messages in thread
From: Yi Li @ 2020-08-29 10:36 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: yilikernel, yili, kuba, davem, GR-everest-linux-l2, skalluru, aelior

use rc for error code.

Signed-off-by: Yi Li <yili@winhong.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 1426c691c7c4..0346771396ce 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -13562,9 +13560,8 @@ static int bnx2x_ext_phy_common_init(struct bnx2x *bp, u32 shmem_base_path[],
 	}
 
 	if (rc)
-		netdev_err(bp->dev,  "Warning: PHY was not initialized,"
-				      " Port %d\n",
-			 0);
+		netdev_err(bp->dev, "Warning: PHY was not initialized, Port %d\n",
+			   rc);
 	return rc;
 }
 
-- 
2.25.3




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

* Re: [PATCH] bnx2x: correct a mistake when show error code
  2020-08-29 10:36 [PATCH] bnx2x: correct a mistake when show error code Yi Li
@ 2020-08-29 11:00 ` Yi Li
  2020-08-30  7:58 ` [EXT] " Igor Russkikh
  1 sibling, 0 replies; 3+ messages in thread
From: Yi Li @ 2020-08-29 11:00 UTC (permalink / raw)
  To: Yi Li
  Cc: linux-kernel, netdev, kuba, davem, GR-everest-linux-l2, skalluru, aelior

It is useless.
The original code just tell some error info. and don't  show errorcode

On 8/29/20, Yi Li <yili@winhong.com> wrote:
> use rc for error code.
>
> Signed-off-by: Yi Li <yili@winhong.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
> index 1426c691c7c4..0346771396ce 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
> @@ -13562,9 +13560,8 @@ static int bnx2x_ext_phy_common_init(struct bnx2x
> *bp, u32 shmem_base_path[],
>  	}
>
>  	if (rc)
> -		netdev_err(bp->dev,  "Warning: PHY was not initialized,"
> -				      " Port %d\n",
> -			 0);
> +		netdev_err(bp->dev, "Warning: PHY was not initialized, Port %d\n",
> +			   rc);
>  	return rc;
>  }
>
> --
> 2.25.3
>
>
>
>

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

* Re: [EXT] [PATCH] bnx2x: correct a mistake when show error code
  2020-08-29 10:36 [PATCH] bnx2x: correct a mistake when show error code Yi Li
  2020-08-29 11:00 ` Yi Li
@ 2020-08-30  7:58 ` Igor Russkikh
  1 sibling, 0 replies; 3+ messages in thread
From: Igor Russkikh @ 2020-08-30  7:58 UTC (permalink / raw)
  To: Yi Li, linux-kernel, netdev
  Cc: yilikernel, kuba, davem, GR-everest-linux-l2,
	Sudarsana Reddy Kalluru, Ariel Elior


>  drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c 
> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
> index 1426c691c7c4..0346771396ce 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
> @@ -13562,9 +13560,8 @@ static int bnx2x_ext_phy_common_init(struct bnx2x 
> *bp, u32 shmem_base_path[],
>  	}
> 
>  	if (rc)
> -		netdev_err(bp->dev,  "Warning: PHY was not initialized,"
> -				      " Port %d\n",
> -			 0);
> +		netdev_err(bp->dev, "Warning: PHY was not initialized, Port %d\n",
> +			   rc);
>  	return rc;

Hi Yi,

Thanks, but if you want to report rc in this trace - then state "rc = %d"
explicitly in the string. Because now its "Port %d" but you put error code in
there...

Thanks,
   Igor

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

end of thread, other threads:[~2020-08-30  7:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-29 10:36 [PATCH] bnx2x: correct a mistake when show error code Yi Li
2020-08-29 11:00 ` Yi Li
2020-08-30  7:58 ` [EXT] " Igor Russkikh

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