Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp487277lqj; Sun, 2 Jun 2024 07:39:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwXo12wz4g+pFORWdfGsfE0s/YtZLSEMjdR2NGXN8H6gmRC42lTN3AK+dQ4bpXTcEytVPx9cFtbrR/7xB4qCBQu0oJ4ETwSVdhpwyEEA== X-Google-Smtp-Source: AGHT+IGwC7axEHZO7lrl3tvcv9wS+ISpVvoi5TfhNU8n9u///8QIFgxGRz9eBlPuoLFPZ/VsQgd6 X-Received: by 2002:a05:6a00:2315:b0:6f3:ebc4:4407 with SMTP id d2e1a72fcca58-702477c2895mr7528622b3a.4.1717339154919; Sun, 02 Jun 2024 07:39:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717339154; cv=pass; d=google.com; s=arc-20160816; b=au3jPh+6bn2LkNxDsb2z+2E8n2kq9YHxpqj40KPeQeWxL9UWTosSHF60oyxpIhueUp jsC1VVNcCKekCsmdbhJAf9dB9o7gMcX/WGjaNJujBnfttw6Tcq0+A10FqsJ5mdE6SMIw sIhyL6iL1ZIxnr4UlN0LGDhx+XYY3alpS7OBmA2rtC1eGgA4OLkS6slNw0raXFc1XBVe s3SYqfBwcPOBMi0u1Ai1XF8GmC8NiCkaj3F8IcYBDkCNTlmiywH6B4u2a0W++28A8ZVP ew0hBhi7GDJx0WNY0NiiNO5zym373FJ9d1Y9xbnNqufuAOHCclv+vP7SAQb8krpzw6ip wqcA== ARC-Message-Signature: i=2; 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=EEjeTMFoJBv+1cocMj3lNi4jSjrQ54Kw3PRV3mrle98=; fh=vsmI9WUrimMqkmh+RAFwarXdvgaC1/th2i71Rse4d14=; b=qNLEam2WMZTjUqno+fE3kii9Q1tBmk2b1Nb6uxOpF5RPnSgCSwZYpKiZ9vgmVY+cb7 ZC6yRxMQKcFP2rXxlZpt5Wa4HTxELoZ6165k6OU3h10wBleIo9u3C314/ugP4SO1xXWS aJXM4BcQpntdITMYydzzgsVVDoZOgdJuxseR+AFma4t3bUksFDODjaVfCvUC2mB8M8gt io0Yh0b1U7UWQ/jzzx9atE0l9ytpi7uil4/A6UQZ7VPvpfjRWNQg4jLcw8z22+wUwsdp 02l+FHaPtmgbUVSY5/0pZYm2zFvxWpWtjpKLrBllJ1IiK43b4DM63tMV+zf1UHc+n+rl N3nQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eiPkrf9Q; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-198296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 41be03b00d2f7-6c355157374si5009152a12.185.2024.06.02.07.39.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 07:39:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198296-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=@gmail.com header.s=20230601 header.b=eiPkrf9Q; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-198296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 DBE3FB216B6 for ; Sun, 2 Jun 2024 14:38:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D93C05BAFC; Sun, 2 Jun 2024 14:36:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eiPkrf9Q" Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 131B1548F7; Sun, 2 Jun 2024 14:36:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717339012; cv=none; b=jt0wqMVboavV92immuoAwAYcuJn/ZLt/ThvvOcFGLa2nRyhFFw/okgdA6B7/w7/ANpCUcbhcprMfeiep5b0keFTplf3tMa3j5e7mAf1fqtoll/mrxuBChASXOt557Qz5gkUjcTKQvSCegdsW7ZbcHQRtxs42SlkYa9SjdVrWNcI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717339012; c=relaxed/simple; bh=k4gkAz+Zl8rzR8GG8wrdRjpIs+MSbIxwVH7f99/7BJI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mk1NWTG/TvX/p3FqDN9WPl+eCJwKLJ07GCrlSffumI7Ur73utSgGnC5V3DsdKvh3Bi1b8SZIB1+NiaA3+JCs6E+uLI1c3OkM8B9uHXSXYE7hpykk5vLztJ/exQ8SwtKSjyIOFKbnLdMcKtpEIPzLTofxUuAZwAOkXb0wx1HttMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eiPkrf9Q; arc=none smtp.client-ip=209.85.208.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2e95a1eff78so47006851fa.0; Sun, 02 Jun 2024 07:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717339009; x=1717943809; darn=vger.kernel.org; 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=EEjeTMFoJBv+1cocMj3lNi4jSjrQ54Kw3PRV3mrle98=; b=eiPkrf9QY5JDC9+/ljT/lCnXBWr1y4+rUiwUrIIn0XY/xUy77c2ael7eQiBn/P5svA FGeRvw0XeTkLAMctnECzWEEa4g120xo8iIYYHAutYV7xojpDZvzFD3tMq8GHnVxWHHnu wIIQESJf9PhNQsW7EzOS664QgqmfiJ8LOA0FJVcrubUh4BfHe/okf0k7j1owT+Cpi5jr iF6BqnArn68Lcd9BO7ZuO5c8FOb3vHoFtaE+GS3xHNtQZXnNWxsMQTMt6UfwktR41lr+ uxeKMHSYKe10W/n7pK6THIDqTe2FE+8sXznMBDEFJUMjNQXagSkmj7izWRF6Z7R5uRCW 8c0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717339009; x=1717943809; 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=EEjeTMFoJBv+1cocMj3lNi4jSjrQ54Kw3PRV3mrle98=; b=Mc7LYGf2ux7I1tj821apR0UfoEtCfyOQjvqFPGmjXgNZ2LhoViCo3Y/CIGyJh8if2o KrNvrUK3gtd51pRqB1ffihcs5Uym3DIFgsAje21r59Qy86yPTNHdGdvtkCldDRGUGNlm /+RKAYrcx4FZ6y8QQz4t4Px1Mquoqa90s2twod+YpUfMuzlQn+c9xwH/jf4/6fGewjyX 6naX1nXrultHQTh332xjcBoqrMYXeKfc/XOqq902S6hmv/LdB1OMpYAB7KtvIUFSpvLl /u35lIYwVrpanoMfGvrpiK/iXmtJLj4sPALbU4IObr0Up2FZEc7Ydof+MaXtEmgaAJKn iNsw== X-Forwarded-Encrypted: i=1; AJvYcCXbSq04ZhT+6Ww2nrZAxZdT0Xh0GCWjh5l7V6C7SIwfpvNIQ4TM6CF7KjLDJzKnDD+BiCUkdmOeh49bDeF4TLAr28ObGtjLrGYX1DMD+Erw6NpdszSh9U/7PzmrKPp9Lk8j14dnA1JF6CxlSdZIX8+hmlCNOACr/MxGj87l1mBXzw== X-Gm-Message-State: AOJu0YwnZ940VxtBMyBWLHRq/vcy+qtrwh8BzBoat/uFkizIQrdJfSnP Uv8UYqG5vprhR1txroN5NyQvSCtPG7CiFfOnBHzyNLT7T4O+0ruB X-Received: by 2002:a2e:b5a9:0:b0:2ea:8e94:a2ea with SMTP id 38308e7fff4ca-2ea95108166mr50557881fa.6.1717339009135; Sun, 02 Jun 2024 07:36:49 -0700 (PDT) Received: from localhost ([178.178.142.64]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ea91bb49ebsm9383051fa.34.2024.06.02.07.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 07:36:48 -0700 (PDT) From: Serge Semin To: Andrew Lunn , Heiner Kallweit , Russell King , Alexandre Torgue , Jose Abreu , Jose Abreu , Vladimir Oltean , Florian Fainelli , Maxime Chevallier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Serge Semin , Sagar Cheluvegowda , Abhishek Chauhan , Andrew Halaney , Jiawen Wu , Mengyuan Lou , Tomer Maimon , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 04/10] net: pcs: xpcs: Convert xpcs_compat to dw_xpcs_compat Date: Sun, 2 Jun 2024 17:36:18 +0300 Message-ID: <20240602143636.5839-5-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240602143636.5839-1-fancer.lancer@gmail.com> References: <20240602143636.5839-1-fancer.lancer@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The xpcs_compat structure has been left as the only dw-prefix-less structure since the previous commit. Let's unify at least the structures naming in the driver by adding the dw_-prefix to it. Signed-off-by: Serge Semin --- Changelog v2: - This is a new patch introduced on v2 stage of the review. --- drivers/net/pcs/pcs-xpcs.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 48c61975db22..0af6b5995113 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -143,7 +143,7 @@ enum { DW_XPCS_INTERFACE_MAX, }; -struct xpcs_compat { +struct dw_xpcs_compat { const int *supported; const phy_interface_t *interface; int num_interfaces; @@ -154,16 +154,16 @@ struct xpcs_compat { struct dw_xpcs_desc { u32 id; u32 mask; - const struct xpcs_compat *compat; + const struct dw_xpcs_compat *compat; }; -static const struct xpcs_compat * +static const struct dw_xpcs_compat * xpcs_find_compat(const struct dw_xpcs_desc *desc, phy_interface_t interface) { int i, j; for (i = 0; i < DW_XPCS_INTERFACE_MAX; i++) { - const struct xpcs_compat *compat = &desc->compat[i]; + const struct dw_xpcs_compat *compat = &desc->compat[i]; for (j = 0; j < compat->num_interfaces; j++) if (compat->interface[j] == interface) @@ -175,7 +175,7 @@ xpcs_find_compat(const struct dw_xpcs_desc *desc, phy_interface_t interface) int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface) { - const struct xpcs_compat *compat; + const struct dw_xpcs_compat *compat; compat = xpcs_find_compat(xpcs->desc, interface); if (!compat) @@ -185,7 +185,7 @@ int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface) } EXPORT_SYMBOL_GPL(xpcs_get_an_mode); -static bool __xpcs_linkmode_supported(const struct xpcs_compat *compat, +static bool __xpcs_linkmode_supported(const struct dw_xpcs_compat *compat, enum ethtool_link_mode_bit_indices linkmode) { int i; @@ -277,7 +277,7 @@ static int xpcs_poll_reset(struct dw_xpcs *xpcs, int dev) } static int xpcs_soft_reset(struct dw_xpcs *xpcs, - const struct xpcs_compat *compat) + const struct dw_xpcs_compat *compat) { int ret, dev; @@ -418,7 +418,7 @@ static void xpcs_config_usxgmii(struct dw_xpcs *xpcs, int speed) } static int _xpcs_config_aneg_c73(struct dw_xpcs *xpcs, - const struct xpcs_compat *compat) + const struct dw_xpcs_compat *compat) { int ret, adv; @@ -463,7 +463,7 @@ static int _xpcs_config_aneg_c73(struct dw_xpcs *xpcs, } static int xpcs_config_aneg_c73(struct dw_xpcs *xpcs, - const struct xpcs_compat *compat) + const struct dw_xpcs_compat *compat) { int ret; @@ -482,7 +482,7 @@ static int xpcs_config_aneg_c73(struct dw_xpcs *xpcs, static int xpcs_aneg_done_c73(struct dw_xpcs *xpcs, struct phylink_link_state *state, - const struct xpcs_compat *compat, u16 an_stat1) + const struct dw_xpcs_compat *compat, u16 an_stat1) { int ret; @@ -607,7 +607,7 @@ static int xpcs_validate(struct phylink_pcs *pcs, unsigned long *supported, const struct phylink_link_state *state) { __ETHTOOL_DECLARE_LINK_MODE_MASK(xpcs_supported) = { 0, }; - const struct xpcs_compat *compat; + const struct dw_xpcs_compat *compat; struct dw_xpcs *xpcs; int i; @@ -633,7 +633,7 @@ void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces) int i, j; for (i = 0; i < DW_XPCS_INTERFACE_MAX; i++) { - const struct xpcs_compat *compat = &xpcs->desc->compat[i]; + const struct dw_xpcs_compat *compat = &xpcs->desc->compat[i]; for (j = 0; j < compat->num_interfaces; j++) __set_bit(compat->interface[j], interfaces); @@ -850,7 +850,7 @@ static int xpcs_config_2500basex(struct dw_xpcs *xpcs) int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, const unsigned long *advertising, unsigned int neg_mode) { - const struct xpcs_compat *compat; + const struct dw_xpcs_compat *compat; int ret; compat = xpcs_find_compat(xpcs->desc, interface); @@ -915,7 +915,7 @@ static int xpcs_config(struct phylink_pcs *pcs, unsigned int neg_mode, static int xpcs_get_state_c73(struct dw_xpcs *xpcs, struct phylink_link_state *state, - const struct xpcs_compat *compat) + const struct dw_xpcs_compat *compat) { bool an_enabled; int pcs_stat1; @@ -1115,7 +1115,7 @@ static void xpcs_get_state(struct phylink_pcs *pcs, struct phylink_link_state *state) { struct dw_xpcs *xpcs = phylink_pcs_to_xpcs(pcs); - const struct xpcs_compat *compat; + const struct dw_xpcs_compat *compat; int ret; compat = xpcs_find_compat(xpcs->desc, state->interface); @@ -1269,7 +1269,7 @@ static u32 xpcs_get_id(struct dw_xpcs *xpcs) return 0xffffffff; } -static const struct xpcs_compat synopsys_xpcs_compat[DW_XPCS_INTERFACE_MAX] = { +static const struct dw_xpcs_compat synopsys_xpcs_compat[DW_XPCS_INTERFACE_MAX] = { [DW_XPCS_USXGMII] = { .supported = xpcs_usxgmii_features, .interface = xpcs_usxgmii_interfaces, @@ -1314,7 +1314,7 @@ static const struct xpcs_compat synopsys_xpcs_compat[DW_XPCS_INTERFACE_MAX] = { }, }; -static const struct xpcs_compat nxp_sja1105_xpcs_compat[DW_XPCS_INTERFACE_MAX] = { +static const struct dw_xpcs_compat nxp_sja1105_xpcs_compat[DW_XPCS_INTERFACE_MAX] = { [DW_XPCS_SGMII] = { .supported = xpcs_sgmii_features, .interface = xpcs_sgmii_interfaces, @@ -1324,7 +1324,7 @@ static const struct xpcs_compat nxp_sja1105_xpcs_compat[DW_XPCS_INTERFACE_MAX] = }, }; -static const struct xpcs_compat nxp_sja1110_xpcs_compat[DW_XPCS_INTERFACE_MAX] = { +static const struct dw_xpcs_compat nxp_sja1110_xpcs_compat[DW_XPCS_INTERFACE_MAX] = { [DW_XPCS_SGMII] = { .supported = xpcs_sgmii_features, .interface = xpcs_sgmii_interfaces, @@ -1418,7 +1418,7 @@ static int xpcs_init_id(struct dw_xpcs *xpcs) static int xpcs_init_iface(struct dw_xpcs *xpcs, phy_interface_t interface) { - const struct xpcs_compat *compat; + const struct dw_xpcs_compat *compat; compat = xpcs_find_compat(xpcs->desc, interface); if (!compat) -- 2.43.0