Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5560339rdb; Wed, 13 Dec 2023 12:11:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhv1EIlOudR44EI23sPdDKlIuPuaycrzFPGUwdU2vHKP5m9+89Ju/GslCHo+TdDJkhuqUU X-Received: by 2002:a05:6e02:12c6:b0:35a:fad3:2b2a with SMTP id i6-20020a056e0212c600b0035afad32b2amr13007908ilm.12.1702498301007; Wed, 13 Dec 2023 12:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702498300; cv=none; d=google.com; s=arc-20160816; b=QgD+LOCNXhc9q1pxdp300itzITAgVr13GB7bSVoZx/my3OLm3z4i1AaP6s2YkxN/m8 cLiM5uVly+SaUnJfn0uM3O2b5sh67uHy341+RaEeeUP7kqga8yhrcvbsgRjhzDldByc8 uY96sRGQVfnLxPwWX7ZSW81rK0PWwn/2jgglZ5fOj6nUpmTamrLn6TyPHagiadFJyPhH rcVQg4A+Mtvf0EyEkSYkVnmTMsv9YsDxAu7CGZccJoHUpvCxqklLaAZMfVAVInMiC/i8 tIU1eVjmWXzIMEoUPZw/2Js6WwrGOS588xg0NnF3Px+UdvKjwGDlpormB9XQtqsKZcIu 3wRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=PwOVL8mVKeFXsW0HcBL1U5ZeoAlOHIL4hxG+Ermm0Do=; fh=9p34L7KF7bfMLHxp/5OUkfV8x0r4g3aazwcd2QJ5G+E=; b=Ny3M3JptyiSI3vkkD5zClbTCMyV8dv+SN+wX27Z8T31mP2+FCKgDqX/sKrYxk/UFcC J0k2gpld+x7c35gVa/yFO+eED0R1wO0bA7eCv416XpZhnJzpQriXOhheWJ7d0psJ1W5I u0U28CNuP5ZqGv7M/teAHo9PDvCQ7sVjZaQt1II7fEj9t8Q6KWuz/TNu0FPGlPlTF3Y1 4+t8I+KxvtFqxWOxdYqarFgai4UpPYPF7MNU5oTYX1bhsCUiDqOiAl8NN5nYoQcC0sv4 /grtLXtaDS4uAsFON55bYjFF80FrP5ncaExKvW0+4b5dKyIrrevHGZ6xPYRg/+U4S+o6 YxcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=oqrxxd8t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k1-20020a632401000000b005bd6897634dsi10107792pgk.249.2023.12.13.12.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 12:11:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=oqrxxd8t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9E05B80C5908; Wed, 13 Dec 2023 12:11:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442490AbjLMUK4 (ORCPT + 99 others); Wed, 13 Dec 2023 15:10:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442421AbjLMUKu (ORCPT ); Wed, 13 Dec 2023 15:10:50 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 576CCDD; Wed, 13 Dec 2023 12:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PwOVL8mVKeFXsW0HcBL1U5ZeoAlOHIL4hxG+Ermm0Do=; b=oqrxxd8tZUp4TaF8Qx7f1USJ1+ Fk0puhRMdQ1N94CmXAtd/ycvks7V8GFGMVLbTXDeapF7YvARte1MdPW22s1nZDz7RCHKik8n90hdx uYcTPoyaEfrgERS6cPOT22a506hCaeXtC6RCIGWKVKaQEfP6Rk+tAgC105YHDKHUmgB3PpTmG38R0 ImWfo63KfDElgqlIqBaX4Lcl7T0EJBt6JS6dFQ/vrK4KVcoIqwSspzpNNQKE0X3qAoN/1ilToPqCH et2Bq1Locx3qPSg6Ak7iyYklE0KYJB+wjbyPo2Mh+VgY3TtZU3U/UFJhH7bNaXawD2H09mmkYIb7A /Cku/XiQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:36782) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rDVZ6-0000XV-0W; Wed, 13 Dec 2023 20:10:44 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rDVZ4-0001oW-BG; Wed, 13 Dec 2023 20:10:42 +0000 Date: Wed, 13 Dec 2023 20:10:42 +0000 From: "Russell King (Oracle)" To: Christian Marangi Cc: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Vincent Mailhol , Kees Cook , Piergiorgio Beruto , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next PATCH 1/2] net: ethtool: add define for link speed mode number Message-ID: References: <20231213181554.4741-1-ansuelsmth@gmail.com> <20231213181554.4741-2-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213181554.4741-2-ansuelsmth@gmail.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 12:11:21 -0800 (PST) NAK. You *clearly* didn't look before you leaped. On Wed, Dec 13, 2023 at 07:15:53PM +0100, Christian Marangi wrote: > +enum ethtool_link_speeds { > + SPEED_10 = 0, > + SPEED_100, > + SPEED_1000, ... and from the context immediately below, included in your patch: > #define SPEED_10 10 ^^^^^^^^ > #define SPEED_100 100 ^^^^^^^^^ > #define SPEED_1000 1000 ^^^^^^^^^^ Your enumerated values will be overridden by the preprocessor definitions. Moreover, SPEED_xxx is an already taken namespace and part of the UAPI, and thus can _not_ be changed. Convention is that SPEED_x will be defined as the numeric speed. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!