Re: [RFC][PATCH] rcu: Use typeof(p) instead of typeof(*p) *
From: Rasmus Villemoes
Date: Tue Oct 05 2021 - 14:02:11 EST
On 05/10/2021 15.47, Steven Rostedt wrote:
> That is, instead of declaring: typeof(*p) *_p; just do:
> typeof(p) _p;
>
> Also had to update a lot of the function pointer initialization in the
> networking code, as a function address must be passed as an argument in
> RCU_INIT_POINTER()
I would think that one could avoid that churn by saying
typeof((p) + 0)
instead of just "typeof(p)", to force the decay to a pointer.
Rasmus