From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
"zhang.songyi@zte.com.cn" <zhang.songyi@zte.com.cn>,
"arnd@arndb.de" <arnd@arndb.de>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"npiggin@gmail.com" <npiggin@gmail.com>,
deng.changcheng@zte.com.cn
Subject: Re: [PATCH linux-next] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
Date: Fri, 25 Nov 2022 16:30:08 +1100 [thread overview]
Message-ID: <87tu2nbnz3.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <9f6a3690-3ac3-8e13-a80c-b0571826c3d7@csgroup.eu>
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Hi,
>
> Le 23/11/2022 à 10:06, zhang.songyi@zte.com.cn a écrit :
>> From: zhang songyi <zhang.songyi@zte.com.cn>
>>
>> Fix the following coccicheck warning:
>> /arch/powerpc/platforms/cell/axon_msi.c:457:0-23: WARNING:
>> fops_msic should be defined with DEFINE_DEBUGFS_ATTRIBUTE
>
> What's the difference between this new patch and the one that is already
> awaiting application here :
> https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20211222090655.484551-1-deng.changcheng@zte.com.cn/
> ?
>
> The only difference I see it that the already existing patch has a more
> complete description of the change, so unless I'm missing something it
> would be nice to avoid sending the same changes again and again.
Both patches switch the code to use a function called "unsafe" without
adequately explaining why that is OK.
The commit that added the cocci check script says:
If the original struct file_operations are known to be safe against removal
races by themselves already, the proxy creation may be bypassed by creating
the files through debugfs_create_file_unsafe().
None of these conversion patches ever contain any explanation which
speaks to that.
In this case I *think* the change is OK and there is no race because the
debugfs file is never removed. But I really wish the submitter would
tell me that in the change log.
cheers
prev parent reply other threads:[~2022-11-25 5:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 9:06 [PATCH linux-next] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE zhang.songyi
2022-11-23 13:42 ` Christophe Leroy
2022-11-25 5:30 ` Michael Ellerman [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=87tu2nbnz3.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=arnd@arndb.de \
--cc=christophe.leroy@csgroup.eu \
--cc=deng.changcheng@zte.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=zhang.songyi@zte.com.cn \
/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