diff mbox series

fs:xfs: cleanup __FUNCTION__ usage

Message ID 20210711085153.95856-1-dwaipayanray1@gmail.com (mailing list archive)
State Accepted
Headers show
Series fs:xfs: cleanup __FUNCTION__ usage | expand

Commit Message

Dwaipayan Ray July 11, 2021, 8:51 a.m. UTC
__FUNCTION__ exists only for backwards compatibility reasons
with old gcc versions. Replace it with __func__.

Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>
---
 fs/xfs/xfs_icreate_item.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Dave Chinner July 11, 2021, 10:46 p.m. UTC | #1
On Sun, Jul 11, 2021 at 02:21:53PM +0530, Dwaipayan Ray wrote:
> __FUNCTION__ exists only for backwards compatibility reasons
> with old gcc versions. Replace it with __func__.
> 
> Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>
> ---
>  fs/xfs/xfs_icreate_item.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_icreate_item.c b/fs/xfs/xfs_icreate_item.c
> index 9b3994b9c716..017904a34c02 100644
> --- a/fs/xfs/xfs_icreate_item.c
> +++ b/fs/xfs/xfs_icreate_item.c
> @@ -201,7 +201,7 @@ xlog_recover_icreate_commit_pass2(
>  	if (length != igeo->ialloc_blks &&
>  	    length != igeo->ialloc_min_blks) {
>  		xfs_warn(log->l_mp,
> -			 "%s: unsupported chunk length", __FUNCTION__);
> +			 "%s: unsupported chunk length", __func__);
>  		return -EINVAL;
>  	}
>  
> @@ -209,7 +209,7 @@ xlog_recover_icreate_commit_pass2(
>  	if ((count >> mp->m_sb.sb_inopblog) != length) {
>  		xfs_warn(log->l_mp,
>  			 "%s: inconsistent inode count and chunk length",
> -			 __FUNCTION__);
> +			 __func__);
>  		return -EINVAL;
>  	}

Looks good.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

For future reference, the subject only needs "xfs:", you can drop
the "fs:" prefix from it.

-Dave.
Darrick J. Wong July 14, 2021, 11:27 p.m. UTC | #2
On Sun, Jul 11, 2021 at 02:21:53PM +0530, Dwaipayan Ray wrote:
> __FUNCTION__ exists only for backwards compatibility reasons
> with old gcc versions. Replace it with __func__.
> 
> Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>

LGTM
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/xfs_icreate_item.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_icreate_item.c b/fs/xfs/xfs_icreate_item.c
> index 9b3994b9c716..017904a34c02 100644
> --- a/fs/xfs/xfs_icreate_item.c
> +++ b/fs/xfs/xfs_icreate_item.c
> @@ -201,7 +201,7 @@ xlog_recover_icreate_commit_pass2(
>  	if (length != igeo->ialloc_blks &&
>  	    length != igeo->ialloc_min_blks) {
>  		xfs_warn(log->l_mp,
> -			 "%s: unsupported chunk length", __FUNCTION__);
> +			 "%s: unsupported chunk length", __func__);
>  		return -EINVAL;
>  	}
>  
> @@ -209,7 +209,7 @@ xlog_recover_icreate_commit_pass2(
>  	if ((count >> mp->m_sb.sb_inopblog) != length) {
>  		xfs_warn(log->l_mp,
>  			 "%s: inconsistent inode count and chunk length",
> -			 __FUNCTION__);
> +			 __func__);
>  		return -EINVAL;
>  	}
>  
> -- 
> 2.28.0
>
diff mbox series

Patch

diff --git a/fs/xfs/xfs_icreate_item.c b/fs/xfs/xfs_icreate_item.c
index 9b3994b9c716..017904a34c02 100644
--- a/fs/xfs/xfs_icreate_item.c
+++ b/fs/xfs/xfs_icreate_item.c
@@ -201,7 +201,7 @@  xlog_recover_icreate_commit_pass2(
 	if (length != igeo->ialloc_blks &&
 	    length != igeo->ialloc_min_blks) {
 		xfs_warn(log->l_mp,
-			 "%s: unsupported chunk length", __FUNCTION__);
+			 "%s: unsupported chunk length", __func__);
 		return -EINVAL;
 	}
 
@@ -209,7 +209,7 @@  xlog_recover_icreate_commit_pass2(
 	if ((count >> mp->m_sb.sb_inopblog) != length) {
 		xfs_warn(log->l_mp,
 			 "%s: inconsistent inode count and chunk length",
-			 __FUNCTION__);
+			 __func__);
 		return -EINVAL;
 	}