Re: [PATCH for-next v1] locking: Add __percpu tag to decode_tail qnode argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 19, 2025 at 6:35 AM Kumar Kartikeya Dwivedi
<memxor@xxxxxxxxx> wrote:
>
> The decode_tail function now takes a qnode argument to use distinct
> qnodes for qspinlock and rqspinlock. Add a __percpu tag to avoid
> warnings and errors and reflect that the qnodes are per-cpu. There
> is no actual bug here as the value was not dereferenced directly and
> passed to per_cpu_ptr, so this is just to suppress the warning/errors
> at compile time.
>
> Fixes: 06988910ee2d ("locking: Move common qspinlock helpers to a private header")
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>
> ---
>  kernel/locking/qspinlock.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/locking/qspinlock.h b/kernel/locking/qspinlock.h
> index d4ceb9490365..f63b6e04ddd4 100644
> --- a/kernel/locking/qspinlock.h
> +++ b/kernel/locking/qspinlock.h
> @@ -59,7 +59,7 @@ static inline __pure u32 encode_tail(int cpu, int idx)
>         return tail;
>  }
>
> -static inline __pure struct mcs_spinlock *decode_tail(u32 tail, struct qnode *qnodes)
> +static inline __pure struct mcs_spinlock *decode_tail(u32 tail, struct qnode __percpu *qnodes)

Applied. Decided to squash it in and adjusted to
new line to make it shorter.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux