Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2129767yba; Fri, 19 Apr 2019 12:44:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjZm+IMxhSHgebFoJgelgGCB41GplQeYtpPqQSKTwcSdx/MAuo6mPMhFgOpYuXp+TvOaaA X-Received: by 2002:a17:902:2702:: with SMTP id c2mr5605857plb.37.1555703072494; Fri, 19 Apr 2019 12:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555703072; cv=none; d=google.com; s=arc-20160816; b=GHsgsMon936esmCsYcOvXHWJ2c2zCottyoWZbgZ7JbpJpe+SfLHFziDoPm5zOQ6gEL /tkCQQlv+MpPCHGBFhDsnxrLr5MPK4fRRMAegiiIxrQjbQyF222NNm4GJGZWO8o9MCro K7xxF84x/MOsJhtVtm/ji6JLd4Zrvx4JpfA3DYzD7dzkvxbaH4ll0nZ4+zPmJp7f3JVl rvJ6MqkvpHc0GTIQFsSjCrfJoazxvY+Co+/R662pYLYwKF0YZlIWVeE9ysp5SkkiO8Qq PKQasHMRmwlFQB3YJkiHP4PDYsO53rpcUV5PrLHkasacUjr5ox0cDD7dr7WSBFR24TiF H1fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=H7lQzIXaJV2/HXG0+LcgSDo0Fy8X0yQfTacF3J0fSHI=; b=QNaQG/FW1oMRjySBYOk6p4N49hvge6DYKJ33LsurbPl4QKWIDeU9regYtSwA1et6Rr vgQeuUJL/WEJVNhoAQyIBNXfqvmz4X/LrRGMaeeWmO+z7+p85/sor2l9eXf06EjsCfqJ 8xuJYPcxpYd2mQMJDSapgKYDceHo64fU+XrEo28tUjFRzcwXqgAYkQ8a4Evqzne3vAv/ N3ol6qYK1tY6TyILrHqNzMphVBoEyAs5hmCuzhnClgobMAWzoppInCtIZZtepu+Xc+Q0 3dgr0Frekl2Ek+2j2GZ58ltBMMQzQQZPNHSdO8WXgi6/FLSpmrPJiNkTsFIGKGl1C+lG t5jw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f64si6000455plf.258.2019.04.19.12.44.17; Fri, 19 Apr 2019 12:44:32 -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; 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 S1727682AbfDSTn0 (ORCPT + 99 others); Fri, 19 Apr 2019 15:43:26 -0400 Received: from smtp08.smtpout.orange.fr ([80.12.242.130]:59285 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbfDSTn0 (ORCPT ); Fri, 19 Apr 2019 15:43:26 -0400 Received: from belgarion ([90.76.58.102]) by mwinf5d31 with ME id 2AjK2000J2CLFkS03AjKBi; Fri, 19 Apr 2019 12:43:23 +0200 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Fri, 19 Apr 2019 12:43:23 +0200 X-ME-IP: 90.76.58.102 From: Robert Jarzmik To: Zhou Wang Cc: , , Subject: Re: [PATCH] lib: scatterlist: Fix to support no mapped sg References: <1555581006-153458-1-git-send-email-wangzhou1@hisilicon.com> X-URL: http://belgarath.falguerolles.org/ Date: Fri, 19 Apr 2019 12:43:19 +0200 In-Reply-To: <1555581006-153458-1-git-send-email-wangzhou1@hisilicon.com> (Zhou Wang's message of "Thu, 18 Apr 2019 17:50:06 +0800") Message-ID: <871s1ymg1k.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/26 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Zhou Wang writes: > In function sg_split, the second sg_calculate_split will return -EINVAL > when in_mapped_nents is 0. > > Indeed there is no need to do second sg_calculate_split and sg_split_mapped > when in_mapped_nents is 0, as in_mapped_nents indicates no mapped entry in > original sgl. > > Signed-off-by: Zhou Wang That's right. May I know what is the usecase which led you to this fix ? Acked-by: Robert Jarzmik -- Robert