]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging: erofs: fixed -Wmissing-prototype warnings by making functions static.
authorJeremy Sowden <jeremy@azazel.net>
Tue, 8 Jan 2019 11:31:47 +0000 (11:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2019 09:44:20 +0000 (10:44 +0100)
Define three functions which are not used outside their own
translation-units as static in order to fix the following warnings:

  drivers/staging/erofs/utils.c:134:6: warning: no previous prototype for ‘erofs_try_to_release_workgroup’ [-Wmissing-prototypes]
   bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  drivers/staging/erofs/unzip_vle.c:592:6: warning: no previous prototype for ‘z_erofs_vle_work_release’ [-Wmissing-prototypes]
   void z_erofs_vle_work_release(struct z_erofs_vle_work *work)
        ^~~~~~~~~~~~~~~~~~~~~~~~

  drivers/staging/erofs/unzip_vle_lz4.c:16:5: warning: no previous prototype for ‘z_erofs_unzip_lz4’ [-Wmissing-prototypes]
   int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen)
       ^~~~~~~~~~~~~~~~~

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/unzip_vle.c
drivers/staging/erofs/unzip_vle_lz4.c
drivers/staging/erofs/utils.c

index 4ac1099a39c6c6e0028b09916eb0238f9abcb4d9..584612b47369fe04d869428f2893997809478e5b 100644 (file)
@@ -589,7 +589,7 @@ static void __z_erofs_vle_work_release(struct z_erofs_vle_workgroup *grp,
        erofs_workgroup_put(&grp->obj);
 }
 
-void z_erofs_vle_work_release(struct z_erofs_vle_work *work)
+static void z_erofs_vle_work_release(struct z_erofs_vle_work *work)
 {
        struct z_erofs_vle_workgroup *grp =
                z_erofs_vle_work_workgroup(work, true);
index 52797bd89da18363c73b78af0589cd22e76a73ba..8e8d705a6861515d83acb69fc8decb28fcc85b43 100644 (file)
@@ -13,7 +13,7 @@
 #include "unzip_vle.h"
 #include <linux/lz4.h>
 
-int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen)
+static int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen)
 {
        int ret = LZ4_decompress_safe_partial(in, out, inlen, outlen, outlen);
 
index b535898ca753f72bcaad1af54cee34b375370e81..fc30025ef101679839d6871711787ef6f73d7946 100644 (file)
@@ -131,9 +131,9 @@ static void erofs_workgroup_unfreeze_final(struct erofs_workgroup *grp)
        __erofs_workgroup_free(grp);
 }
 
-bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
-                                   struct erofs_workgroup *grp,
-                                   bool cleanup)
+static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
+                                          struct erofs_workgroup *grp,
+                                          bool cleanup)
 {
        /*
         * for managed cache enabled, the refcount of workgroups
@@ -172,9 +172,9 @@ bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
 
 #else
 /* for nocache case, no customized reclaim path at all */
-bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
-                                   struct erofs_workgroup *grp,
-                                   bool cleanup)
+static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
+                                          struct erofs_workgroup *grp,
+                                          bool cleanup)
 {
        int cnt = atomic_read(&grp->refcount);