Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6041800ybp; Tue, 15 Oct 2019 08:45:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUvbahEW1KICCECo/dfSsiALayhgQhYbME9n7MaLkLUR6PRebczZl0uw3qde2lEL3MPDQh X-Received: by 2002:a50:af44:: with SMTP id g62mr34470780edd.164.1571154345707; Tue, 15 Oct 2019 08:45:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571154345; cv=none; d=google.com; s=arc-20160816; b=xjeRNvEIlhZ0xHxFY3XnbmdjvvpBCNUA88Zje5ZwkPsSUJFWRxOBPPRgsiXMfNVXgm LQIHgKwCbi/CgHAkczZTuIHfOB1HPpOocTfr1HCWCCLupQB+y2xEgysC+5cos37fb8I4 yAUWB5n/4PU4Zt0aXK92WII0Rz2FrUvNEFk4zMSHeYDC3/fEBFtPsEJ8auFsehbbggkL InEVjRiHZKHy+vU+0oj2FQzxxBtuZGjEA3hh3Xn4pXnfWT40M/JQtkHj3/t9HIlR//Gs Q2ypIfJjuZ+QZHhOonUUaiARYBDyc0pXzwVRnCCDqIArmeJCDvdEvuuKntTh/2v1D1XH nHLw== 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=Mr41y1LsPmV/Aa5P6Nreo6G927X7sBwSFPq0Rl3lz2Y=; b=dct7QRmM2wz+AfUcDXilh5fekjadlvQKYKvBDUvH1gHd9/yGXD56i1pnX0G6Kfnbdd GEjQQ4kVlL6uLKyYS8B0vql7gpadPntaAP9HXg2CWqyHQH0mPhBGNP6JhkNlTLXXU8fX 5+iO4lxFefw3iaKOyVMa3wReH1UmCoTtfynV5eSyJPefQ7ulaWYHwUAnpwTseY1Vr7ez pfEnb99rkwR/mYH0R+fC9ufFMPRHOGghGB8l67Amchf0q4mxFKoARan1GsZZOdehcwtT xkAfNWmoQj9UHucnniY+1wl4TwU5PHvblD5yd/oMM2bECaTQmZNfnAhYodUSoT2da4m2 QQBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UQ7AFX3F; 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 z14si13727862ejw.396.2019.10.15.08.45.22; Tue, 15 Oct 2019 08:45:45 -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=UQ7AFX3F; 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 S2387739AbfJOPob (ORCPT + 99 others); Tue, 15 Oct 2019 11:44:31 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:48182 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387650AbfJOPoa (ORCPT ); Tue, 15 Oct 2019 11:44:30 -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=Mr41y1LsPmV/Aa5P6Nreo6G927X7sBwSFPq0Rl3lz2Y=; b=UQ7AFX3Fwrd+C2k1E/INz+eeqC SevBl7fm5BPPKcpB9SjOtbKHDvCx4AYAu2DiRSMZN686KpRcUbbqKaGNWag8cP/55+ZY6wFLOAYSv xsR0xy+2SKDs3lerkhEwIsMXy3CcV19q5I7FqKraykzYyO7wVycSFvpgvFpsaNDFUQ10CKsZ2v/Dj yoNWg5475HBB83MN0id0CaJOmX1xsaYwrD8p0wOaXduQt21b8jPL5A1lw24paa1gjtwLbXmiVL4Az MLMhndsLa/KqEPqIYA/uQmUw9ACwWSNBv4e6cEpYWOxuEOLYdwZ9EgcQwjjvpa6KRMgR9ZKV9skjj /4UKFxWg==; 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 1iKOzq-00080n-8K; Tue, 15 Oct 2019 15:44:26 +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 Subject: [PATCH 12/12] iomap: cleanup iomap_ioend_compare Date: Tue, 15 Oct 2019 17:43:45 +0200 Message-Id: <20191015154345.13052-13-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191015154345.13052-1-hch@lst.de> References: <20191015154345.13052-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 --- 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