2014-02-09 13:11:21

by Rashika Kheria

[permalink] [raw]
Subject: [PATCH 11/21] fs: Mark functions as static in jbd2/journal.c

Mark functions as static in jbd2/journal.c because they are not used
outside this file.

This eliminates the following warning in jbd2/journal.c:
fs/jbd2/journal.c:125:5: warning: no previous prototype for ‘jbd2_verify_csum_type’ [-Wmissing-prototypes]
fs/jbd2/journal.c:146:5: warning: no previous prototype for ‘jbd2_superblock_csum_verify’ [-Wmissing-prototypes]
fs/jbd2/journal.c:154:6: warning: no previous prototype for ‘jbd2_superblock_csum_set’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
fs/jbd2/journal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 5fa344a..244b6f6 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -122,7 +122,7 @@ EXPORT_SYMBOL(__jbd2_debug);
#endif

/* Checksumming functions */
-int jbd2_verify_csum_type(journal_t *j, journal_superblock_t *sb)
+static int jbd2_verify_csum_type(journal_t *j, journal_superblock_t *sb)
{
if (!JBD2_HAS_INCOMPAT_FEATURE(j, JBD2_FEATURE_INCOMPAT_CSUM_V2))
return 1;
@@ -143,7 +143,7 @@ static __be32 jbd2_superblock_csum(journal_t *j, journal_superblock_t *sb)
return cpu_to_be32(csum);
}

-int jbd2_superblock_csum_verify(journal_t *j, journal_superblock_t *sb)
+static int jbd2_superblock_csum_verify(journal_t *j, journal_superblock_t *sb)
{
if (!JBD2_HAS_INCOMPAT_FEATURE(j, JBD2_FEATURE_INCOMPAT_CSUM_V2))
return 1;
@@ -151,7 +151,7 @@ int jbd2_superblock_csum_verify(journal_t *j, journal_superblock_t *sb)
return sb->s_checksum == jbd2_superblock_csum(j, sb);
}

-void jbd2_superblock_csum_set(journal_t *j, journal_superblock_t *sb)
+static void jbd2_superblock_csum_set(journal_t *j, journal_superblock_t *sb)
{
if (!JBD2_HAS_INCOMPAT_FEATURE(j, JBD2_FEATURE_INCOMPAT_CSUM_V2))
return;
--
1.7.9.5


2014-02-10 02:59:38

by Darrick J. Wong

[permalink] [raw]
Subject: Re: [PATCH 11/21] fs: Mark functions as static in jbd2/journal.c

On Sun, Feb 09, 2014 at 06:41:21PM +0530, Rashika Kheria wrote:
> Mark functions as static in jbd2/journal.c because they are not used
> outside this file.
>
> This eliminates the following warning in jbd2/journal.c:
> fs/jbd2/journal.c:125:5: warning: no previous prototype for ‘jbd2_verify_csum_type’ [-Wmissing-prototypes]
> fs/jbd2/journal.c:146:5: warning: no previous prototype for ‘jbd2_superblock_csum_verify’ [-Wmissing-prototypes]
> fs/jbd2/journal.c:154:6: warning: no previous prototype for ‘jbd2_superblock_csum_set’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <[email protected]>
> Reviewed-by: Josh Triplett <[email protected]>

Looks fine to me, so you can add
Reviewed-by: Darrick J. Wong <[email protected]>

--D

> ---
> fs/jbd2/journal.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 5fa344a..244b6f6 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -122,7 +122,7 @@ EXPORT_SYMBOL(__jbd2_debug);
> #endif
>
> /* Checksumming functions */
> -int jbd2_verify_csum_type(journal_t *j, journal_superblock_t *sb)
> +static int jbd2_verify_csum_type(journal_t *j, journal_superblock_t *sb)
> {
> if (!JBD2_HAS_INCOMPAT_FEATURE(j, JBD2_FEATURE_INCOMPAT_CSUM_V2))
> return 1;
> @@ -143,7 +143,7 @@ static __be32 jbd2_superblock_csum(journal_t *j, journal_superblock_t *sb)
> return cpu_to_be32(csum);
> }
>
> -int jbd2_superblock_csum_verify(journal_t *j, journal_superblock_t *sb)
> +static int jbd2_superblock_csum_verify(journal_t *j, journal_superblock_t *sb)
> {
> if (!JBD2_HAS_INCOMPAT_FEATURE(j, JBD2_FEATURE_INCOMPAT_CSUM_V2))
> return 1;
> @@ -151,7 +151,7 @@ int jbd2_superblock_csum_verify(journal_t *j, journal_superblock_t *sb)
> return sb->s_checksum == jbd2_superblock_csum(j, sb);
> }
>
> -void jbd2_superblock_csum_set(journal_t *j, journal_superblock_t *sb)
> +static void jbd2_superblock_csum_set(journal_t *j, journal_superblock_t *sb)
> {
> if (!JBD2_HAS_INCOMPAT_FEATURE(j, JBD2_FEATURE_INCOMPAT_CSUM_V2))
> return;
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2014-02-12 17:36:07

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 11/21] fs: Mark functions as static in jbd2/journal.c

On Sun, Feb 09, 2014 at 06:41:21PM +0530, Rashika Kheria wrote:
> Mark functions as static in jbd2/journal.c because they are not used
> outside this file.
>
> This eliminates the following warning in jbd2/journal.c:
> fs/jbd2/journal.c:125:5: warning: no previous prototype for ‘jbd2_verify_csum_type’ [-Wmissing-prototypes]
> fs/jbd2/journal.c:146:5: warning: no previous prototype for ‘jbd2_superblock_csum_verify’ [-Wmissing-prototypes]
> fs/jbd2/journal.c:154:6: warning: no previous prototype for ‘jbd2_superblock_csum_set’ [-Wmissing-prototypes]
>
> Signed-off-by: Rashika Kheria <[email protected]>
> Reviewed-by: Josh Triplett <[email protected]>

Thanks, applied to the ext4 tree.

- Ted