public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: jeff.xie@linux.dev
Cc: linux-kernel@vger.kernel.org, xiehuan09@gmail.com
Subject: Re: [PATCH] genirq: procfs: Make smp_affinity read-only for interrupts marked with IRQD_AFFINITY_MANAGED flag
Date: Sun, 25 Aug 2024 13:05:14 +0200	[thread overview]
Message-ID: <87msl0g8wl.ffs@tglx> (raw)
In-Reply-To: <f2e282ae3c502561d8ae302f535d969250dd967e@linux.dev>

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

      reply	other threads:[~2024-08-25 11:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  2:09 [PATCH] genirq: procfs: Make smp_affinity read-only for interrupts marked with IRQD_AFFINITY_MANAGED flag Jeff Xie
2024-08-23 19:16 ` Thomas Gleixner
2024-08-24 14:54   ` jeff.xie
2024-08-25 11:05     ` Thomas Gleixner [this message]

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=87msl0g8wl.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=jeff.xie@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiehuan09@gmail.com \
    /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