Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp793808rwp; Thu, 13 Jul 2023 00:42:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlFhfW4dCinB/tGnWSmSEOLfbfkTwF4nf1RHFAMs9dAV6pXWYuBbV0NM5cvh9Rdo7mn14+CO X-Received: by 2002:aa7:da4d:0:b0:518:7cf5:7ff8 with SMTP id w13-20020aa7da4d000000b005187cf57ff8mr1087675eds.12.1689234148753; Thu, 13 Jul 2023 00:42:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689234148; cv=none; d=google.com; s=arc-20160816; b=dTbOhBKArK9erk3QCbTSpJTyRx6umlqDuKEquD1yS3kbTuDX4w0HVEiPE4dlWd0PiF P5/40/EFeB4Ka+jsx9lcnmMKxdiBoIXQ2pV8q5yX3qSl+KOjbCciszyl5vKz3eL3i5bk 1JiNS4bP4zck2sQ37Ada9Cc2RZZihB8m80BflDm6f8MrCYkPQRmLV3vPl2QQLf4hbf56 f/Z1DdKGdnWGE9gIrlZt6+uCA2rOkDZN6XBe0mDigTiYpOTTfLJoExdeX/gWlVioX502 Xk+teguGiNNaDjzrGr1SLG93cISmRMorv37Ww9brSH/9TbHaXLHOgQqBo9qu3aYm5gKQ /bQA== 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=PzFC7qNxQkAsCR0tnxCCk6SWQGRQ28U1/TaF6Fofsxw=; fh=y6Nt63VVXY4On7n4MaqUr6QkIhGQzHbb1r/8aivKFpw=; b=YtHVugOJJD+4MkvNkQxh/bL61bEKh3YnDrYFOEpl88oJTwDLpMAEO+hNKldjMggFw9 9lKQapEb/QtZsf9NKVZnu+8SAlO+Vn3NbpEwz15I9H+VuP3BEI8i2irdrsYkrCmNbFfk 4uc0EjPxf541Y5j8o5tj9ghTkELRh+lokmVTCYD2FPBbkL/IC7sbQjpkyhgpnhPNhdrm 5sLdQLnUiHBO2zt6H7VLYlyj6mVk2ZSTLRWRz5srbbXQLzQY4T7aodPhkHIv00Y29jP4 6HeLGsChoy4bixeYMr8KAs7XhnWDJAFwCS2BHli9KKEl8TIjJ94qPqaSAQCHjzFBJfsm CxWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=kx82qL2Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o13-20020a056402038d00b0051df75a5cb3si6857598edv.472.2023.07.13.00.42.04; Thu, 13 Jul 2023 00:42:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=kx82qL2Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233952AbjGMH00 (ORCPT + 99 others); Thu, 13 Jul 2023 03:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234181AbjGMH0M (ORCPT ); Thu, 13 Jul 2023 03:26:12 -0400 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 D96C02D43; Thu, 13 Jul 2023 00:25:53 -0700 (PDT) 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=PzFC7qNxQkAsCR0tnxCCk6SWQGRQ28U1/TaF6Fofsxw=; b=kx82qL2Q33zKRHoO0BsBb9bypQ b/QA4Z4g7ZnzMhjGWZuUiXjAVa0VLM1P09FKH2yVnk2KzsCUZ3gg94n64QCCQiMVOLy4HFMF29QAB DphIkiOPgi0BxVgyIM3UWf1sgH9kFGKtHmyP5M+GCxNDnIhRL3PUQdO8WD2M9GmvXuaWR1RWgbVq+ g3SfY4GuCSO3y5Lju41ITXb7zX2YNsChV8wtDJn3PgZNmR/lr+akGUrKuVz7rTwyhVoTsgF/Fo5ni p0sSeVKXyWh832EjcVt3zPU8uMANW6yBARuSIC6XymXPEIde7oOQOsOgVd7JA42XsY6aUetKYs3wR FK14PNMQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56656) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qJqhx-0005sY-15; Thu, 13 Jul 2023 08:25:49 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qJqht-0005w9-QV; Thu, 13 Jul 2023 08:25:45 +0100 Date: Thu, 13 Jul 2023 08:25:45 +0100 From: "Russell King (Oracle)" To: Daniel Golle Cc: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , =?iso-8859-1?Q?Bj=F8rn?= Mork , Florian Fainelli , Greg Ungerer Subject: Re: [PATCH v2 net-next 6/9] net: ethernet: mtk_eth_soc: add MTK_NETSYS_V3 capability bit Message-ID: References: <6dc1e0ad7e8138835c959fc83a6c1564e8488c59.1689012506.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6dc1e0ad7e8138835c959fc83a6c1564e8488c59.1689012506.git.daniel@makrotopia.org> Sender: Russell King (Oracle) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 on thu, jul 13, 2023 at 03:19:49am +0100, daniel golle wrote: > + > + if (mtk_has_caps(eth->soc->caps, mtk_netsys_v3)) { this is a case in point for one of my previous comments... this code started out believing that testing for mtk_netsys_v2 for v2 features would be sufficient. your first patch ended up having to change that to !v1. how long until this becomes !v1 && !v2 because it gets used on v3 and v4 etc? this is why i think an integer version field would be a much saner approach. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!