linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 2/3] xfs: cleanup xfs_fsb_to_db
Date: Fri, 30 Aug 2019 12:24:10 +0200	[thread overview]
Message-ID: <20190830102411.519-3-hch@lst.de> (raw)
In-Reply-To: <20190830102411.519-1-hch@lst.de>

This function isn't a macro anymore, so remove various superflous braces,
and explicit cast that is done implicitly due to the return value, use
a normal if statement instead of trying to squeeze everything together.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_bmap_util.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index e12f0ba7f2eb..0910cb75b65d 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -39,9 +39,9 @@
 xfs_daddr_t
 xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb)
 {
-	return (XFS_IS_REALTIME_INODE(ip) ? \
-		 (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \
-		 XFS_FSB_TO_DADDR((ip)->i_mount, (fsb)));
+	if (XFS_IS_REALTIME_INODE(ip))
+		return XFS_FSB_TO_BB(ip->i_mount, fsb);
+	return XFS_FSB_TO_DADDR(ip->i_mount, fsb);
 }
 
 /*
-- 
2.20.1


  parent reply	other threads:[~2019-08-30 10:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 10:24 misc cleanups Christoph Hellwig
2019-08-30 10:24 ` [PATCH 1/3] xfs: add a xfs_valid_startblock helper Christoph Hellwig
2019-08-30 15:06   ` Darrick J. Wong
2019-08-30 15:32     ` Christoph Hellwig
2019-09-01  7:36       ` Christoph Hellwig
2019-09-01 20:31         ` Darrick J. Wong
2019-09-02  7:59           ` Christoph Hellwig
2019-09-02 17:04             ` Darrick J. Wong
2019-09-02 17:07               ` Christoph Hellwig
2019-08-30 10:24 ` Christoph Hellwig [this message]
2019-08-30 15:07   ` [PATCH 2/3] xfs: cleanup xfs_fsb_to_db Darrick J. Wong
2019-08-30 10:24 ` [PATCH 3/3] xfs: remove the unused XFS_ALLOC_USERDATA flag Christoph Hellwig
2019-08-30 15:08   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190830102411.519-3-hch@lst.de \
    --to=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).