[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191015175736.GO13108@magnolia>
Date: Tue, 15 Oct 2019 10:57:36 -0700
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: Damien Le Moal <Damien.LeMoal@....com>,
Andreas Gruenbacher <agruenba@...hat.com>,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/12] iomap: cleanup iomap_ioend_compare
On Tue, Oct 15, 2019 at 05:43:45PM +0200, Christoph Hellwig wrote:
> Move the initialization of ia and ib to the declaration line and remove
> a superflous else.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@...cle.com>
--D
> ---
> fs/iomap/buffered-io.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index c57acc3d3120..0c7f185c8c52 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -1226,13 +1226,12 @@ EXPORT_SYMBOL_GPL(iomap_ioend_try_merge);
> static int
> iomap_ioend_compare(void *priv, struct list_head *a, struct list_head *b)
> {
> - struct iomap_ioend *ia, *ib;
> + struct iomap_ioend *ia = container_of(a, struct iomap_ioend, io_list);
> + struct iomap_ioend *ib = container_of(b, struct iomap_ioend, io_list);
>
> - ia = container_of(a, struct iomap_ioend, io_list);
> - ib = container_of(b, struct iomap_ioend, io_list);
> if (ia->io_offset < ib->io_offset)
> return -1;
> - else if (ia->io_offset > ib->io_offset)
> + if (ia->io_offset > ib->io_offset)
> return 1;
> return 0;
> }
> --
> 2.20.1
>
Powered by blists - more mailing lists