[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87msl0g8wl.ffs@tglx>
Date: Sun, 25 Aug 2024 13:05:14 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: jeff.xie@...ux.dev
Cc: linux-kernel@...r.kernel.org, xiehuan09@...il.com
Subject: Re: [PATCH] genirq: procfs: Make smp_affinity read-only for
interrupts marked with IRQD_AFFINITY_MANAGED flag
On Sat, Aug 24 2024 at 14:54, jeff xie wrote:
>> This unlikely is a pointless exercise as this is not a hotpath
>> operation. Also please switch to S_IRUGO / S_IWUSR and simplify the
>> whole thing to:
>>
>> umode_t umode = S_IRUGO;
>>
>> if (!irqd_affinity_is_managed(&desc->irq_data))
>
> Okay, I will delete the unlikely.
>
> After thoroughly analyzing the code, I think it would be better to
> replace irqd_affinity_is_managed() with irq_can_set_affinity_usr()
> like below. What do you think?
>
> if (irq_can_set_affinity_usr(desc->irq_data.irq))
> umode |= S_IWUSR;
Makes sense
Powered by blists - more mailing lists