Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1322587rdb; Tue, 30 Jan 2024 15:16:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVfsTDkcGBfP2nGe8ikG1lEi+VfUtK7s04fvqe5iJAvgC7Vty11v8BPJGlbo9yuwlOX6Sr X-Received: by 2002:ac8:5fc4:0:b0:42a:b174:50e4 with SMTP id k4-20020ac85fc4000000b0042ab17450e4mr129019qta.28.1706656567857; Tue, 30 Jan 2024 15:16:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706656567; cv=pass; d=google.com; s=arc-20160816; b=wBMKqZdEPJsVB5ZreZlbl41kr31cU4UfMjetE6nVzUcyDntxnsTucrohfgU/rTqwYM Dn3lYmrz54X7Q3YaEP467PJtvbOR434ZtYMo3AOfEqvk4Y2rdwExAO9XqliMqJgeKCBF K5qbTHzIbA7FY8REGani4Q5kRqjt7HseUaJyN+A1xdyKYHyKdWYSjMp1kTaDAe0olwXp jtEF73OZGEYHK+A3S5u08rk6T3++IEuxVnc7Vk5Cc77VTGey58IDSaQEtIkW5C/IZ3DJ pRIAiMqOhif5Nrlcvj6h2OzntMgw/O7MqnBYV04nWBf/uznCyHY6qsZ4s29MXd6c9W3a cXRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=RFmiP8u0XylO+2YgibNLkampEImJxL5ecq2MK58dcw0=; fh=mTvjTqym02yeN0tlAPLrMKgv4tfcsXLZmOUHn1dWpO8=; b=O/1ppxDTzs1bKw3JqXMhQKNL1S0HwMoPX6aWdqkzyoMdI5e35xbCPYdvhv6zbVQsgl bAb7tkn7pjCv/ObKr0usU6R258Qu8hiY5fmMJBySl2qoLmDo0pYJlKvVVTQvzUpbG767 w/IRMGZzMArFcR10iktdVloAwCeGnodaGgTXXBkbCDYgL2SaIankWuMA33iu0nqlaWZV 6LDwixqyyGviR+ByeOuVQHbCYOrS4tKmjnKpgDfEERxWiViYorrVd9s5560xUSMBC8Fy zeQlzjXtOPXfogQg/Iu6PqIkN1IdLqDjhuX/pLBjE/Ts4yfaJgoG+7nQFYcoMgSPuyMQ XScA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bQe58B2g; 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-45456-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45456-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x8-20020a05622a000800b0042ab883bf41si2241151qtw.761.2024.01.30.15.16.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 15:16:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45456-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bQe58B2g; 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-45456-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45456-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3C12E1C23D91 for ; Tue, 30 Jan 2024 23:16:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23E8A80C1B; Tue, 30 Jan 2024 23:14:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bQe58B2g" Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 8577D80C05; Tue, 30 Jan 2024 23:14:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706656466; cv=none; b=kM7Asg8vw+uzLWQ2krMxmasKTylpq4yBpFOFsowuNLCkKLDpAN0/TqZlBa9L5eMg0CYhcfuBefxnzJFXHR/rwnSNeTTZHfPkxrbvtbjX32+eJD7/Py2XAP09mgPLi0hwjTDTm1JrttVdrzQIqSsVA+ZpqYX0dkiMec0CFwZPxlM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706656466; c=relaxed/simple; bh=O9Z0K/in+V/0Sg8kYoxYiAta8TGB/5GvVdjlD41NHi4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZAjIuc3m0V4J4ScEJTnhOoPJ7p4BFyhKj/+BTWvUkVXQOII7IAiwTJGvT1pvah6Cq0H4XiTEK6a2OUQVdntYiljr/ef2KWfa0gp0V5fpvCd7pghDZ463yXPv+SNv4Vf3Hrdy07S+oqvp4zGiqzvt3U3OWOkSE3U2bnBXfzuLcYw= 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=bQe58B2g; arc=none smtp.client-ip=209.85.214.173 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-pl1-f173.google.com with SMTP id d9443c01a7336-1d751bc0c15so38780395ad.2; Tue, 30 Jan 2024 15:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706656464; x=1707261264; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RFmiP8u0XylO+2YgibNLkampEImJxL5ecq2MK58dcw0=; b=bQe58B2gRzgtrK/IoIl7R44LIVaXm6rA2fjGIryAOa2JDkYkaYRiz9RJ4RJj2ymNUq irOHKNCi2FEuIbT89fmDrYVHzgp1ltuQ+0qcY/SFaLPlF3GNmbUN8ghRzOGwzL1yQElT Ldfdo5wwiUASerA3Nn9IWEzCSVOeMJJoXCWt6G71Wap5xM87gMzsYsan70xXnRldSj00 Iea1SBi64U/qbrJVFFyozxav2FnAApzVXVN1VxzAHZz3dMiN7dXGpPq3eLZcBBcVv17w AY3xdbaMLtzr+DZLk96WbBewTuu3pR8juFhWOqVkLUqVVZ93pI6EB/ZQPUD60MwJN0hj QWMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706656464; x=1707261264; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RFmiP8u0XylO+2YgibNLkampEImJxL5ecq2MK58dcw0=; b=pOiP0kuCNUQCJEDwfPBR5eilwzmU8V8L9qlLhHL1VeE55ZIe+kBmHrS28V06rZ7rOV 9JOceXGKqrNui8TFXGjVeRQNjZukwbU5QQzCY+89qlw3MkpjTqk7j5lVohxHLOSWGYIB QRCWs7V6wyCcKCkA1YyijCNYJdVwnHh/S9cJfImTM5Ui2wlYJoqvlprmSK2S74of40y/ LNJKk7o9w/CAC/jUR8o8Y0IyIVfkOIJIzjCunD0UaslLzLqXm68nVyWllx+G4lZnQPS9 Te1jguqLZ4jY9S2aJU/7SH+yrigt6vVq/92v9N9yCvkOdzd9+zO+Ic9stLh1O2ajROnO AaSA== X-Gm-Message-State: AOJu0YyWF4UC4W4gDv/qK9q9gbBI4nD/jL0dRFHfpnZKEng1QCF34kMu 4gjizG2MpbHQ/dP1nth4RC5A/BTnFayw5Ph64QkRZETTSFUNzfSs X-Received: by 2002:a17:903:11cc:b0:1d8:ebdf:183a with SMTP id q12-20020a17090311cc00b001d8ebdf183amr80430plh.6.1706656463871; Tue, 30 Jan 2024 15:14:23 -0800 (PST) Received: from tresc054937.tre-sc.gov.br ([2804:c:204:200:2be:43ff:febc:c2fb]) by smtp.gmail.com with ESMTPSA id jx2-20020a170903138200b001d8f251c8b2sm3473203plb.221.2024.01.30.15.14.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 15:14:23 -0800 (PST) From: Luiz Angelo Daros de Luca Date: Tue, 30 Jan 2024 20:13:25 -0300 Subject: [PATCH net-next v5 06/11] net: dsa: realtek: merge rtl83xx and interface modules into realtek-dsa 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: 7bit Message-Id: <20240130-realtek_reverse-v5-6-ecafd9283a07@gmail.com> References: <20240130-realtek_reverse-v5-0-ecafd9283a07@gmail.com> In-Reply-To: <20240130-realtek_reverse-v5-0-ecafd9283a07@gmail.com> To: Linus Walleij , =?utf-8?q?Alvin_=C5=A0ipraga?= , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luiz Angelo Daros de Luca , Florian Fainelli X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3898; i=luizluca@gmail.com; h=from:subject:message-id; bh=O9Z0K/in+V/0Sg8kYoxYiAta8TGB/5GvVdjlD41NHi4=; b=owEBbQGS/pANAwAIAbsR27rRBztWAcsmYgBluYKxF8R4opkUW6HN6uV0Nens8pcKQvtDrelMM MAsQSccR9CJATMEAAEIAB0WIQQRByhHhc1bOhL6L/i7Edu60Qc7VgUCZbmCsQAKCRC7Edu60Qc7 VpjIB/9s7c9o2n3On29AW5hEBVabaguN1eI0gdan+JynoEAYTLsjy1jX8dLLQUzii91j6xBuQH4 Nbs7e35EA+BXFrOx/80R2frlIX4ADz6kzy8D9oK8TUCClDHpDliTy7q9X6KBBFBX3aYZGCDycwy 1bzYU6h8l236jjens+/qhye7A9kkNRkEc2r6UZbED9MkFpag5LFpaovzogoPe/EvTdHJr7z1eHP Utzwm8BGokEGezUMUBht+uwDuv0agxKV46zhrom9gLgMZnnN7YDlQ4QrXPDapN57b9RQpjsqYmS PEUAv6B0nyitR6hr/Gz+qlSS4rFuarn6126UyPNqwqHRlx1l X-Developer-Key: i=luizluca@gmail.com; a=openpgp; fpr=1107284785CD5B3A12FA2FF8BB11DBBAD1073B56 Since rtl83xx and realtek-{smi,mdio} are always loaded together, we can optimize resource usage by consolidating them into a single module. Signed-off-by: Luiz Angelo Daros de Luca Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- drivers/net/dsa/realtek/Kconfig | 4 ++-- drivers/net/dsa/realtek/Makefile | 11 +++++++++-- drivers/net/dsa/realtek/realtek-mdio.c | 5 ----- drivers/net/dsa/realtek/realtek-smi.c | 5 ----- drivers/net/dsa/realtek/rtl83xx.c | 1 + 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/net/dsa/realtek/Kconfig b/drivers/net/dsa/realtek/Kconfig index 9d182fde11b4..6989972eebc3 100644 --- a/drivers/net/dsa/realtek/Kconfig +++ b/drivers/net/dsa/realtek/Kconfig @@ -16,14 +16,14 @@ menuconfig NET_DSA_REALTEK if NET_DSA_REALTEK config NET_DSA_REALTEK_MDIO - tristate "Realtek MDIO interface support" + bool "Realtek MDIO interface support" depends on OF help Select to enable support for registering switches configured through MDIO. config NET_DSA_REALTEK_SMI - tristate "Realtek SMI interface support" + bool "Realtek SMI interface support" depends on OF help Select to enable support for registering switches connected diff --git a/drivers/net/dsa/realtek/Makefile b/drivers/net/dsa/realtek/Makefile index 67b5ee1c43a9..6ed6b4598d2e 100644 --- a/drivers/net/dsa/realtek/Makefile +++ b/drivers/net/dsa/realtek/Makefile @@ -1,8 +1,15 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_NET_DSA_REALTEK) += realtek-dsa.o realtek-dsa-objs := rtl83xx.o -obj-$(CONFIG_NET_DSA_REALTEK_MDIO) += realtek-mdio.o -obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek-smi.o + +ifdef CONFIG_NET_DSA_REALTEK_MDIO +realtek-dsa-objs += realtek-mdio.o +endif + +ifdef CONFIG_NET_DSA_REALTEK_SMI +realtek-dsa-objs += realtek-smi.o +endif + obj-$(CONFIG_NET_DSA_REALTEK_RTL8366RB) += rtl8366.o rtl8366-objs := rtl8366-core.o rtl8366rb.o obj-$(CONFIG_NET_DSA_REALTEK_RTL8365MB) += rtl8365mb.o diff --git a/drivers/net/dsa/realtek/realtek-mdio.c b/drivers/net/dsa/realtek/realtek-mdio.c index 7cbce3e893e1..45d9ef43fe3d 100644 --- a/drivers/net/dsa/realtek/realtek-mdio.c +++ b/drivers/net/dsa/realtek/realtek-mdio.c @@ -184,8 +184,3 @@ void realtek_mdio_shutdown(struct mdio_device *mdiodev) rtl83xx_shutdown(priv); } EXPORT_SYMBOL_NS_GPL(realtek_mdio_shutdown, REALTEK_DSA); - -MODULE_AUTHOR("Luiz Angelo Daros de Luca "); -MODULE_DESCRIPTION("Driver for Realtek ethernet switch connected via MDIO interface"); -MODULE_LICENSE("GPL"); -MODULE_IMPORT_NS(REALTEK_DSA); diff --git a/drivers/net/dsa/realtek/realtek-smi.c b/drivers/net/dsa/realtek/realtek-smi.c index ffa68272d0d4..67bdad7ac910 100644 --- a/drivers/net/dsa/realtek/realtek-smi.c +++ b/drivers/net/dsa/realtek/realtek-smi.c @@ -464,8 +464,3 @@ void realtek_smi_shutdown(struct platform_device *pdev) rtl83xx_shutdown(priv); } EXPORT_SYMBOL_NS_GPL(realtek_smi_shutdown, REALTEK_DSA); - -MODULE_AUTHOR("Linus Walleij "); -MODULE_DESCRIPTION("Driver for Realtek ethernet switch connected via SMI interface"); -MODULE_LICENSE("GPL"); -MODULE_IMPORT_NS(REALTEK_DSA); diff --git a/drivers/net/dsa/realtek/rtl83xx.c b/drivers/net/dsa/realtek/rtl83xx.c index 702ee0d40b0b..fb3b3b2305d1 100644 --- a/drivers/net/dsa/realtek/rtl83xx.c +++ b/drivers/net/dsa/realtek/rtl83xx.c @@ -229,5 +229,6 @@ void rtl83xx_remove(struct realtek_priv *priv) EXPORT_SYMBOL_NS_GPL(rtl83xx_remove, REALTEK_DSA); MODULE_AUTHOR("Luiz Angelo Daros de Luca "); +MODULE_AUTHOR("Linus Walleij "); MODULE_DESCRIPTION("Realtek DSA switches common module"); MODULE_LICENSE("GPL"); -- 2.43.0