Netdev List
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: constify net_class
Date: Fri, 12 Apr 2024 21:14:59 +0200	[thread overview]
Message-ID: <97bb7495-7bf7-4511-8d30-ba9d47b6065e@gmail.com> (raw)
In-Reply-To: <20240412093800.4d2521eb@hermes.local>

On 12.04.2024 18:38, Stephen Hemminger wrote:
> On Fri, 12 Apr 2024 12:17:57 +0200
> Heiner Kallweit <hkallweit1@gmail.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@gmail.com>
>> ---
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.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;
};


  reply	other threads:[~2024-04-12 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 10:17 [PATCH net-next] net: constify net_class Heiner Kallweit
2024-04-12 16:38 ` Stephen Hemminger
2024-04-12 19:14   ` Heiner Kallweit [this message]
2024-04-15  9:50 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97bb7495-7bf7-4511-8d30-ba9d47b6065e@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox