RE: [Intel-wired-lan] [PATCH net-next] net: e100: replace silent 'hope for the best' with debug message

From: Loktionov, Aleksandr

Date: Fri May 22 2026 - 03:54:34 EST




> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf
> Of Ashwin Gundarapu via Intel-wired-lan
> Sent: Thursday, May 21, 2026 8:10 AM
> To: Kitszel, Przemyslaw <przemyslaw.kitszel@xxxxxxxxx>; andrewnetdev
> <andrew+netdev@xxxxxxx>; davem <davem@xxxxxxxxxxxxx>; edumazet
> <edumazet@xxxxxxxxxx>; kuba <kuba@xxxxxxxxxx>; pabeni
> <pabeni@xxxxxxxxxx>
> Cc: intel-wired-lan <intel-wired-lan@xxxxxxxxxxxxxxxx>; netdev
> <netdev@xxxxxxxxxxxxxxx>; linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>
> Subject: [Intel-wired-lan] [PATCH net-next] net: e100: replace silent
> 'hope for the best' with debug message
>
> From: Ashwin Gundarapu <linuxuser509@xxxxxxxxxxx>
> Date: Sun, 10 May 2026 15:09:12 +0530
> Subject: [PATCH] net: e100: replace silent 'hope for the best' with
> debug message
>
> Replace a silent return with a debug message when no MII PHY is
> detected on known variants. This gives users visibility into the
> failure instead of silently hoping for the best.
>
> Found by checkpatch.pl inspection.
>
> Signed-off-by: Ashwin Gundarapu <linuxuser509@xxxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/e100.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/e100.c
> b/drivers/net/ethernet/intel/e100.c
> index 9074b558de35..bfacf877ca40 100644
> --- a/drivers/net/ethernet/intel/e100.c
> +++ b/drivers/net/ethernet/intel/e100.c
> @@ -1450,7 +1450,9 @@ static int e100_phy_init(struct nic *nic)
> * But do this AFTER MII checking only, since this does
> * lookup of EEPROM values which may easily be
> unreliable. */
> if (e100_phy_check_without_mii(nic))
> - return 0; /* simply return and hope for the best
> */
> + netif_dbg(nic, probe, nic->netdev,
> + "No MII PHY detected, continuing
> anyway\n");
> + return 0;
> else {
Does it compile without } else { ?


> /* for unknown cases log a fatal error */
> netif_err(nic, hw, nic->netdev,
> --
> 2.43.0