Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1131561rdb; Sat, 18 Nov 2023 04:34:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEP448IOcZVRhEfBRoMoxLEGpf8uX0EApcM9WV+5Y9l2VEDw6DfOUvAiKba+RRvpp/CO+p6 X-Received: by 2002:a05:6a20:4326:b0:187:651d:7d9e with SMTP id h38-20020a056a20432600b00187651d7d9emr2694800pzk.26.1700310875503; Sat, 18 Nov 2023 04:34:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700310875; cv=none; d=google.com; s=arc-20160816; b=mIOw7K4KtqhFujJRWeRkfVa1RombLiKLCb86JTBgeTGGmRdd95c3QfUf/duFSA6/u+ 1eBQqUwsd2hR3Gv9YLVh56EjPDNePYUv3r3Ye7rQBL5XMrlSpV9460mjRfDUudoBBXbg 5yf2Gs/FE6e4SH7MMPdEMuNLms2P8R5vpK/i6o479UQKwtSdtHYGpWxgYpi2lZCC5b27 hNvFlHlJe+IV0YimeeDB3VLshTG61Prff5d4YQtoPBPVANdAqv80ipoe1N3B5xkhBVws cIPux93Q24vS0kQlF11DoAz13hmujCzxmq4E9D3bqRk8k9m2huUAsAGSkcJ+4e+4PmbK rVVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=A4UChF1BUauN6W28Ee+oXUFPu4N8R5M4US5PAgnczs4=; fh=pxvM+Wf6tCsucgcJlpaT+KtPH3mT2/1sv0nByOcyBzY=; b=FgFaL1kAW8c9idcKgfoUAhzYyPxJ8mBhJq5bUxHHEXZJ4rtWciOt9UeIvUkMzuyd2x R4h8SZWyi7M3JdIcQ+1r+T4+lsgt3ykr81ERuCSz+yfM4HHk0w7UkAZrGEkZCoICB6ok zuUsf/nvs2/LdbWTMaVPSNA/KamVWvgUljeFJJu5HSFWd8FhbbED/+2Y6V/u/ktnKhtG G6xhHzmV9F56vhYjm8N5+GaHCrA6ZbFNwR4oO01UpI4QlS2OEpg0pUykdhVJ4o/3FXPk BD13BGqv6CLjIG08IOTWdEMRYEt67GeOG+7tZHavHIKk/57ZFuEwHyEZwoD6Z6lcMP8V 794Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=TA2qB8Qu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id q9-20020aa78429000000b006cb4b3316dasi1692344pfn.269.2023.11.18.04.34.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 04:34:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=TA2qB8Qu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1B0FD809EE09; Sat, 18 Nov 2023 04:34:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbjKRMdK (ORCPT + 99 others); Sat, 18 Nov 2023 07:33:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229717AbjKRMdJ (ORCPT ); Sat, 18 Nov 2023 07:33:09 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B563D61; Sat, 18 Nov 2023 04:33:05 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 17AF3E0005; Sat, 18 Nov 2023 12:32:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1700310784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A4UChF1BUauN6W28Ee+oXUFPu4N8R5M4US5PAgnczs4=; b=TA2qB8QuA710htbz4O+4ZVHGiqJRarLSXwaFP6VonUbPqFGxug1I3vIVoYnE0FFb+RQjeY yEGQu6us+mrL/TDiFHy6oxEhFjEh2F6eXa8RZ/80WzTYi7+uwpJFuAuiZxM0Oycgiyg7fj XUcI4Z8SUCUFgTgYTm5wDDxmnddh3/3HGIMFTbvZGqYHHxcDAx0LeiPX5VmzYBFTx72X+j u/7tC1ITqjyip38Vx7JT768QVGbJIib4n+umsDXE2gkVwcc0HZnQcFEatskE4l+Py04PPg rG5LdurPtA5EPLWrxMIQyo6D8YTLGOTKdET1tHTp98O3ymMoCEdgjdOd+HsJwQ== From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= To: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Frank Wunderlich , Bartel Eerdekens , mithat.guner@xeront.com, erkin.bozoglu@xeront.com Subject: [PATCH net-next 02/15] net: dsa: mt7530: use p5_interface_select as data type for p5_intf_sel Date: Sat, 18 Nov 2023 15:31:52 +0300 Message-Id: <20231118123205.266819-3-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231118123205.266819-1-arinc.unal@arinc9.com> References: <20231118123205.266819-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.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 fry.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 (fry.vger.email [0.0.0.0]); Sat, 18 Nov 2023 04:34:32 -0800 (PST) Use the p5_interface_select enumeration as the data type for the p5_intf_sel field. This ensures p5_intf_sel can only take the values defined in the p5_interface_select enumeration. Remove the explicit assignment of 0 to P5_DISABLED as the first enum item is automatically assigned 0. Signed-off-by: Arınç ÜNAL Acked-by: Daniel Golle --- drivers/net/dsa/mt7530.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h index 96d610f5bcf9..1b10b70c1508 100644 --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h @@ -683,7 +683,7 @@ struct mt7530_port { /* Port 5 interface select definitions */ enum p5_interface_select { - P5_DISABLED = 0, + P5_DISABLED, P5_INTF_SEL_PHY_P0, P5_INTF_SEL_PHY_P4, P5_INTF_SEL_GMAC5, @@ -776,7 +776,7 @@ struct mt7530_priv { bool mcm; phy_interface_t p6_interface; phy_interface_t p5_interface; - unsigned int p5_intf_sel; + enum p5_interface_select p5_intf_sel; u8 mirror_rx; u8 mirror_tx; struct mt7530_port ports[MT7530_NUM_PORTS]; -- 2.40.1