Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2430107imu; Sun, 18 Nov 2018 23:53:16 -0800 (PST) X-Google-Smtp-Source: AJdET5f3g2w3DHDL5EC6MsVtusb0c6mzj8fzPWfnM7yHRXA8nTCcKKI7XjMnq0EJU3RW97yvj5N6 X-Received: by 2002:a17:902:1103:: with SMTP id d3-v6mr20518144pla.249.1542613996937; Sun, 18 Nov 2018 23:53:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542613996; cv=none; d=google.com; s=arc-20160816; b=bPNrdhIvscEZju0W/ptHOcVLpYp28UWd/2MHNClgXd8R9HtH0KH9TDwhqxRnqgJQh6 tTrEgGJtPKAXyY6dBaeKf2iNWgLHYPaMRf8cRZ0gOOmWnqYq9hzgrwlBVoirnxiTQ4Ev p7L4GERpuJf2eUbn8hphElsr3Rc89EWvtj3wcuUJJwljD+XA7DcAAkd6JQfuIR6k8FNm GmN2jjed4wlZBJVUYAfLZ+bvYVqHafYw4jyLZc15YOeoK90IewZs4I6DvOuTNhilt0m7 FuURnZAXP+weoNjNuHPvpfp5sPtA6sosPmE/Z+vQbODq0JfOesr4lHy74l0DSjwS0EHL /vzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m29VedIpLYMZcPkWMmOLUuScHJZa08vNR4RrJGWDpNU=; b=G3HQTMraHBv49OASByeQx9zyhnBLHlXlxMivYON7ilynqbnHXBb3ztDa4GYChKC1s8 DFJdoVVsOUz6TkI+Yh9IArAcuiMqEBWD/QiJUKUFv1RJgBkjXen7BNaTVeRebWesfZKy tEfmBwQiTt8aTbyIDZ34xcZosglujJG2XjzJ34aM12EQF7KOXGQCxlU6jvSmU3SVvARB 1UhtJBWH0XKupKKQKzyO2TLtXLsUouk7OU/9I0Y2jqC4hujttLjITWEt4SRFf7AdtLs0 gYoFqOc7mX8ZIOY/nFhISKszuYxH08r+w3Whas2Fbba0VGLAnw8uFBkg5XFGZeYLBrC1 TE5w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e13si39033071pgh.251.2018.11.18.23.53.01; Sun, 18 Nov 2018 23:53:16 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbeKSSPM (ORCPT + 99 others); Mon, 19 Nov 2018 13:15:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60782 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726256AbeKSSPL (ORCPT ); Mon, 19 Nov 2018 13:15:11 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE75D8553D; Mon, 19 Nov 2018 07:52:21 +0000 (UTC) Received: from ming.t460p (ovpn-8-26.pek2.redhat.com [10.72.8.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1C7A105706B; Mon, 19 Nov 2018 07:51:59 +0000 (UTC) Date: Mon, 19 Nov 2018 15:51:55 +0800 From: Ming Lei To: Christoph Hellwig Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dave Chinner , Kent Overstreet , Mike Snitzer , dm-devel@redhat.com, Alexander Viro , linux-fsdevel@vger.kernel.org, Shaohua Li , linux-raid@vger.kernel.org, linux-erofs@lists.ozlabs.org, David Sterba , linux-btrfs@vger.kernel.org, "Darrick J . Wong" , linux-xfs@vger.kernel.org, Gao Xiang , Theodore Ts'o , linux-ext4@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Boaz Harrosh , Bob Peterson , cluster-devel@redhat.com Subject: Re: [PATCH V10 04/19] block: use bio_for_each_bvec() to map sg Message-ID: <20181119075154.GB16519@ming.t460p> References: <20181115085306.9910-1-ming.lei@redhat.com> <20181115085306.9910-5-ming.lei@redhat.com> <20181116133314.GC3165@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181116133314.GC3165@lst.de> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 19 Nov 2018 07:52:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 16, 2018 at 02:33:14PM +0100, Christoph Hellwig wrote: > > + if (!*sg) > > + return sglist; > > + else { > > No need for an else after an early return. OK, good catch! Thanks, Ming