Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp284826rdb; Tue, 5 Dec 2023 05:35:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7ZOtXc1b2NKWLOugV29Nre7DGDjHkYApSCW/aY0WgM1euLavgaHRIyO0SKgh9nMdwAwMB X-Received: by 2002:a05:6358:7201:b0:16d:fc55:b5af with SMTP id h1-20020a056358720100b0016dfc55b5afmr6334434rwa.3.1701783308390; Tue, 05 Dec 2023 05:35:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701783308; cv=none; d=google.com; s=arc-20160816; b=U8/fB/SA9JMbydqpRTTUa5ggzekJBhSLfwOFXnXJXPVjv81WBvUfKqqltbaYJgzWSz 5g8Y+1LWKxfvC6iJCBvVyo8OE8/qwRJU/DjdbZHpw2N7O8zXCLATitzHNnSiQqBjrMbD 3U8eIXdJ/3N11RJV6v/HDkkRdc0x+GHd5C7qCqiib8j+W0U1h3RjVwpxCWvq9zD1bP6p Afztv6o7l8U6UsKJGmkCQReG9lKewfBvqLre+hAJE0x4LZ3c5vSHsvJGAmM9S94bq+Ev 3bQ58wDlBPPVnopVPzAyr4RBKdPYk37++7kbTlnxYdPtQjXn6Vnf0HMdtohuOgEQTXkP v2UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=f+lsdlAVUE5UtJ7lznC8cnI4y3fdQnoo6Z3B38BLcgw=; fh=SUs1h3Hy8djn6m6IEQqCo0+XAxsrqhDjEzwkRP8Wdu8=; b=ZUaFnzSWVwp3wZ94W9pg1pv0r1w4DE8JLHhDewdoyBjQbjJpG2/UkPK9WIj5gIZZ17 SNLe4SgTLlfHWAlvuEN2ZI4kdtTjqwwU/IIJjmCQwra1dQrKJqBal+fdEaKFxKA2jrGx 6zs001I4iWdu2g4lm7a6I6grtGK0YAFfP5pCKVSPBcFzm4V7EmYzoSYI4RwsgzGJSvrS j8qrdxtDkpLJzfuxXKwiy+q2UzjLuF5Of6ypkjhirZdltno1KpMlZTrxB69FrdbrW6I9 JSFkf8/Gg0Ls+QHH9VEVNPWW/eXlY5JmocHw49C3FCARvg0VL5xjbspTqx8G5byrdclf o9dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=t8N6FPro; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q18-20020a631f52000000b005c661efffd0si5210897pgm.754.2023.12.05.05.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 05:35:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=t8N6FPro; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3F1A080B2840; Tue, 5 Dec 2023 05:35:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442216AbjLENen (ORCPT + 99 others); Tue, 5 Dec 2023 08:34:43 -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> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 05 Dec 2023 05:35:01 -0800 (PST) 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