Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2852646rwd; Mon, 22 May 2023 05:26:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5y5CBLFhWmRIxivyvoi+6Vr577D/j5tOsnnQDuzu8N3P862OvZ1A41cYm6fVx+UPEJMK33 X-Received: by 2002:a17:90b:1056:b0:252:94b5:36f1 with SMTP id gq22-20020a17090b105600b0025294b536f1mr9230514pjb.27.1684758406820; Mon, 22 May 2023 05:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684758406; cv=none; d=google.com; s=arc-20160816; b=hDtLjlpwTY3BRHMvFR7ZwvHT9ezP6niLghGNWdv1wnWOLnOENGpwvMjetOx7SrgMwW p3Z+gpyfuQFdCLEGC/zsok6eTAeKuryawbNkoUvNpi0lA2v4oe5/r6doqdM34sFRz6Jr Fc0O5rA7IZtY0Mw1KaNg/KtGNb7Zy21X6collK/wyh1b14/EYxk/fHc/KVmlLBZliymd HfxcMw0Ij+Rh3kvE26ngyr3lwphR7ctyrysbmK+ugf353+WJJ/UBOD3pqQe9mGriUyeT +RRCEQCTA8nad9P8NFcDvTUXVnIgTxb7RBNSwe/6myW26kcbgSaN+hZ+VlxP9rt7x8vL q0sQ== 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=3GlYa/gtfioHyiBI/gLtS8VjxT1YVLAproZrb+Hou0E=; b=yBmozKjCOtFJbZlpwjJMJsXq92YdypTbyspYT1V//Ef1cPkep5pEewNRZaUhGpkEoe 2QcKe3e0mjDFEoyGbVmP7YuzPjWndMN0WUYckwgPw4CvDzVe6iUAQ94dxn4KB/+73B30 zedOm5/3sOPqc6Vzr+yMoSGJMsdA+kSJwbDP5VqM0AustLzpbJuu7xd9asnSbkH393ZC 7N0svJn7AEg/469Qj+cYrrElhNnR7T/viL3SzMbQW0zOXuXffCpNeipjMbhuD8AbYcfl ysXF3B6OReWcIYPP6gOJ7s/EGotVGVUGZH/Q4U5vD5DgfDYVosEZ3eGbZ00QKIKPYIpx IYKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="BgHNA/Ig"; 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 s2-20020a17090ad48200b002537bd7454dsi4540943pju.101.2023.05.22.05.26.34; Mon, 22 May 2023 05:26:46 -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="BgHNA/Ig"; 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 S233833AbjEVMRr (ORCPT + 99 others); Mon, 22 May 2023 08:17:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230365AbjEVMR3 (ORCPT ); Mon, 22 May 2023 08:17:29 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8424AE56; Mon, 22 May 2023 05:16:13 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-96fffe11714so109776566b.0; Mon, 22 May 2023 05:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684757752; x=1687349752; 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=3GlYa/gtfioHyiBI/gLtS8VjxT1YVLAproZrb+Hou0E=; b=BgHNA/IgLsWdLuIeKOa8zdj4FeAFmGxSiYseC398PviO1oB4odqcU/Fy6xwJz6Z+xe QkjbiKKEogz0fAmjMPXXTbJlYwq9tsk33H/ouTCFbp2kQ2b5WCY+bB+CPyM4UOWf3E/3 VZzR3UYCSFAAugbKGJgcNmUzz8sZLkVz03gOb7NqrvwJE7QhVGS4X3mi3y/cXJXtn3KK tu3fN7K9Nqw/XcA/4dCvTz1gR7yO/o/mr4SYMqROKTdTr9K5HoOCdgmfClfySWYtowsr e4N96toLkYBKv64gc3foWTYSGC5ICtn0EoUIQZNzU+SmjVK9t6rRUBrWtD7LYnH5kA8Q MpXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684757752; x=1687349752; 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=3GlYa/gtfioHyiBI/gLtS8VjxT1YVLAproZrb+Hou0E=; b=Wl1n6AMGC8AcKsRe6ErNWuUtLY5wiDgB9b5Htz7NVr3FE4uCHjOdsnnhE146Mvdgmq hudiBCuxSP0klpY8Wi6RI+B+9zX6/GNYcjaCrv1iXGMnppPDVjtS9eu1cmjS4qgMJsYA hlj6qY+gVRXxADgBoyQIS1qMKv9iZGDbIUBBWan02Gc9inWAq/264juG+ZYFr9Xm4Pqr zCF9OGNGHRD+4otOao/Po7MwJXiBWnRPGLANYBH2591rc1FmGRms5S4hFuZSotffvhII HFYCHKR5bDiOWJSoVwLaxfu0oWMw1Snk9+Y6nJuE/TuBCDjzBe0HMIYXphb8Lkcul7bj 01HQ== X-Gm-Message-State: AC+VfDxJofA09jCbLViezCQhqq9hvfKr/cUE0X9DMkKPjeVcjBvy77TQ TN3WHW/upz4WtW6uwpvmB80= X-Received: by 2002:a17:907:d1c:b0:96f:df95:28a0 with SMTP id gn28-20020a1709070d1c00b0096fdf9528a0mr3477558ejc.55.1684757751614; Mon, 22 May 2023 05:15:51 -0700 (PDT) Received: from arinc9-PC.. ([149.91.1.15]) by smtp.gmail.com with ESMTPSA id y26-20020a17090614da00b009659fed3612sm2999950ejc.24.2023.05.22.05.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 05:15:51 -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, 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: [PATCH net-next 02/30] net: dsa: mt7530: use p5_interface_select as data type for p5_intf_sel Date: Mon, 22 May 2023 15:15:04 +0300 Message-Id: <20230522121532.86610-3-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522121532.86610-1-arinc.unal@arinc9.com> References: <20230522121532.86610-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 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 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.39.2