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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA18EC433EF for ; Wed, 23 Mar 2022 10:17:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243467AbiCWKTX (ORCPT ); Wed, 23 Mar 2022 06:19:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbiCWKTV (ORCPT ); Wed, 23 Mar 2022 06:19:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE75676E06; Wed, 23 Mar 2022 03:17:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2278760E88; Wed, 23 Mar 2022 10:17:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9372C340E8; Wed, 23 Mar 2022 10:17:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648030671; bh=i6bjWAxhQ9B49HKiVKTYB2SDWHUVsRp7XHRLw7HgwN4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=esq8dpfpITUN07UMIcp4KzH9MJPHK/pQEpedcDfP5jr1dGnafPCcSmQkQ6UcqGr5I /ZyRdLbUxhQmKMgftgdFFROx17Q9ngy9wzXirCDW7ae2SVGf3/NX1LUNtfk5cnpm09 lM8ufgd7Aumowg3VC0rs6nJhgoXSM7flxAkkTRzRapWhRZjF7t2wXFZFJR09z3RsPn 4jofjsK/dT1MgDDKV+T1bjyymmfsJqpvAdweaPRSUOtynSam4VWIgaH6ptYCINV2+1 30DiTvpQqZmyIp15VJMj/arWDmbq0pJuMs1+X5vAQ90RyUUD8oUQb2J7r2+UpVcIAX nyRmK7THW3hiQ== Message-ID: <1407bfb44b60b3cdd704e48d85754c18693c925f.camel@kernel.org> Subject: Re: [PATCH -next] ceph: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE From: Jeff Layton To: Yang Li Cc: xiubli@redhat.com, idryomov@gmail.com, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Date: Wed, 23 Mar 2022 06:17:49 -0400 In-Reply-To: <20220322235308.9770-1-yang.lee@linux.alibaba.com> References: <20220322235308.9770-1-yang.lee@linux.alibaba.com> Content-Type: text/plain; charset="ISO-8859-15" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2022-03-23 at 07:53 +0800, Yang Li wrote: > Fix the following coccicheck warning: > ./fs/ceph/debugfs.c:389:0-23: WARNING: congestion_kb_fops should be > defined with DEFINE_DEBUGFS_ATTRIBUTE > > Reported-by: Abaci Robot > Signed-off-by: Yang Li > --- > fs/ceph/debugfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c > index bec3c4549c07..05d15a0bbd9b 100644 > --- a/fs/ceph/debugfs.c > +++ b/fs/ceph/debugfs.c > @@ -386,7 +386,7 @@ static int congestion_kb_get(void *data, u64 *val) > return 0; > } > > -DEFINE_SIMPLE_ATTRIBUTE(congestion_kb_fops, congestion_kb_get, > +DEFINE_DEBUGFS_ATTRIBUTE(congestion_kb_fops, congestion_kb_get, > congestion_kb_set, "%llu\n"); > > I think you're the 4th person to propose this patch. Here are the three prior postings: https://lore.kernel.org/ceph-devel/1577111958-100981-1-git-send-email-chenwandun@huawei.com/ https://lore.kernel.org/ceph-devel/1612165930-110076-1-git-send-email-jiapeng.chong@linux.alibaba.com/ https://lore.kernel.org/ceph-devel/20211221143614.480385-1-deng.changcheng@zte.com.cn/ It's not as simple as doing a 1:1 conversion like this. Please look at the threads above and offer a revised patch or let us know whether you want us to drop this one. Thanks, -- Jeff Layton