staging: exfat: Clean up the namespace pollution part 4
authorValdis Kletnieks <valdis.kletnieks@vt.edu>
Tue, 12 Nov 2019 21:12:34 +0000 (16:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 23:17:35 +0000 (00:17 +0100)
Relocating these functions to before first use lets us make them static

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Link: https://lore.kernel.org/r/20191112211238.156490-9-Valdis.Kletnieks@vt.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/exfat/exfat.h
drivers/staging/exfat/exfat_core.c

index 407dbb017c5fe39a76c3f412bb286b469a4698d5..48267dd11e9d03515b53eb57657567d624906e0f 100644 (file)
@@ -775,10 +775,6 @@ void free_upcase_table(struct super_block *sb);
 
 /* dir entry management functions */
 struct timestamp_t *tm_current(struct timestamp_t *tm);
-void init_file_entry(struct file_dentry_t *ep, u32 type);
-void init_strm_entry(struct strm_dentry_t *ep, u8 flags, u32 start_clu,
-                    u64 size);
-void init_name_entry(struct name_dentry_t *ep, u16 *uniname);
 
 struct dentry_t *get_entry_in_dir(struct super_block *sb, struct chain_t *p_dir,
                                  s32 entry, sector_t *sector);
index 3ea51d12c38d7f2625123d525f38caaa2fafa4a4..24700b251acbb847472484729fb4b7d8d9f9bbc7 100644 (file)
@@ -971,6 +971,45 @@ static void exfat_set_entry_time(struct dentry_t *p_entry, struct timestamp_t *t
        }
 }
 
+static void init_file_entry(struct file_dentry_t *ep, u32 type)
+{
+       struct timestamp_t tm, *tp;
+
+       exfat_set_entry_type((struct dentry_t *)ep, type);
+
+       tp = tm_current(&tm);
+       exfat_set_entry_time((struct dentry_t *)ep, tp, TM_CREATE);
+       exfat_set_entry_time((struct dentry_t *)ep, tp, TM_MODIFY);
+       exfat_set_entry_time((struct dentry_t *)ep, tp, TM_ACCESS);
+       ep->create_time_ms = 0;
+       ep->modify_time_ms = 0;
+       ep->access_time_ms = 0;
+}
+
+static void init_strm_entry(struct strm_dentry_t *ep, u8 flags, u32 start_clu, u64 size)
+{
+       exfat_set_entry_type((struct dentry_t *)ep, TYPE_STREAM);
+       ep->flags = flags;
+       SET32_A(ep->start_clu, start_clu);
+       SET64_A(ep->valid_size, size);
+       SET64_A(ep->size, size);
+}
+
+static void init_name_entry(struct name_dentry_t *ep, u16 *uniname)
+{
+       int i;
+
+       exfat_set_entry_type((struct dentry_t *)ep, TYPE_EXTEND);
+       ep->flags = 0x0;
+
+       for (i = 0; i < 30; i++, i++) {
+               SET16_A(ep->unicode_0_14 + i, *uniname);
+               if (*uniname == 0x0)
+                       break;
+               uniname++;
+       }
+}
+
 static s32 exfat_init_dir_entry(struct super_block *sb, struct chain_t *p_dir,
                         s32 entry, u32 type, u32 start_clu, u64 size)
 {
@@ -1047,45 +1086,6 @@ static s32 exfat_init_ext_entry(struct super_block *sb, struct chain_t *p_dir,
        return 0;
 }
 
-void init_file_entry(struct file_dentry_t *ep, u32 type)
-{
-       struct timestamp_t tm, *tp;
-
-       exfat_set_entry_type((struct dentry_t *)ep, type);
-
-       tp = tm_current(&tm);
-       exfat_set_entry_time((struct dentry_t *)ep, tp, TM_CREATE);
-       exfat_set_entry_time((struct dentry_t *)ep, tp, TM_MODIFY);
-       exfat_set_entry_time((struct dentry_t *)ep, tp, TM_ACCESS);
-       ep->create_time_ms = 0;
-       ep->modify_time_ms = 0;
-       ep->access_time_ms = 0;
-}
-
-void init_strm_entry(struct strm_dentry_t *ep, u8 flags, u32 start_clu, u64 size)
-{
-       exfat_set_entry_type((struct dentry_t *)ep, TYPE_STREAM);
-       ep->flags = flags;
-       SET32_A(ep->start_clu, start_clu);
-       SET64_A(ep->valid_size, size);
-       SET64_A(ep->size, size);
-}
-
-void init_name_entry(struct name_dentry_t *ep, u16 *uniname)
-{
-       int i;
-
-       exfat_set_entry_type((struct dentry_t *)ep, TYPE_EXTEND);
-       ep->flags = 0x0;
-
-       for (i = 0; i < 30; i++, i++) {
-               SET16_A(ep->unicode_0_14 + i, *uniname);
-               if (*uniname == 0x0)
-                       break;
-               uniname++;
-       }
-}
-
 static void exfat_delete_dir_entry(struct super_block *sb, struct chain_t *p_dir,
                            s32 entry, s32 order, s32 num_entries)
 {