Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6656696rwr; Tue, 25 Apr 2023 01:31:37 -0700 (PDT) X-Google-Smtp-Source: AKy350YESJgeZGyLWs1jyZW2gIthSAE+70vmBOHCTmRepauKsESr5UX4iti+LyZC1y8In6iy/Tw/ X-Received: by 2002:a05:6a00:807:b0:63a:fae3:9890 with SMTP id m7-20020a056a00080700b0063afae39890mr23426385pfk.24.1682411496699; Tue, 25 Apr 2023 01:31:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682411496; cv=none; d=google.com; s=arc-20160816; b=NH/c03rvmypWv6Kh5fkehnCgssxBtEkmHEEUkZbopEQWBHDPZYXmWblGRX0OZU0DzP Ju8FahhlzZmBPjDJWTuUlgJ9WdpBhGcpDiTZ0+T2/O/dqghcXlZTUlcPYwHtnbD5maWr fl3hWCIZBTLkhB7L59aPFMU/UGfwHIOLUVGrMU+nCMJQihgqwDh2zhBZxlEo+zot0kFE 2AdOsvJyzUYqNviWC7uRXzsJeQPpM1TNIaiLTduN72hgo1V/Ng6VmV2PgJ+2f3F1TWAP inHJKrLadbPA5et7+yjn7TRCRPYlADvmZPRry49KMYCws1EUT25tp845cpwhMrCr54Kt 4T2Q== 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=7rU2rEuh2fF/AUhiTvEQmHXWDUbju8C9sKkmr3u6JBw=; b=mWiSLTkExEgF88NashxGKpO7HuyudLN6cbQQB0BcHkQlvMUv3IMz7kZQkHNnSqpB53 Z8QQvhmkK3aQj2w3eaUL1H8Ig1d3QzWjZh34qz/OXuyvYAnYtwYFY5wrY0OdvFBc5T/T E8capACnnmrD0+VqZi23HqDyTE5+Fnx7t+8DZA3CZGuGnpBNIjXP7VjvfEeU2+A2cE/P GIFuD9s/a/KpL2c9yecCSZkbaAR/NtZLpBYRnSOUD0HLfH0ZdkNcaiqumsQZy5Luat29 EqZAxcAIDKVr9o8JLMQGg8cYLXyT5Vsi700y6nPaIDPMncYQ3BNHXTZ89f+FrIbqqnUJ lS+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="P/ECSuh6"; 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 y2-20020a636402000000b0050bf22172d3si13592240pgb.490.2023.04.25.01.31.24; Tue, 25 Apr 2023 01:31:36 -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="P/ECSuh6"; 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 S233654AbjDYIa0 (ORCPT + 99 others); Tue, 25 Apr 2023 04:30:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233688AbjDYIaC (ORCPT ); Tue, 25 Apr 2023 04:30:02 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41DB97AA8; Tue, 25 Apr 2023 01:30:01 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5055141a8fdso7909975a12.3; Tue, 25 Apr 2023 01:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682411400; x=1685003400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7rU2rEuh2fF/AUhiTvEQmHXWDUbju8C9sKkmr3u6JBw=; b=P/ECSuh6Fs+oMNsVuAbO7v2WqO2J8/Bs7A6vuJ7oPUFYjuhaSJXrnd6tw8ERYNodHv M4MKjb7+pE/aDSS8oa1OVS683xnnTg0sJRGEiI8ZMy2PLihmdJj6yXp4x6fmuoW3vgOP qSnVT4BHlhybLzJkfpBu2C32NqXDM9acUB2nhbNlx8/SjRa0IyQ9LsVWRHUgtbGHWUVk +Yc/M4qGMqoWP1Wr8DKjVfWzEzKXc0Eh66evGXDZ7F42OlCUzTNfKzT/7RTjMwUetU/m JatOPGsJKen2PS2Lo9I1mDQo/AtWmFYcYUXmWyiaAc7oIEMprE3PCRuaJzcV2vh24ZMl 0iOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682411400; x=1685003400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7rU2rEuh2fF/AUhiTvEQmHXWDUbju8C9sKkmr3u6JBw=; b=L7JCA9qaZVs6akFCi20QbAayaAIqieb8XyBAchsEnYycTxj3Yqrdd4naojDe16Rerj uYAvI7sSFTxsZAoK/XsBd1KZHzBe+Z1oe9AuSSPoxjNyvJbtkZSwcBuWogluYOMUa1rV 6ekwgBvZDbgo0iExO2c8XcY/cyXQYGrLc2VlXJDpCK+ZwgyPtbZ6qHDYVb5yRD9k/HYQ DvdP5uZ5iv73+aA63Aa+eX5x93OeE8uH2grN9AZp9Q3IkGDdoFNWlKyadlIPKsQrIaAW 3LsgtRxgYF4pmJfQQb3dctjBY0aS4ScJkjRPn9rm+/SPSfeUwg1mYs6qkEuBhxU2VH3e 42Ww== X-Gm-Message-State: AAQBX9edfLzM6w5oSYkE/I5wbmEq7hDvaLEmNfQVaipL9at66MiKeE3E Zp73OBFiAAaK5rOkRu8YraQ= X-Received: by 2002:aa7:de11:0:b0:506:b209:edb with SMTP id h17-20020aa7de11000000b00506b2090edbmr12731369edv.38.1682411399523; Tue, 25 Apr 2023 01:29:59 -0700 (PDT) Received: from arinc9-PC.lan ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id mc2-20020a170906eb4200b0094ca077c985sm6439028ejb.213.2023.04.25.01.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Apr 2023 01:29:59 -0700 (PDT) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , 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 03/24] net: dsa: mt7530: use p5_interface_select as data type for p5_intf_sel Date: Tue, 25 Apr 2023 11:29:12 +0300 Message-Id: <20230425082933.84654-4-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230425082933.84654-1-arinc.unal@arinc9.com> References: <20230425082933.84654-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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. Signed-off-by: Arınç ÜNAL --- 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 845f5dd16d83..415d8ea07472 100644 --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h @@ -675,7 +675,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, @@ -768,7 +768,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.37.2