diff mbox series

rbd: add __init/__exit annotation

Message ID 20180812150654.26487-1-cgxu519@gmx.com (mailing list archive)
State New, archived
Headers show
Series rbd: add __init/__exit annotation | expand

Commit Message

Chengguang Xu Aug. 12, 2018, 3:06 p.m. UTC
Add __init/__exit annotation to init/cleanup helpers
which are only called once in the module.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
---
 drivers/block/rbd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ilya Dryomov Aug. 14, 2018, 1:37 p.m. UTC | #1
On Sun, Aug 12, 2018 at 5:07 PM Chengguang Xu <cgxu519@gmx.com> wrote:
>
> Add __init/__exit annotation to init/cleanup helpers
> which are only called once in the module.
>
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
> ---
>  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);

Applied.

Thanks,

                Ilya
diff mbox series

Patch

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);