Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6146240rwd; Wed, 24 May 2023 11:19:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7heW66YtiV9M9jv4XDHimuw/MCmD/4rO9EIXQ3COz8OwJXRfqyfqB1m/AwLRE259JDHMGu X-Received: by 2002:a17:903:2595:b0:1ad:1c22:1b53 with SMTP id jb21-20020a170903259500b001ad1c221b53mr17885864plb.40.1684952391853; Wed, 24 May 2023 11:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684952391; cv=none; d=google.com; s=arc-20160816; b=tsBhiI9VDrzf8ABvKEiaXH1tkoVKWg1kGMxvWa6Ln3nzSqwDQI5AyHfF8Imje78/nH gQaNZEci+7zOWtC//nJ9KNn8CAq7KxeuSG7ji4ay62+f7o7CV9P9aZS7BrSXUjgboxCf fIcvSYQneR1FS0xNSnF/4tavljof1tsFCsC2PmGGniKXFWDaFrOv2W1SBJIM/So1gPM/ XMy+p0CgYHZ9izVam/3RSt9jDGoxzq+ivtzyCbkFG1dknxupHIYXm5um8g9zMR+5Twkq ARnPJJbiAsI61RFqhO5kyMy0GbQp6j5eT9f77IWGuDRoxNaLzSXy191HfminOHdvFrd9 qfKA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nWBdICZs1ylHFsz8zslSqh0ccqIAuQOZUPv8JnOg1n4=; b=ojiWf+Ji3eSwsREaqncBlBU7yUkDzFic/88iJ5lwMEAnLZX0L1SqXebsgC8ggmC2TT of3fjyxJQfNhS7W2H612PoNOFwmcAiuCNlEd8KKIXoDQHwPJ9Zprb9njFHvA/CL48+L5 aAF3w2o1QFX72fHnn2wXXlf+W609QyruSJ29PovkhVf4Ov2ho/HyP0l59jbcQ99d4epw e/NXyMumDhsfsMzG5MoMMNe+AapNzPzePGac2NMR9Oj09yO0u/S/8047CcJ5l0hvNxk5 AdktEFUjfvLztzUtE4nQZ66nlcjrkbnRjvsuOADHPWct0xMNAp7FN3snCwJxuh5Dz7ze FgcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Ph7hH4NN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cp2-20020a170902e78200b001afdda2f4aesi644288plb.239.2023.05.24.11.19.37; Wed, 24 May 2023 11:19:51 -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=pass header.i=@gmail.com header.s=20221208 header.b=Ph7hH4NN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236110AbjEXRqT (ORCPT + 99 others); Wed, 24 May 2023 13:46:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236224AbjEXRqL (ORCPT ); Wed, 24 May 2023 13:46:11 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF5D01A8; Wed, 24 May 2023 10:45:39 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-50bcb229adaso2451961a12.2; Wed, 24 May 2023 10:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684950338; x=1687542338; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=nWBdICZs1ylHFsz8zslSqh0ccqIAuQOZUPv8JnOg1n4=; b=Ph7hH4NN5Xzd3WzBdsSVQS8+U87aBSWIrpyy7+WW0QkU1h5rnmAglEqXX+qT8idyBn tuGBsqy4bNR0P53kYTfSXcv1RVx8P56JrjDguFJ2xDB2Jik1T7xuU68m7BLTI6vydpBx 4/vYBbe6gwOchR/v4SnWspk2/qa+klTSroJ/HZE9nio1csB5CsvtuWQBAw3X2wM5N72V RWOe1yPtyX+SB1o+4y7Vfl1FqeSZah/FtQcfO7aAisxjzo96nvUquvYRLFzTHHRJYfMB we7KhGHMmZmN1xxtrD17MLFmjbw8pI8ji/9G6fRM7laNyrmArTJCgVKO4wfxQTUk5mg6 DTXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684950338; x=1687542338; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nWBdICZs1ylHFsz8zslSqh0ccqIAuQOZUPv8JnOg1n4=; b=aHYMhV6KrwbFanPLkA1Fb+EeyhXNrNwpq+xnD1VAJG2fvV3hLnmDNHHwBVS1XWLjqE RBu74f7+nLJL1pBKrigxM0OSE/k9lHeE95pn/T9SzvW5nSOroQMYCipXxFTZNAo7DZII xdCYe7OsWpKZDMq3o65vBAV5aZAXFgfNwSghQol8Q/jtVQB0SCDAUWiDuBmZclXYlpnn ot4jmPoj0BOUf5v4WHtH1H+J2LQ3BtQjrJfSe953GoXQ/8/WWMxyh5O/NbR16CMimAwt Ecoe2FuGoqNJES/9OPBFyZk6FIXboUBcDCUs14HpZyZXeYBSUel4ZaYdfDLoqdUGTC9m IWXQ== X-Gm-Message-State: AC+VfDxouFjzlxxp1QMP6RU0E5KfFpP+Lr3VXDdMzQW5eu2PXqPCHHrg JV9+K4n824n+KBmI3xrr2Ps= X-Received: by 2002:a17:907:9809:b0:966:23e5:c8f7 with SMTP id ji9-20020a170907980900b0096623e5c8f7mr17741535ejc.62.1684950338056; Wed, 24 May 2023 10:45:38 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id ja26-20020a170907989a00b0096b55be592asm6025738ejc.92.2023.05.24.10.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 10:45:37 -0700 (PDT) Date: Wed, 24 May 2023 20:45:34 +0300 From: Vladimir Oltean To: arinc9.unal@gmail.com Cc: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , erkin.bozoglu@xeront.com, mithat.guner@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next 07/30] net: dsa: mt7530: do not run mt7530_setup_port5() if port 5 is disabled Message-ID: <20230524174534.hcxn6tjhjmho6io7@skbuf> References: <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-8-arinc.unal@arinc9.com> <20230522121532.86610-8-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230522121532.86610-8-arinc.unal@arinc9.com> <20230522121532.86610-8-arinc.unal@arinc9.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Mon, May 22, 2023 at 03:15:09PM +0300, arinc9.unal@gmail.com wrote: > From: Arınç ÜNAL > > There's no need to run all the code on mt7530_setup_port5() if port 5 is > disabled. The only case for calling mt7530_setup_port5() from > mt7530_setup() is when PHY muxing is enabled. That is because port 5 is not > defined as a port on the devicetree, therefore, it cannot be controlled by > phylink. > > Because of this, run mt7530_setup_port5() if priv->p5_intf_sel is > P5_INTF_SEL_PHY_P0 or P5_INTF_SEL_PHY_P4. Remove the P5_DISABLED case from > mt7530_setup_port5(). > > Stop initialising the interface variable as the remaining cases will always > call mt7530_setup_port5() with it initialised. > > Tested-by: Arınç ÜNAL > Signed-off-by: Arınç ÜNAL > --- Reviewed-by: Vladimir Oltean