[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211129201400.488c8ef9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Mon, 29 Nov 2021 20:14:00 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leon@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>,
Leon Romanovsky <leonro@...dia.com>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Ido Schimmel <idosch@...dia.com>, Jiri Pirko <jiri@...dia.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>
Subject: Re: [PATCH net-next v1] devlink: Simplify devlink resources
unregister call
On Sun, 28 Nov 2021 14:42:44 +0200 Leon Romanovsky wrote:
> The devlink_resources_unregister() used second parameter as an
> entry point for the recursive removal of devlink resources. None
> of external to devlink users needed to use this field, so lat's
None of the callers outside of devlink core...
s/lat/let/
> remove it.
> diff --git a/include/net/devlink.h b/include/net/devlink.h
> index e3c88fabd700..043fcec8b0aa 100644
> --- a/include/net/devlink.h
> +++ b/include/net/devlink.h
> @@ -361,33 +361,6 @@ devlink_resource_size_params_init(struct devlink_resource_size_params *size_para
>
> typedef u64 devlink_resource_occ_get_t(void *priv);
>
> -/**
> - * struct devlink_resource - devlink resource
> - * @name: name of the resource
> - * @id: id, per devlink instance
> - * @size: size of the resource
> - * @size_new: updated size of the resource, reload is needed
> - * @size_valid: valid in case the total size of the resource is valid
> - * including its children
> - * @parent: parent resource
> - * @size_params: size parameters
> - * @list: parent list
> - * @resource_list: list of child resources
> - */
> -struct devlink_resource {
> - const char *name;
> - u64 id;
> - u64 size;
> - u64 size_new;
> - bool size_valid;
> - struct devlink_resource *parent;
> - struct devlink_resource_size_params size_params;
> - struct list_head list;
> - struct list_head resource_list;
> - devlink_resource_occ_get_t *occ_get;
> - void *occ_get_priv;
> -};
> diff --git a/net/core/devlink.c b/net/core/devlink.c
> index fd21022145a3..db3b52110cf2 100644
> --- a/net/core/devlink.c
> +++ b/net/core/devlink.c
> @@ -69,6 +69,35 @@ struct devlink {
> char priv[] __aligned(NETDEV_ALIGN);
> };
>
> +/**
> + * struct devlink_resource - devlink resource
> + * @name: name of the resource
> + * @id: id, per devlink instance
> + * @size: size of the resource
> + * @size_new: updated size of the resource, reload is needed
> + * @size_valid: valid in case the total size of the resource is valid
> + * including its children
> + * @parent: parent resource
> + * @size_params: size parameters
> + * @list: parent list
> + * @resource_list: list of child resources
> + * @occ_get: occupancy getter callback
> + * @occ_get_priv: occupancy getter callback priv
> + */
> +struct devlink_resource {
> + const char *name;
> + u64 id;
> + u64 size;
> + u64 size_new;
> + bool size_valid;
> + struct devlink_resource *parent;
> + struct devlink_resource_size_params size_params;
> + struct list_head list;
> + struct list_head resource_list;
> + devlink_resource_occ_get_t *occ_get;
> + void *occ_get_priv;
> +};
Hiding struct devlink_resource is not mentioned in the commit message
and entirely unrelated to removal of the unused argument.
Powered by blists - more mailing lists