Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2419630rwd; Fri, 26 May 2023 06:26:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7sG/eB7N8kVcbtUmvQLlbKMgF7J6ilYuXnPP6+U7IVpDfQVTsVF+UEY8My8ZmiQLhomtuJ X-Received: by 2002:a05:6a00:1492:b0:64c:c841:4e8a with SMTP id v18-20020a056a00149200b0064cc8414e8amr3570087pfu.22.1685107584126; Fri, 26 May 2023 06:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685107584; cv=none; d=google.com; s=arc-20160816; b=XfHtB53Ars7BlT/32wbhuaDPHpBza5BoKfTZuQTb34dzGPbcp12vjtDTjwq6K8FJOQ 8U134pSPPGBoVLH+wDEgB8PBie+fopxUCweR2FI6LrKiPVveb0jFazxoIGXM0vSxJTtu HrDpCi0nPpdAXXVwaAS3wGVxfs9SBA/+2wYLgVxBFGSvOCQbkKH1Qdh4VzjJdLxDyiyM 1FclkcuW/GoOYM3U90+zGBB0hvTLbwJX5aqWeeqQA+UqcCyEXoqz14tBTaVLLTGFp+I1 yD+XmHYGSthwxZXazJKcKFpzDhKkE2D9uX/CTycI0TG0tjV57HpQDQjYG+Ru0ECXvoQU D+IQ== 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=ySmRc53vKROoV0PWm3ZQ6WwdfwBbVdA+rwOuG37JzZw=; b=TVOEu/C4xSflhccjurnSuA6e5HxEwJh8zLD80JJNpOysBqi+IzPqHspsP0EVZxeFkK X5ZhQhDQnOOz0ud6GC8gibIzxxCzyzmm/xJPGx7nzjNErM20gU06p91lOXNV17eXLmAZ WnQxBMewMsFfyKik8fQ0iC0cJBixm2Jtsyrog0IJU7x6svM/EF/WgQ3l3mk+VDS/5cWw AGq/3Vml9znfgMttSRP3JgI2DNZSQAAYPxWXGvpmpyYGF+zo2UYJvTtenczuz++ucoAO PSk13mVwJkoTS83xvRR/hcoveOPTMBld2xWmOyr3AFjGcQ2t8qKCiB6Pbl+M3k14oIPo PFHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ZWX0Qrcp; 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 l64-20020a622543000000b0064d419dd566si1197541pfl.205.2023.05.26.06.26.09; Fri, 26 May 2023 06:26:24 -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=ZWX0Qrcp; 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 S243227AbjEZNIY (ORCPT + 99 others); Fri, 26 May 2023 09:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231158AbjEZNIX (ORCPT ); Fri, 26 May 2023 09:08:23 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1072D12F; Fri, 26 May 2023 06:08:22 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-96fffe11714so125554566b.0; Fri, 26 May 2023 06:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685106500; x=1687698500; 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=ySmRc53vKROoV0PWm3ZQ6WwdfwBbVdA+rwOuG37JzZw=; b=ZWX0QrcpW5rWQ8p4KBmcTFHIzFOzfgnezwVXPG5rXkBt9/iCaSoF+Tt8pkc3eMSCH2 3rVCNwT6b/ksKMFKIXXUlSLc+2YqfbsJ0p17Li8YJ1LZkRrlhUYMFKJT+sD2AiSvBhWY rCC1YfMg0G8oQYiKXKqNvoMNoC4gxR6eyCHD++UqE7bErXC5TGuDnwj9CuPce1gSPR3X 4otRb1gYbB5EH+12gj0Sp2Stp5cTsIb6sdL9e0yxO3b3CS72FsJ0lD1dqrgc52yk7AtC 6XA354eBLzXZlXX02Z7U/wKis3vmVXlmY+r1CjI3TRlq1euNUOF7MKkabwaQfbTAGsAT Z+xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685106500; x=1687698500; 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=ySmRc53vKROoV0PWm3ZQ6WwdfwBbVdA+rwOuG37JzZw=; b=bMqUMbk3AcJyd6R/b2f4+f2bBPC07XstRDExhXSaLD+WkcXcxMZKwV+o742oJP7h7H Zl6a6AL7aqzm+g9DYOT4dAoHtZoMS89vzMVmwnuhMkK7QvFLz7oQNllYRDP9uiM5Evi1 kxj5VArhKISXGiklyU59aHL/0s88SyRMJrjbqpoNzNtWIItyFDl1Fe7mU7ziMvmyLp/b TBnFsckLbaTuXD3OkmtRnYneuuQTpu8U/v6dW+wXmvnljJUlAeNPJmAKmsLnV5aI7oDb 9kAVa+XhtrRavJ5hKGvfhiI8OWZkr17ter8QKnQEKq2M54S1o3j+/+XyCd8Cr9DJsR3s 5luQ== X-Gm-Message-State: AC+VfDyldOXzPBUJ81+2bGpvg1+t41XPvpQytFl6HcLnCm/VwS/UCTUl xBFkSmYROA2p86vPOwECk8M= X-Received: by 2002:a17:907:3d92:b0:973:8c47:2a02 with SMTP id he18-20020a1709073d9200b009738c472a02mr2178906ejc.38.1685106500249; Fri, 26 May 2023 06:08:20 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id n12-20020a1709065e0c00b009659ad1072fsm2151667eju.113.2023.05.26.06.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 06:08:19 -0700 (PDT) Date: Fri, 26 May 2023 16:08:16 +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 14/30] net: dsa: mt7530: switch to if/else statements on mt7530_setup_port6() Message-ID: <20230526130816.wr63736dn5jmaem7@skbuf> References: <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-15-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-15-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:16PM +0300, arinc9.unal@gmail.com wrote: > From: Arınç ÜNAL > > This code is from before this driver was converted to phylink API. Phylink > deals with the unsupported interface cases before mt7530_setup_port6() is > run. Therefore, the default case would never run. However, it must be > defined nonetheless to handle all the remaining enumeration values, the > phy-modes. > > Switch to if/else statements which simplifies the code. > > Change mt7530_setup_port6() to void now that there're no error cases left. > > Tested-by: Arınç ÜNAL > Signed-off-by: Arınç ÜNAL > --- Reviewed-by: Vladimir Oltean