From patchwork Thu Oct 17 17:56:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11196735 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99B60912 for ; Thu, 17 Oct 2019 17:57:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D58221D7A for ; Thu, 17 Oct 2019 17:57:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="TZGOIEQl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440816AbfJQR5I (ORCPT ); Thu, 17 Oct 2019 13:57:08 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49414 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395081AbfJQR5H (ORCPT ); Thu, 17 Oct 2019 13:57:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0UL9ARtnKTUW5wAFwMjG0jmQyb6DrKDYKTjzEbcyVl4=; b=TZGOIEQliN05kExA2H7dLlgZ9J PGQHv7fEP0nMHiIo5d737u3C6NWMOuN8wZe3JbCvJNHlQi7ItAstiJNHs5PAZCvL75IpuReSyNl+/ 0eSuJFcdTkHQAHRNifxc1+Blp2o+iOaB3ipjpTJdyk5/wMcIPnjiNF4ir6Mig5RDW/rdbgqnhNLQD 355L4ex7p8aO8IMfiulipLS0xgFPJSPUwHkfT5YVRob8yNCkWumqkJ40NyC3wzgbErvsbPj2wfGmQ VgtVKuCx8e38ag0Timm7cua9MUddb+juaMIra3kw/AfCY2/EJc351kVFKAFyqW8iDK+obl0rmNtDS uw3k8HGw==; Received: from [2001:4bb8:18c:d7b:c70:4a89:bc61:3] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLA1H-0001RV-RF; Thu, 17 Oct 2019 17:57:04 +0000 From: Christoph Hellwig To: "Darrick J . Wong" Cc: Damien Le Moal , Andreas Gruenbacher , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Dave Chinner Subject: [PATCH 13/14] iomap: cleanup iomap_ioend_compare Date: Thu, 17 Oct 2019 19:56:23 +0200 Message-Id: <20191017175624.30305-14-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191017175624.30305-1-hch@lst.de> References: <20191017175624.30305-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Move the initialization of ia and ib to the declaration line and remove a superflous else. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong --- 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 f8ff96124a86..bb96499c352f 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; }