Received: by 10.192.165.156 with SMTP id m28csp1761630imm; Tue, 17 Apr 2018 05:13:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx49RNhzCPgKHsXpGlJ5o8EcQEXMa1psUEJx5PN1nZtd1nx/xrUx3UpjhjiD+JB6yDKozCdye X-Received: by 10.99.158.85 with SMTP id r21mr1592601pgo.312.1523967231211; Tue, 17 Apr 2018 05:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523967231; cv=none; d=google.com; s=arc-20160816; b=ziuorA5VWH0AaxC8Z99NbKN3E26mkJkAGFr0uPVHjkDELNMsn5PUWXM+AqTzFT/ALi 1dIY361SD9F12J12M6P4iksCES6/5lbv4On+cZIlvKwuxkKBjCiC2kFg6S9tqZ0LADOp ZWVibw17qZESh+6sty/Ly/Pb/HV+zfFsu3I7Twah32xKJAnA2O+HZjC+4U/MjVFGXEGi wfmaF1bUP8dCsv805IWLi6o5xTOlBVfRs34hVExHCMeemF+LC6gwczeQ9h0Xf5NcktB9 CYQ/fYBQujiZCb6sstf5Kzp2ixROO+WgQAvvCM0pVoh0FJRYa7k1nIAMd3AtU3ZDO1h+ 2Y3Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=TdW45VCHlZfIYaifwFxbVQRy8QH900Rs9g5I5Vzug4g=; b=rhmhXi7uHh66NGUGJTn6Cn4oY5iP/7ZMuzmZKUPp/2Yb3hpJvTDZifraARqNWtkS+p nP3E1Ri1CQd0hM+JzcAdas1OsmfWHcO6NE9+hJRyJxieNPyOQnDBatc3iqnP20l3IOVB EIZERsHsLAqUocS3DuJXfz51FjUcCWxbgtxm1E5M2CfxpDLczUWFvll4lLfn0RRHz6NF 5SA9jLXq88b/nMz1MAHuobfTNKpWjAav9s0waWghpcoLrb9vZGo5l4bCa7iocaK9jBSe b3IhwRFNM0nkNlnegxYcKfPtYNjyfbfjvwD3xkSKtdCjxV7YDwNmcdg3Yr1sxtk6ZKqV yPMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=LStPb8PA; 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 n189si12942275pfn.356.2018.04.17.05.13.37; Tue, 17 Apr 2018 05:13:51 -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=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=LStPb8PA; 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 S1753340AbeDQMMP (ORCPT + 99 others); Tue, 17 Apr 2018 08:12:15 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:37097 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753122AbeDQMMK (ORCPT ); Tue, 17 Apr 2018 08:12:10 -0400 Received: by mail-pl0-f67.google.com with SMTP id f7-v6so4829054plr.4 for ; Tue, 17 Apr 2018 05:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TdW45VCHlZfIYaifwFxbVQRy8QH900Rs9g5I5Vzug4g=; b=LStPb8PAUhvFxS7BK5dG0F1xhurpx8eCzKw94yB1/nODbdNLOEIpPnDBsUOVWw0uhc QcgzJwPH8m2Jrd77WqqjVW7P/ZTVoA2bUYaLKBROU5CUyX/oy7CH0M4o0OpXQJoyungd LhdwQCWTcUEjXwQDNBtQw41fhY+e2YJrPSZAWVJlGS23RGGgAkDZrO8R1tSzahh38gIZ eZDAsh9hkRjeq+hSd+JloPO9S7ydd+O15eG8WYhoWvGHgW/S/Gi9mhPcKXsLOF0GZvND PXqtvdae1spUqe0eUru8wDHNc1xmbePeYmqw/9VHXmJol55rqBzeRx3TZufYsrmu8aJY ybpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TdW45VCHlZfIYaifwFxbVQRy8QH900Rs9g5I5Vzug4g=; b=F+rDusNXdPisaDVhbFC54sM17IvH7TtlqXQfD+PMFY4CaKhxz2wFtK3MJd10MqlB2M M3vva6Q7++33SocX65sQaVM/zyv3RU7vPZRsgCmK1YI1YMDQe8Es5j9b3fxcZS+oVHDm lGHhyvvNrAtzDMjAYRpcnPnmKfj3TOCk3cBEnguicGh8bUlSXvRJtR79VZvfDTPBvH/s i0rRXQ7yo5elu19/TGx6xsVyBw06mgMMmbkX243HtyOcf6pBMGi108JbOY9KDSud8WB9 fjjzb7I9kSuYjyYrvlKqUtA59TQOPEWHtChIP0EKBswPujGKiSQweCqyGAW7krdop8k0 L+Ag== X-Gm-Message-State: ALQs6tC4Lw70jIKxw+NKhgRQQ0niLd5E1ZDj2j6/AQgDfnAKtEs+G7N0 mRGSwtHkxQ01pfVeXHl8IZS1uuJuljQ= X-Received: by 2002:a17:902:5792:: with SMTP id l18-v6mr1803008pli.355.1523967130468; Tue, 17 Apr 2018 05:12:10 -0700 (PDT) Received: from C02VV2HXHV2Q.local ([104.153.224.169]) by smtp.gmail.com with ESMTPSA id m3sm16937523pff.150.2018.04.17.05.12.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 05:12:09 -0700 (PDT) Subject: Re: [PATCH 07/11] lightnvm: pblk: remove unnecessary indirection To: =?UTF-8?Q?Javier_Gonz=c3=a1lez?= Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Javier_Gonz=c3=a1lez?= References: <1523874332-6272-1-git-send-email-javier@cnexlabs.com> <1523874332-6272-8-git-send-email-javier@cnexlabs.com> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <62002f4f-bfca-03be-c54f-23b15223446b@lightnvm.io> Date: Tue, 17 Apr 2018 14:11:54 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1523874332-6272-8-git-send-email-javier@cnexlabs.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/16/18 12:25 PM, Javier González wrote: > Remove unnecessary indirection on the read path. > Title and description are the same. Can you elaborate what changed since pblk_submit_io now directly can be returned, and doesn't have its return value rewritten to NVM_IO_ERR? > Signed-off-by: Javier González > --- > drivers/lightnvm/pblk-read.c | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c > index 89aed634333a..2f8224354c62 100644 > --- a/drivers/lightnvm/pblk-read.c > +++ b/drivers/lightnvm/pblk-read.c > @@ -102,16 +102,6 @@ static void pblk_read_ppalist_rq(struct pblk *pblk, struct nvm_rq *rqd, > #endif > } > > -static int pblk_submit_read_io(struct pblk *pblk, struct nvm_rq *rqd) > -{ > - int err; > - > - err = pblk_submit_io(pblk, rqd); > - if (err) > - return NVM_IO_ERR; > - > - return NVM_IO_OK; > -} > > static void pblk_read_check_seq(struct pblk *pblk, struct nvm_rq *rqd, > sector_t blba) > @@ -485,7 +475,7 @@ int pblk_submit_read(struct pblk *pblk, struct bio *bio) > rqd->bio = int_bio; > r_ctx->private = bio; > > - ret = pblk_submit_read_io(pblk, rqd); > + ret = pblk_submit_io(pblk, rqd); > if (ret) { > pr_err("pblk: read IO submission failed\n"); > if (int_bio) >