From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 532A6C4167B for ; Tue, 5 Dec 2023 13:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442240AbjLENeo (ORCPT ); Tue, 5 Dec 2023 08:34:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345403AbjLENem (ORCPT ); Tue, 5 Dec 2023 08:34:42 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8764181; Tue, 5 Dec 2023 05:34:46 -0800 (PST) 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=f+lsdlAVUE5UtJ7lznC8cnI4y3fdQnoo6Z3B38BLcgw=; b=t8N6FProS95FvKZosHFBPYfaTF jAJktDdEo23x6WMltbKip+c04oOvXtgw+0hxAdmIjysqtjtUtZOyRDvSmJlwx8/cfaFiICFhm5MMB fRK3u/kggCmLyw7tp5153GQVrO7PPxEeMLEm3SxE0w1qqZxa2wLFhBv2LJ0V1P1YrzOM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rAVZI-0026AI-G0; Tue, 05 Dec 2023 14:34:32 +0100 Date: Tue, 5 Dec 2023 14:34:32 +0100 From: Andrew Lunn To: Serge Semin Cc: Heiner Kallweit , Russell King , Alexandre Torgue , Jose Abreu , Jose Abreu , Maxime Chevallier , Tomer Maimon , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 03/16] net: pcs: xpcs: Return EINVAL in the internal methods Message-ID: References: <20231205103559.9605-1-fancer.lancer@gmail.com> <20231205103559.9605-4-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231205103559.9605-4-fancer.lancer@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 05, 2023 at 01:35:24PM +0300, Serge Semin wrote: > In particular the xpcs_soft_reset() and xpcs_do_config() functions > currently return -1 if invalid auto-negotiation mode is specified. That > value can be then passed to the generic kernel subsystems which require a > standard kernel errno value. Even though the error conditions are very > specific (memory corruption or buggy implementation) using a hard-coded -1 > literal doesn't seem correct anyway. > > Signed-off-by: Serge Semin Tested-by: Andrew Lunn Andrew