Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp980178rwb; Thu, 22 Sep 2022 08:39:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6qFg5A1uIxibp8HDYDRUziKgaF1uUQGdv/u3oA82g3/gPTfK8Acn4eJ5zAAq4sbBNKdp3i X-Received: by 2002:a05:6a00:1d26:b0:54e:8c81:9f64 with SMTP id a38-20020a056a001d2600b0054e8c819f64mr4193929pfx.58.1663861167926; Thu, 22 Sep 2022 08:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663861167; cv=none; d=google.com; s=arc-20160816; b=f4JyEf2QW06Pt+E/HQSi1QR7l/7JuBQXXKNVruwhTiZ/m7ArKHS21XQN4QIoxsYj1p zqWbivsT6vVnJLuuGpJkewx7ZgbDptyWva3i76QzyLQeLTBGd8ZH6P6MBAYp8BSE5aXY WLlPbjYjL8qQXJIG11NJuUFfvRNeeJKbaVcbd2bfzGIKN/woK/teeiM+0FPhK0plaDwi 4ahRfeQZ3hlbPCNELDQnCpGlD+d9c8fEUr1GSOt9aXqxGpKZQoLlSELeYfH23WPH0BRy Hekg66QdgQCpGcWaDI2BTdqGwiSvuMYZhoom+nHYJban7LDjSiQ/C+WC5AIZQzRYpD8I oSwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=F+kpOuiBaLtSXUt9kPWUT6ECPRNR1trzRk639LqoVNo=; b=0BsVU1Q8g4fYYMQ2XAKRLDl8PnKWGDVVYs/JVM+DIxT84It/oYpMUbLu+3gPpqfwMc Qjdg8e+vURYLzaeA5DjFSHrONAmdXeuB12MrdlCzEwby2443NtkbvaZmDuRRqvHY+e4w 6Piqa2lo7KPo0n7mxl4ixPXxLNeja+iV6v3hFd0tieVOFAUmEx3+l3486lN44uM2CEoQ IJb8V8ssCBGMWAw2TaAF7npOuXK7ei6lz2bcsMjrSHa/QbNvqELFXYa/F89f6qzQHgJ5 hkm6qH4BCHRdBhj7CtTwP64+qIeDJRuu8nSkJLyTr5QbWdip+QtDEYJXISF5WdqF516y X4Ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a170902988d00b00172c1c6abc1si143144plp.172.2022.09.22.08.38.51; Thu, 22 Sep 2022 08:39:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231700AbiIVPbZ (ORCPT + 99 others); Thu, 22 Sep 2022 11:31:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbiIVPbY (ORCPT ); Thu, 22 Sep 2022 11:31:24 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36161FB312; Thu, 22 Sep 2022 08:31:22 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MYJzz2wfhzlXJl; Thu, 22 Sep 2022 23:27:11 +0800 (CST) Received: from kwepemm600015.china.huawei.com (7.193.23.52) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 23:31:20 +0800 Received: from huawei.com (10.175.101.6) by kwepemm600015.china.huawei.com (7.193.23.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 23:31:19 +0800 From: ChenXiaoSong To: , CC: , , , , Subject: [PATCH 0/5] nfsd: use DEFINE_PROC_SHOW_ATTRIBUTE/DEFINE_SHOW_ATTRIBUTE to simplify the code Date: Fri, 23 Sep 2022 00:31:51 +0800 Message-ID: <20220922163156.2027440-1-chenxiaosong2@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600015.china.huawei.com (7.193.23.52) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Use DEFINE_PROC_SHOW_ATTRIBUTE/DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. ChenXiaoSong (5): nfsd: use DEFINE_PROC_SHOW_ATTRIBUTE to define nfsd_proc_ops nfsd: use DEFINE_SHOW_ATTRIBUTE to define export_features_fops and supported_enctypes_fops nfsd: use DEFINE_SHOW_ATTRIBUTE to define client_info_fops nfsd: use DEFINE_SHOW_ATTRIBUTE to define nfsd_reply_cache_stats_fops nfsd: use DEFINE_SHOW_ATTRIBUTE to define nfsd_file_cache_stats_fops fs/nfsd/cache.h | 2 +- fs/nfsd/filecache.c | 7 +------ fs/nfsd/filecache.h | 2 +- fs/nfsd/nfs4state.c | 14 ++------------ fs/nfsd/nfscache.c | 13 +++---------- fs/nfsd/nfsctl.c | 46 ++++++++------------------------------------- fs/nfsd/stats.c | 14 ++------------ 7 files changed, 18 insertions(+), 80 deletions(-) -- 2.31.1