Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1284736ybg; Fri, 18 Oct 2019 15:13:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfDuJTRISmQaMR01ZHbXCKPubbhawLXzw4GzzAb9YmKxi72w83nYxIZtOzEOBqW+cyy4RW X-Received: by 2002:a17:906:3009:: with SMTP id 9mr11053784ejz.124.1571436782006; Fri, 18 Oct 2019 15:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571436782; cv=none; d=google.com; s=arc-20160816; b=HwZAE62YgqQdpXLypDM+QtFNWOibESwqjeZbNs9W4W34M7XufkJJRsgBkzDeT01zW9 GKgftvLRpTWwLzxpm4qaLbp7Zr1ZANfUe8QMLfa6fbm0HA+RnjOD/k0L99jfhyfa5yh4 XkKPkNZ1S4KaNHvEe6AlLX2JvJ02GfdRCNKKGX2meZIWrtNKBHePR7XhPoVa0nEKNcQz z3l9voi1HP39+pLnNdnjg+eODFsSJOmplPsxYvHWZ9P60Zb7zSfeiGBfHC09OnER0NI3 OWcxNZD9+iL2b8KVOPeyKOyzmpOgnTog+yYuMTYpeM8nxVmmP9TliSCfUhDnEtwzDGuP tuMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0UL9ARtnKTUW5wAFwMjG0jmQyb6DrKDYKTjzEbcyVl4=; b=azR5tyi9+s06rCJeefm3wHVsxN0rNLieoFsKuWG+z827f1HFEgAcESS2AcPfe/bbxl 3ewxSyyDfZ1EENYLfCgF6YEn22D6sunfj19FOC+L3j13E1lG8axDcR9BxX4o2KQPXv7A oHL6NC2/po0zmZR5wrofZhl8M0QE4Fa3493SXE81qYvUf12TT330AhMwMraEGLGR1c/V qT6K/K8HQ4K6WSDMphTfe6ZHLUOJFsdxCKJzr9Z/24vM7vPeHhrQP+PJ7HUMC3pV21bd TL8r0O+dJNdc5T5j+LyR3NNrqKxZ0KRkCMPB5g4qQQW6YEJ6E6tP4GgW1IJQp0CBpdpH /liw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TZGOIEQl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si4379889edx.450.2019.10.18.15.12.38; Fri, 18 Oct 2019 15:13:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TZGOIEQl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441185AbfJQR5I (ORCPT + 99 others); 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 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; } -- 2.20.1