From patchwork Sun Aug 12 15:06:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengguang Xu X-Patchwork-Id: 10563675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D781813B4 for ; Sun, 12 Aug 2018 15:08:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA063292E6 for ; Sun, 12 Aug 2018 15:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA7E6292F2; Sun, 12 Aug 2018 15:08:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAD0C292DF for ; Sun, 12 Aug 2018 15:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727775AbeHLRpd (ORCPT ); Sun, 12 Aug 2018 13:45:33 -0400 Received: from mout.gmx.net ([212.227.17.20]:59023 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727504AbeHLRpd (ORCPT ); Sun, 12 Aug 2018 13:45:33 -0400 Received: from localhost.localdomain ([113.116.48.118]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LeNGL-1gEcOb0Hd7-00qERK; Sun, 12 Aug 2018 17:07:12 +0200 From: Chengguang Xu To: ceph-devel@vger.kernel.org Cc: idryomov@gmail.com, Chengguang Xu Subject: [PATCH] rbd: add __init/__exit annotation Date: Sun, 12 Aug 2018 23:06:54 +0800 Message-Id: <20180812150654.26487-1-cgxu519@gmx.com> X-Mailer: git-send-email 2.17.1 X-Provags-ID: V03:K1:v3kJa+oFCUcMeIE2JCgJVbxMWPiY1aK8bYpwrKWJsAbguMa1iG+ g17qf8oki8ZFGSBsjXCvCN4pRLBY/xty6EReBCRDKW2bXKLwyO4O49JFko14EUWdR/uxMTP R9uDeUci5+2mJY+vKCFPIwhXl2GTrFQfbekvMY556PnYfooFYVlxfzD1Jt9q/7JAztUUW5e dCdkLWkfVPqZk2y+z+UIw== X-UI-Out-Filterresults: notjunk:1;V01:K0:qCmWpQMm9m0=:D19D5DKfDRJITFuWkSxy5G O6N9DWSr+XnDVHQnBSE+YlaocZ3cDZsNitdstkHEWiqztO3VKyWwWV0H7Ph7ICk5VtKFqJ0I9 +SfBHsYjDDL0nXJUY/6RNkw2IR3FdDvyRCOQmJ2nS8ca1xc8iny4f/ajituLwbG17imcijgVu JvdEMzGAqdmC01CtRX7yCLY5nGXWzN4JxddMieaYF5klBsttqNxM4he/kY0FQw323wpSM2VtM zjDQnPX6nBbdvd4dGxm4kFrVUjS2Si8kCMKWFCzu0okhr2m3UUo1BiKtG53cJSFv/GggO2+Yk STEGKkSmqK9gXFpfuNy/PRwo4pO4/x6W5+x3w8i+4qjMDzsF+/qPLvofzetpspt2kCjBgvAqv IkSGTGEHAfXaor4xsiG/GPMKd7i8YuA7nCcAwJUYBlSlDfvRvoi7miojd+UoGszeww1eNANIh dc5cyaPaCsYqsbnuuKJUzz3HRTaObief03h7jAFvOsJPSbsfwgwQQYll3/ONp7Ft3Er1Fjjzv K1Q4gSCHLpoa8mZDdgvL0tuK//WaiuT88yHrowy8qUrAT4RrTK3TSAZzIW2ex6XqepLCI+Ypc k6zfZNY3/pwLAow/ZnmJM32wW5diN6Ypf5WONAPisbUnKg2zBS82LlJXqWzZha6oPy/gpHurX XylNon1blez/xwrvqRogyTdvuvnv+BE50arE6p1LbOu0F0UAzeaBIUCJnBLvvmILZWlMBcJsp AAiSmLIvTjW0bLoPh0pU0ntufQK5lbZm25ZaKYvi6DANoTQ6xIEGwUDYbTI= Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add __init/__exit annotation to init/cleanup helpers which are only called once in the module. Signed-off-by: Chengguang Xu --- drivers/block/rbd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 6f8d9a0493b7..d4d2e2ed4bd5 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -5946,7 +5946,7 @@ static ssize_t rbd_remove_single_major(struct bus_type *bus, * create control files in sysfs * /sys/bus/rbd/... */ -static int rbd_sysfs_init(void) +static int __init rbd_sysfs_init(void) { int ret; @@ -5961,13 +5961,13 @@ static int rbd_sysfs_init(void) return ret; } -static void rbd_sysfs_cleanup(void) +static void __exit rbd_sysfs_cleanup(void) { bus_unregister(&rbd_bus_type); device_unregister(&rbd_root_dev); } -static int rbd_slab_init(void) +static int __init rbd_slab_init(void) { rbd_assert(!rbd_img_request_cache); rbd_img_request_cache = KMEM_CACHE(rbd_img_request, 0);