[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97bb7495-7bf7-4511-8d30-ba9d47b6065e@gmail.com>
Date: Fri, 12 Apr 2024 21:14:59 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <kuba@...nel.org>, David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: constify net_class
On 12.04.2024 18:38, Stephen Hemminger wrote:
> On Fri, 12 Apr 2024 12:17:57 +0200
> Heiner Kallweit <hkallweit1@...il.com> wrote:
>
>> AFAICS all users of net_class take a const struct class * argument.
>> Therefore fully constify net_class.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
>> ---
>
> Acked-by: Stephen Hemminger <stephen@...workplumber.org>
>
> PS: net_class_attr can be const as well?
No, this results in warnings, because the const is at least discarded.
struct attribute_group {
const char *name;
umode_t (*is_visible)(struct kobject *,
struct attribute *, int);
umode_t (*is_bin_visible)(struct kobject *,
struct bin_attribute *, int);
struct attribute **attrs;
struct bin_attribute **bin_attrs;
};
Powered by blists - more mailing lists