Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3174796rdb; Tue, 26 Dec 2023 20:45:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrftd5ZDgNJtjaTsHmK9gNrMANGXT28z8hWKlv8MhrA0sL+M+qdMXNMyW3l+F224VIVQuM X-Received: by 2002:a05:6a21:1f1b:b0:18f:bce9:594a with SMTP id ry27-20020a056a211f1b00b0018fbce9594amr2829224pzb.38.1703652338613; Tue, 26 Dec 2023 20:45:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703652338; cv=none; d=google.com; s=arc-20160816; b=EjOhghh1U6MIqJBJ/zjxq9T6WBxy8A/Rgq3ZL8TiI8Pvd9BzkGiuKwZsLd/kyr5DeP vlqjozsP0bJjYY/nfrkQ7bH8gbQnr1sQjBxe/jvlzoo6kP6ks7f+iPOYhPtMV+YMQv8r 62hQAK0509wsoxjO3PW1BLjQ3FG0t1zQ4NjiIVk8wOT/Z3QiEb2qCAnlOIzOaHQkdCZb tHBM8ZLD4vxLm9gPO2Y/npUFNY7PGsrGhH+Od131PyjlTHySnkMQCjacBRJIlsUCb7EJ +YUUcAJMqVKbCBnpASTt+krV+awtlUbeUEbMKj43QOWDmpLr/kXVtV9JpfzeYK0G018r VogQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=F4rNKyLbk8MWNjAsn+rEBH47i5DIeKuQk4GsWa0qbg0=; fh=/nU+kOzOTvf+q6B7NtAi9MijA2ylDaAq3D9X6AyS0Do=; b=MAV59Z4cRYPNTH9y3IyUtcatwUYjWI4ziK5tmj6X6ly3hIdR3dMVDGI/yf6o8x2X3K kUaJyghy9NIwBhm5vyNBdT298HqmD6mPm36c44HTXJp/b/1488xV1m0NnOaW2eUvZOS1 FBU74KX+V7QBgqbpiMVocSC05k4iKgJpjdnESrKKHVfSm6C91EMPqOfDkKSFaSbFCME/ WoXjJltOWwxurhAHuA6uYJb9q8GOE1H50QiBNsI+4l8DlUFtLfWTfueZGc32Yi4XUj5S o65j0w4jr4uRQyCD8S6G1MlcetjylzyZaRVBc7DN97uq8UqdnjdY/ymfWSQkkt0YVbUT Y2Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=BB7iWsgu; spf=pass (google.com: domain of linux-kernel+bounces-11823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11823-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t5-20020a1709028c8500b001d47bbe7dedsi863695plo.616.2023.12.26.20.45.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 20:45:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=BB7iWsgu; spf=pass (google.com: domain of linux-kernel+bounces-11823-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11823-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com 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 9905CB22503 for ; Wed, 27 Dec 2023 04:45:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A175663A8; Wed, 27 Dec 2023 04:44:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="BB7iWsgu" X-Original-To: linux-kernel@vger.kernel.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 C404D569F; Wed, 27 Dec 2023 04:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id AE4CA1C0004; Wed, 27 Dec 2023 04:44:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1703652254; 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=F4rNKyLbk8MWNjAsn+rEBH47i5DIeKuQk4GsWa0qbg0=; b=BB7iWsgukbu4+am4cCFJNsqTP5daUDg0bMF3JB+lzH1TMEfof5B5/SGSPGZQA5OaGm6wgo SuxD18CFoHKb+f+TDidTXl2Q/PsXV8W3w++1rEQsMo4IDk0M6QuDoE+eMRPlfLCK0XuKot tWzmVY4YT1Qqnd7oojKifhobn+NY0UatVVMEr45mP6GmkU3QOmE00v8GvjMwQlewHo99+q Td2H+2PI364VLJgN9ZF9yvinJ3d+ARicyiCtYIfS1mbv0AXg6wqeZb4Oye234ss1yiOyTA EVpxA0jhe6PxF766mzCRtLeWaN2uoWeEUb+i6RrmbJCeTAUJ36TRrFq0q9tLvQ== 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: Frank Wunderlich , Bartel Eerdekens , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net-next v2 2/7] net: dsa: mt7530: use p5_interface_select as data type for p5_intf_sel Date: Wed, 27 Dec 2023 07:43:42 +0300 Message-Id: <20231227044347.107291-3-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231227044347.107291-1-arinc.unal@arinc9.com> References: <20231227044347.107291-1-arinc.unal@arinc9.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.com 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]; -- 2.40.1