From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBBA02C15AA; Tue, 27 Jan 2026 15:04:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769526276; cv=none; b=PN9l5AIsrGbSPGi0mnvnn+D885bJwGFg3CWzlsqAz1+zp6VlV6v4C3mv/1mIBPL/dw+8Hlj0+WugEGOXCgUcIOwM8iq2fWXsmEWUTsiGd27acq4z5ibvlVwkJgrcckB8v/g/wmaSqu9jU2TUUXms0PrB1qnyfFPyRlxEfOoR0m8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769526276; c=relaxed/simple; bh=DyqQUBculV6WII/IPQpN/HQYXxcBsk5PIcWHmzPHsRQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RfgEtd07X9NdHlmG1fdH0XgQRrzb+IkLRYcsgOAZG2foTuaUjKXEeIV6x22MCkQ7YnvtWZR0UNIIISNgWY/PGfdq6F8pCcr7qsTSNcpiyaXag3op0O12mKzGVA5jo9LmmKZxcDydS/Wa36eiXd1MUFF9xNrXPPRQNiiHJ7vs86M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=I4WdFvqT; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="I4WdFvqT" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Q2bhkdVEkneEuqSRoFW8sqjcHx19eRXCvgSU8BjsGxI=; b=I4WdFvqTpdATOThrgyhbi3MLGz bR1V9+oLE71DBdkCFW1ZxGxU68qDlAVPwMvU3ARpQH4fgbxDoC3uzrgggsimvE23GjtDPaxHCG/HR tMG+k6j5NOQol1dMsTYVZvSYaU5zXdAmqZ+n2ysV6DAQyORCViIAWRWUShYY+VQwRrhc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1vkkby-004yJw-1v; Tue, 27 Jan 2026 16:04:10 +0100 Date: Tue, 27 Jan 2026 16:04:10 +0100 From: Andrew Lunn To: Daniel Golle Cc: Paolo Abeni , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , Simon Horman , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Frank Wunderlich , Chad Monroe , Cezary Wilmanski , Avinash Jayaraman , Bing tao Xu , Liang Xu , Juraj Povazanec , "Fanni (Fang-Yi) Chan" , "Benny (Ying-Tsan) Weng" , "Livia M. Rosu" , John Crispin Subject: Re: [PATCH net-next v8 4/4] net: dsa: add basic initial driver for MxL862xx switches Message-ID: <8f267321-25fc-447f-8ff3-5d5b2d844d30@lunn.ch> References: <18c6a24eef8617abb5073569fee162f1aa1c06ea.1769053079.git.daniel@makrotopia.org> <5e7c2f9c-bf49-4564-91b3-a639ef1c97d8@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > > int mxl862xx_to_zephyr_errno(u16 reg) > so that would then just be > return (s16)reg; > right? Yes. > > Or did you think to include the handling of the error __mdiodev_c45_read() > would return, ie. > int mxl862xx_to_zephyr_errno(int reg) > { > if (reg < 0) > return reg; No, that mixes up real linux error codes and Zephyr OS error codes. If the MDIO operation fails, you have a real error code you can return. If the firmware fails, you will want to netdev_err() the Zephyr error code to aid debug, and then return -EIO. > Or actually translating the actual errno to a Linux error code? Is it worth the effort? How many times have you seen the firmware fail? During debugging, it might be useful, but in production? Andrew