Re: [PATCH net-next v2] netdevice: define and allocate &net_device _properly_

Eric Dumazet
2024-07-11T15:41:41Z

On Thu, Jul 11, 2024 at 5:54 AM Alexander Lobakin
<aleksander.lobakin@intel.com> wrote:
>
> From: Eric Dumazet <edumazet@google.com>
> Date: Wed, 10 Jul 2024 10:04:39 -0700
>
> > This is because of the ‘const’ qualifier of the parameter.
> >
> > This could be solved with _Generic() later, if we want to keep the
> > const qualifier.
>
> I tried _Generic() when I was working on this patch and it seems like
> lots of drivers need to be fixed first. They pass a const &net_device,
> but assign the result to a non-const variable and modify fields there.
> That's why I bet up on this and just casted to (void *) for now.

Right, I will clean things up in the next cycle.