From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 94B42C4332F for ; Fri, 25 Nov 2022 05:31:10 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4NJNkh6dDGz3dvL for ; Fri, 25 Nov 2022 16:31:08 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=a9VqojD0; dkim-atps=neutral Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4NJNjg048Zz3010 for ; Fri, 25 Nov 2022 16:30:14 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=a9VqojD0; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4NJNjc6wVQz4x2c; Fri, 25 Nov 2022 16:30:12 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1669354214; bh=EsiGp1szyWNiHZ5wUGzk8Vc7Mu2R3iNcOrDOCAsGpu4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=a9VqojD0ONcxhe21GW3baCALkn7ejvQFE0BnSLR9SSwLQhPNOTWuGJ0EL5LsKLVJ+ rnnNLwk+J3NVdOijfHecWdC79mFBPzxVP4wIEIN5Yy2V2Ahg/Zey39X73p1BNLNdpZ BmNpagswQtzSrXS8LHCyHbaRrO35IQrT9d0hgUgW0zLqFh8X1EDebSfX8xG4FmudGq 2x/UySpGlv9M1xssuFzoGB8XN4Av/qpdr55IqDypZexvw5VFp1YoKA9rqT0+Pc3+j4 7WFn65Gd4UD1I/WhM3Wf9GAhFQSWYTPEPiR045LZwyEZlt9AgDzWWZOc7/mjjkO4fV f3ajW9uxBVCtA== From: Michael Ellerman To: Christophe Leroy , "zhang.songyi@zte.com.cn" , "arnd@arndb.de" Subject: Re: [PATCH linux-next] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE In-Reply-To: <9f6a3690-3ac3-8e13-a80c-b0571826c3d7@csgroup.eu> References: <202211231706198927223@zte.com.cn> <9f6a3690-3ac3-8e13-a80c-b0571826c3d7@csgroup.eu> Date: Fri, 25 Nov 2022 16:30:08 +1100 Message-ID: <87tu2nbnz3.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "npiggin@gmail.com" , deng.changcheng@zte.com.cn Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Christophe Leroy writes: > Hi, > > Le 23/11/2022 =C3=A0 10:06, zhang.songyi@zte.com.cn a =C3=A9crit=C2=A0: >> From: zhang songyi >>=20 >> 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= =20 > awaiting application here :=20 > https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20211222090655.48= 4551-1-deng.changcheng@zte.com.cn/=20 > ? > > The only difference I see it that the already existing patch has a more=20 > complete description of the change, so unless I'm missing something it=20 > 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 remov= al races by themselves already, the proxy creation may be bypassed by creati= ng 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