From patchwork Mon Jan 22 05:35:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?= X-Patchwork-Id: 189896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2380764dyb; Sun, 21 Jan 2024 21:37:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IHT/V3lxo+u8rL2Zz2fmaEC8wX8piGmKqnGLEMf2H0LWWYxKXcre8wfvUPhZbPoYViFHpQ3 X-Received: by 2002:a05:6a20:a121:b0:19c:4c0b:6207 with SMTP id q33-20020a056a20a12100b0019c4c0b6207mr225154pzk.102.1705901874452; Sun, 21 Jan 2024 21:37:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705901874; cv=pass; d=google.com; s=arc-20160816; b=Gn+5GksktHA5XfpQ+LlgQUxLje4feCbyYjo7KwrbuyvmqPeoZp2nRu9eLMr9LOm81s U/f0qicML7nghaKipJJHNXrgroPUDF7EZBwjeYpjpy5X45zG50BsCjvaOVMWETjjAokW wP/HAlWc2Ipr7tgMGxPTFAvFLyvdPDDkrLyWysy4r9OuQYH068OhgcjUSbskUenkdD8R UGNKLOSUAg6NZqgDa0UE7vZltkTeu1pZvOKk8GyUdc80bQ1Lx7+EbweFAn1B6TpfBPAJ k8kBPOo7uvUhT/ub4ILfbrXHoCRrwIck6mIpTcvH/ocenndHo8klafKWfjIhudmWdSzR efxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=EJuPIPQLgkauPbYZ0YEe4zezHMhOP2vEutbPVuhft+U=; fh=7ME4fo8mjeLi1cA1n5TO2PixseNu1O0aARBJV+dyfZg=; b=VBd4V9QchFlwFrpdxKc2vxamUXX0mMjrP9OoX/6rErtwMbRDvIsveyyecCI+XcweZl wcTMUIw1qA9JIRDKwpz6n/jx3mv+glDOHNXF/27V/jGVhRv12uix4+nKcWjnjv0301Jk OjygqkYOszJWfVl6f5BM6I3GkWZeF5LZp/SHnHiuDS/F0KVnMOcd9NuPv59bZGApbcwN Vj6EqtTis2Sz72MVEHFS2/0gRl7INMq05xvI5cd/afw7wVPf6eV+EWyukiy+EajY7Xq8 Tl5EuW2qtBLbOvOiTO6w7b7mmg5SqkmV4UZSJX9jAjJsfPsGIWwGJZox/iGHv+ggaAeU 8B9Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NqIBtLIM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32333-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32333-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m17-20020a17090a7f9100b0028e0ff6cb87si7383006pjl.102.2024.01.21.21.37.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 21:37:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32333-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NqIBtLIM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32333-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32333-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6331EB21370 for ; Mon, 22 Jan 2024 05:37:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8039C12E52; Mon, 22 Jan 2024 05:36:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NqIBtLIM" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1C534C8E; Mon, 22 Jan 2024 05:35:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705901758; cv=none; b=eRtycW3ors8MZEXGTBQGLYZgDOLRpk2YtQgQHgFaC54X+KzXCv3/N2+ydMmnOWY1h77OI4tmAQ34R6M8dSFpOIlAAqDcIBHEbKDpIapanKx4xomf+7HvCeAyPLKSzYDND0FX5n0cmuxsgKUifd34ZCFOJ0R3Pw/wdMPbDLqj3Uw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705901758; c=relaxed/simple; bh=sqOYOjwzwIWmabwtLIfTKhD0ZRp7ECZfLXHIbLfNCCI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kP6/LwbU9FJ/qOczIEtrx64sGksu260GQuZTJ//bMMSBQwBsBWOElttYrKs1Gf2dzLG65kJ4q2P8er76I5MYP2q8HKGPK0bPsDmUn/IRAVSIRkCAHXhi74dFbKYNCWmYNctWO0mUP+/TSDC/l4cF07kSh53GBnwh6asABcgK9KM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NqIBtLIM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 44B4EC43390; Mon, 22 Jan 2024 05:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705901758; bh=sqOYOjwzwIWmabwtLIfTKhD0ZRp7ECZfLXHIbLfNCCI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=NqIBtLIMSvVPdNPkNIfYmr4xaZc7FvAgeivMtkZVhsR68UIFhVPttfEfxqFi+kAxW OuL9KMZLLQeRZ+y3aHGtXBbyxGUV0EfgRX7WWPWhmRbMQ5lmOwyeeWCJDhxveHNby+ ZryP9leWecF8NTYYicNE4yoB4JFyUrQLgrXNwclICwSV0xAb8NDjm8eZdgPped/U7K M/Apg/u9ZC/iVCIZH+7pPAFRuoOypnC+yNZlbR7QOTJstxtKVwLLZ28m2Ld6hmNW56 wns09g8o9FwBvGlM799vW8HL33/uLneMbgQ4GT/GMl3qAB0vASWMA5wp8hQKrqiFN6 XQhL2ESDzAxUA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BB8EC47DDB; Mon, 22 Jan 2024 05:35:58 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay Date: Mon, 22 Jan 2024 08:35:53 +0300 Subject: [PATCH net-next v3 2/7] net: dsa: mt7530: use p5_interface_select as data type for p5_intf_sel Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240122-for-netnext-mt7530-improvements-1-v3-2-042401f2b279@arinc9.com> References: <20240122-for-netnext-mt7530-improvements-1-v3-0-042401f2b279@arinc9.com> In-Reply-To: <20240122-for-netnext-mt7530-improvements-1-v3-0-042401f2b279@arinc9.com> To: 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: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705901755; l=1228; i=arinc.unal@arinc9.com; s=arinc9-patatt; h=from:subject:message-id; bh=eeyEB3sOOiz0wO/aOHC7vZ4jcupi1RnCW1Y9LU4gTrY=; b=hIKr4GuusrNypD6MbPMVuvEcxmkhEzS94rRRvDe6qBWSz+KkNMZbiGjjLB0fqADMlTsK/7i5T Le1XednZ9IIB52YpaxQcd9QPbMQQdAeDRXZ1NAxxSET9qU68nA4uWM4 X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; pk=VmvgMWwm73yVIrlyJYvGtnXkQJy9CvbaeEqPQO9Z4kA= X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-patatt with auth_id=115 X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788767763870944133 X-GMAIL-MSGID: 1788767763870944133 From: Arınç ÜNAL 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 Reviewed-by: Vladimir Oltean --- 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 ebfb3a7acfcd..9cbf18efa416 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];