From nobody Tue Apr 7 18:46:54 2026 Received: from BL2PR02CU003.outbound.protection.outlook.com (mail-eastusazon11011028.outbound.protection.outlook.com [52.101.52.28]) (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 B78A530B50B; Thu, 26 Feb 2026 22:20:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.52.28 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772144418; cv=fail; b=perjPerVGLZX3ImSZYgoVZY8Rb3q+jFxu29YLaLhG4FmXPRvxJ9Aqq+JDg3Hc5XY3vZRBNYZAoH/97sZnqf8MnKZV3RDs5Ku32vCYAkzzNyE+f+ul9bq+82Pwg3ABOdFjLpF+MfJ+QH4vHH2hxlrcZuZDOnwTHB6wuUqE1HMrvQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772144418; c=relaxed/simple; bh=WKMc8go366rKjYJdlkcM5zzpqvpDpdbD6ZfBtZQp//U=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rRcyGIb+wBpYIMtYp81ewdiPGBLUAPIsgJ8Q2ci+nm8/PXJmu2ufuznA77by5Ub7WmOz4/FWdtO11QjyqjAycm341nQ83no+D2fA1dQWM1UEdmWUyh4jxoWXJUAo0kda/IDgEnwdwM2AKBzLIIbE+nDgMhgahQGmfAuxYSrQE2M= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=rpAQMn9u; arc=fail smtp.client-ip=52.101.52.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="rpAQMn9u" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hGc6InVcdhRuvzHeqFZWPZD3ilE+DdlKkrK4Hq4bkyqvex09ZAe9bA2UtzoLsb1b2U5Mk3fe9prtTeNuMbK4jC/ucPhsFV0xSW8rbSIeOVy3e4Vr0NeZDUYLPdlJjCM6YYRINU4rct8MeelIbqvprEEBiFeEBoJr2aCEyOvxc/2/A9rWPntUlBs0XJ1VZBm08GgRk2JqSbF9CrADaxjju6vqmLIdfvwrxXu1sjLSzdv312kAjqh+6dWc9uUSAA4YTL5O3TwFWQbKm3MqyukeiVDTpi+Bm182ZAW6aK+8m32uLauswGBiQCk0asloOuHoX1cgAiWhldT4I/ijn0c4fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g0+RnwIwf2uqmj1dFXgBvPQ1vhYYpOKOtxEx0c4MGrA=; b=P52Nm5RLmJE/6bTjgiLb5FYq6M3qBEp95WdgO3ZY95Wul9ZrQ2p34F0XOFiZps652blf/PbCWnxka+XHOUcb4eK8DjowhPDxhAxXgManPNdPmWX29BSNRHQf1jSyz+MK6Hqcf6wYDN+Z1+bFusBlmI5lwzm3uLaomnrnvmSQFrTtoRyY7HNEv6sm+tA+5Ya2Qgn5cs5IKyU+tqO83TF/gIFtwJJnjHAOgd4pai4dnf3NStEC2v70LtC3CqCtJ3HMY/X1JVTOatlOM7R7HN3TZafZ2HeUkJWzxbgEtU6/WnLfbvxtAERQlDkpU07aMPz8bXoyz7hVvl89ECtH6x+JVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=google.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g0+RnwIwf2uqmj1dFXgBvPQ1vhYYpOKOtxEx0c4MGrA=; b=rpAQMn9uSxpy4NxTy9WYMRJK55bwYZiQWRCS58xtCBtANvsDocWeRps/VH+rgGbMTxI8W8qOJhKHEoza+TjpK0/XGjshq/GRf6IbfZ2R4Hto9IHLdaUd1qvvwnO0T81PIS8hNgUDx/Co7xALzOQxiuRHL9hUNFuz/M41gj0S2ZOK8nKJ3lg04fK9D7WSOuOHCdvou1mjdZ8xTz36dkgiMkrA8IBcD6422LwQgTAgrqxIpqVhUCnMwoWvC5NUpsoXZoUFRPOIMhoYvLhSgn00CDSYGFvf9fPqF5Lu9EViAsxcQiL60BD2YtVo6YzvnJ0XmTaYnHMN7izNrPUputllfA== Received: from BYAPR03CA0010.namprd03.prod.outlook.com (2603:10b6:a02:a8::23) by MN2PR12MB4269.namprd12.prod.outlook.com (2603:10b6:208:1d4::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9632.16; Thu, 26 Feb 2026 22:20:09 +0000 Received: from SJ1PEPF0000231F.namprd03.prod.outlook.com (2603:10b6:a02:a8:cafe::6b) by BYAPR03CA0010.outlook.office365.com (2603:10b6:a02:a8::23) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9632.24 via Frontend Transport; Thu, 26 Feb 2026 22:20:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by SJ1PEPF0000231F.mail.protection.outlook.com (10.167.242.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.16 via Frontend Transport; Thu, 26 Feb 2026 22:20:09 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 26 Feb 2026 14:19:50 -0800 Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 26 Feb 2026 14:19:50 -0800 Received: from vdi.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Thu, 26 Feb 2026 14:19:45 -0800 From: Tariq Toukan To: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , "David S. Miller" CC: Donald Hunter , Jiri Pirko , Jonathan Corbet , Saeed Mahameed , "Leon Romanovsky" , Tariq Toukan , Mark Bloch , Shuah Khan , , , , , , Gal Pressman , Dragos Tatulea , Shay Drory , Jiri Pirko , Moshe Shemesh , Or Har-Toov Subject: [PATCH net-next V3 04/10] devlink: Refactor resource functions to be generic Date: Fri, 27 Feb 2026 00:19:10 +0200 Message-ID: <20260226221916.1800227-5-tariqt@nvidia.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20260226221916.1800227-1-tariqt@nvidia.com> References: <20260226221916.1800227-1-tariqt@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231F:EE_|MN2PR12MB4269:EE_ X-MS-Office365-Filtering-Correlation-Id: aab81cfe-0a41-4c48-0519-08de758533c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|7416014|376014|1800799024; X-Microsoft-Antispam-Message-Info: tMCQ2FQzhFv9F4RP4QTxId6PeHn2UlRWBvDPBzWgTviZCGSMQYHGyN7m3ttNJuqpdNqqLuxZipabktzvJ3BnlqzyFXqIP9miTguEN5zGS/+lX39TnjuljyinjF6W37HBYZid2GhZMmxZjRoRD1koVxm6UMv4q5Q6u5XCyBgHMsJe8ZXHyjsYgYq0k9TWBRWqPfVpr7npAWhvvE/0tdJhsxz256Cpn8deG4lHbOjmG5y0Ov0omU4tAfxJAWYdO0nZedfuLy0ox/qVJBy0ItoobX4cR9AvjEOnPt7o/nCXqP7FscHtqyTHOsJxl3B7sVh29m07cydbYMaLVgvju1v1pU64u41pH/tRtsrd8snbDXbOjmtd5gAGHySFIrZd7UyYpNgPzYR2+AelD+4+728xjcVdvA2j9Ey9BT9sITKeR3cpNy8IvWpXk6WLus+5ho4wwu5CTIxgOhB93Qv9ReUlCj93mrQqgq3GPq0815cAsDqGElLNszWV+RiakUyweg7m4CKWht6+AS/ta6FzA+1PVCQqFeddmAmNFHDfCWoNo7ZIIDkpaTPGZ7uuqm1Y2NNFnNz+klg46IsaEMGc+H0YZdRDz3lYALkcQ5xdeLrUyC7PyTbCt7uVE19dGFcRzL7aiktuZ3hFs9S39303IWtsZoEIXCmxHt7Hgf8jVdmE42p56mdlt8Qh3VLkOlA9BB0Sw2FMRRnRRc9AnvoE6V2ahfK6EC4yvh/ac3aemXsiuvDd7uMLr85RwlVwn2mVbXwjt7IClJBZ7tTGj2OMQizVKok2y6j/Hb6+okYLO/JS8bdgcX7OCt8CjtCe3Xzdu0y293KcQaj33aeg8aYGjVdviw== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230040)(36860700013)(82310400026)(7416014)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: s1DKw50pUhWLvxQCEw2yW4dWHgllfdvF0nWQaA/ujhJ/uo6LSAP1ds7Gwko09FmlmyWcZGUUOrN/UagDrh7UvNEm5HFIYOfiSAts+ae4PNE5cdnSLuwNjruKGzbqZtwZUoYXW9NAlh238I5WFUxuZShIS3tqmKzcOng2iEYeCkiQfLKBMCFoISMozlUpWJFogVzkvmsDE6GwY1Rr1pZrYsANp1Ny5N2E0cUBwpkCmNXASGMvfVp0ADLohpz2FyGnQL5awXOTMEWgGVvKCMvtwiqNMEjaPdKBCAzm8Af4C5OY5t/FohIlYy6Qr76xgh8qkYV9Cd7texQYAuT1fHT02UEUU5ZySg/vl59+HwHX7AX9lk9sXPjz8HFF2VS+7OA0IaTErn5maIPFh4tzsZm7ACNf1+H0oodGokm2iQaLsXh8C6rCuXiqrSyZGz621VE5 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2026 22:20:09.1661 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aab81cfe-0a41-4c48-0519-08de758533c8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF0000231F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4269 Content-Type: text/plain; charset="utf-8" From: Or Har-Toov Currently the resource functions take devlink pointer as parameter and take the resource list from there. Allow resource functions to work with other resource lists that will be added in next patches and not only with the devlink's resource list. Signed-off-by: Or Har-Toov Reviewed-by: Shay Drori Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: Tariq Toukan --- include/net/devlink.h | 2 +- net/devlink/resource.c | 140 ++++++++++++++++++++++++++--------------- 2 files changed, 91 insertions(+), 51 deletions(-) diff --git a/include/net/devlink.h b/include/net/devlink.h index cb839e0435a1..48e1ad067836 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1875,7 +1875,7 @@ int devl_resource_register(struct devlink *devlink, u64 resource_size, u64 resource_id, u64 parent_resource_id, - const struct devlink_resource_size_params *size_params); + const struct devlink_resource_size_params *params); void devl_resources_unregister(struct devlink *devlink); void devlink_resources_unregister(struct devlink *devlink); int devl_resource_size_get(struct devlink *devlink, diff --git a/net/devlink/resource.c b/net/devlink/resource.c index 5131875482ec..10043ad26dfd 100644 --- a/net/devlink/resource.c +++ b/net/devlink/resource.c @@ -36,15 +36,16 @@ struct devlink_resource { }; =20 static struct devlink_resource * -devlink_resource_find(struct devlink *devlink, - struct devlink_resource *resource, u64 resource_id) +__devlink_resource_find(struct list_head *resource_list_head, + struct devlink_resource *resource, + u64 resource_id) { struct list_head *resource_list; =20 if (resource) resource_list =3D &resource->resource_list; else - resource_list =3D &devlink->resource_list; + resource_list =3D resource_list_head; =20 list_for_each_entry(resource, resource_list, list) { struct devlink_resource *child_resource; @@ -52,14 +53,23 @@ devlink_resource_find(struct devlink *devlink, if (resource->id =3D=3D resource_id) return resource; =20 - child_resource =3D devlink_resource_find(devlink, resource, - resource_id); + child_resource =3D __devlink_resource_find(resource_list_head, + resource, + resource_id); if (child_resource) return child_resource; } return NULL; } =20 +static struct devlink_resource * +devlink_resource_find(struct devlink *devlink, + struct devlink_resource *resource, u64 resource_id) +{ + return __devlink_resource_find(&devlink->resource_list, + resource, resource_id); +} + static void devlink_resource_validate_children(struct devlink_resource *resource) { @@ -215,13 +225,14 @@ static int devlink_resource_put(struct devlink *devli= nk, struct sk_buff *skb, =20 static int devlink_resource_list_fill(struct sk_buff *skb, struct devlink *devlink, + struct list_head *resource_list_head, int *idx) { struct devlink_resource *resource; int i =3D 0; int err; =20 - list_for_each_entry(resource, &devlink->resource_list, list) { + list_for_each_entry(resource, resource_list_head, list) { if (i < *idx) { i++; continue; @@ -237,8 +248,9 @@ static int devlink_resource_list_fill(struct sk_buff *s= kb, return 0; } =20 -static int devlink_resource_fill(struct genl_info *info, - enum devlink_command cmd, int flags) +static int __devlink_resource_fill(struct genl_info *info, + struct list_head *resource_list_head, + enum devlink_command cmd, int flags) { struct devlink *devlink =3D info->user_ptr[0]; struct nlattr *resources_attr; @@ -250,6 +262,9 @@ static int devlink_resource_fill(struct genl_info *info, int i =3D 0; int err; =20 + if (list_empty(resource_list_head)) + return -EOPNOTSUPP; + start_again: err =3D devlink_nl_msg_reply_and_new(&skb, info); if (err) @@ -272,7 +287,7 @@ static int devlink_resource_fill(struct genl_info *info, =20 incomplete =3D false; start_idx =3D i; - err =3D devlink_resource_list_fill(skb, devlink, &i); + err =3D devlink_resource_list_fill(skb, devlink, resource_list_head, &i); if (err) { if (i =3D=3D start_idx) goto err_resource_put; @@ -300,13 +315,17 @@ static int devlink_resource_fill(struct genl_info *in= fo, return err; } =20 -int devlink_nl_resource_dump_doit(struct sk_buff *skb, struct genl_info *i= nfo) +static int devlink_resource_fill(struct genl_info *info, + enum devlink_command cmd, int flags) { struct devlink *devlink =3D info->user_ptr[0]; =20 - if (list_empty(&devlink->resource_list)) - return -EOPNOTSUPP; + return __devlink_resource_fill(info, &devlink->resource_list, + cmd, flags); +} =20 +int devlink_nl_resource_dump_doit(struct sk_buff *skb, struct genl_info *i= nfo) +{ return devlink_resource_fill(info, DEVLINK_CMD_RESOURCE_DUMP, 0); } =20 @@ -338,7 +357,8 @@ devlink_nl_resource_dump_one(struct sk_buff *skb, struc= t devlink *devlink, goto nla_put_failure; } =20 - err =3D devlink_resource_list_fill(skb, devlink, &state->idx); + err =3D devlink_resource_list_fill(skb, devlink, + &devlink->resource_list, &state->idx); if (err) { if (state->idx =3D=3D start_idx) goto nla_put_failure_unwind; @@ -385,26 +405,12 @@ int devlink_resources_validate(struct devlink *devlin= k, return err; } =20 -/** - * devl_resource_register - devlink resource register - * - * @devlink: devlink - * @resource_name: resource's name - * @resource_size: resource's size - * @resource_id: resource's id - * @parent_resource_id: resource's parent id - * @size_params: size parameters - * - * Generic resources should reuse the same names across drivers. - * Please see the generic resources list at: - * Documentation/networking/devlink/devlink-resource.rst - */ -int devl_resource_register(struct devlink *devlink, - const char *resource_name, - u64 resource_size, - u64 resource_id, - u64 parent_resource_id, - const struct devlink_resource_size_params *size_params) +static int +__devl_resource_register(struct devlink *devlink, + struct list_head *resource_list_head, + const char *resource_name, u64 resource_size, + u64 resource_id, u64 parent_resource_id, + const struct devlink_resource_size_params *params) { struct devlink_resource *resource; struct list_head *resource_list; @@ -414,7 +420,8 @@ int devl_resource_register(struct devlink *devlink, =20 top_hierarchy =3D parent_resource_id =3D=3D DEVLINK_RESOURCE_ID_PARENT_TO= P; =20 - resource =3D devlink_resource_find(devlink, NULL, resource_id); + resource =3D __devlink_resource_find(resource_list_head, NULL, + resource_id); if (resource) return -EEXIST; =20 @@ -423,12 +430,13 @@ int devl_resource_register(struct devlink *devlink, return -ENOMEM; =20 if (top_hierarchy) { - resource_list =3D &devlink->resource_list; + resource_list =3D resource_list_head; } else { struct devlink_resource *parent_resource; =20 - parent_resource =3D devlink_resource_find(devlink, NULL, - parent_resource_id); + parent_resource =3D __devlink_resource_find(resource_list_head, + NULL, + parent_resource_id); if (parent_resource) { resource_list =3D &parent_resource->resource_list; resource->parent =3D parent_resource; @@ -443,46 +451,78 @@ int devl_resource_register(struct devlink *devlink, resource->size_new =3D resource_size; resource->id =3D resource_id; resource->size_valid =3D true; - memcpy(&resource->size_params, size_params, - sizeof(resource->size_params)); + memcpy(&resource->size_params, params, sizeof(resource->size_params)); INIT_LIST_HEAD(&resource->resource_list); list_add_tail(&resource->list, resource_list); =20 return 0; } + +/** + * devl_resource_register - devlink resource register + * + * @devlink: devlink + * @resource_name: resource's name + * @resource_size: resource's size + * @resource_id: resource's id + * @parent_resource_id: resource's parent id + * @params: size parameters + * + * Generic resources should reuse the same names across drivers. + * Please see the generic resources list at: + * Documentation/networking/devlink/devlink-resource.rst + * + * Return: 0 on success, negative error code otherwise. + */ +int devl_resource_register(struct devlink *devlink, const char *resource_n= ame, + u64 resource_size, u64 resource_id, + u64 parent_resource_id, + const struct devlink_resource_size_params *params) +{ + return __devl_resource_register(devlink, &devlink->resource_list, + resource_name, resource_size, + resource_id, parent_resource_id, + params); +} EXPORT_SYMBOL_GPL(devl_resource_register); =20 -static void devlink_resource_unregister(struct devlink *devlink, - struct devlink_resource *resource) +static void devlink_resource_unregister(struct devlink_resource *resource) { struct devlink_resource *tmp, *child_resource; =20 list_for_each_entry_safe(child_resource, tmp, &resource->resource_list, list) { - devlink_resource_unregister(devlink, child_resource); + devlink_resource_unregister(child_resource); list_del(&child_resource->list); kfree(child_resource); } } =20 -/** - * devl_resources_unregister - free all resources - * - * @devlink: devlink - */ -void devl_resources_unregister(struct devlink *devlink) +static void +__devl_resources_unregister(struct devlink *devlink, + struct list_head *resource_list_head) { struct devlink_resource *tmp, *child_resource; =20 lockdep_assert_held(&devlink->lock); =20 - list_for_each_entry_safe(child_resource, tmp, &devlink->resource_list, + list_for_each_entry_safe(child_resource, tmp, resource_list_head, list) { - devlink_resource_unregister(devlink, child_resource); + devlink_resource_unregister(child_resource); list_del(&child_resource->list); kfree(child_resource); } } + +/** + * devl_resources_unregister - free all resources + * + * @devlink: devlink + */ +void devl_resources_unregister(struct devlink *devlink) +{ + __devl_resources_unregister(devlink, &devlink->resource_list); +} EXPORT_SYMBOL_GPL(devl_resources_unregister); =20 /** --=20 2.44.0