Message ID | 1361649846.4025.28.camel@ideak-mobl |
---|---|
State | New |
Headers | show
Return-Path: <patch+caf_=linaro-patchwork=canonical.com@linaro.org> X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9E63623E52 for <patchwork@peony.canonical.com>; Sat, 23 Feb 2013 20:04:26 +0000 (UTC) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by fiordland.canonical.com (Postfix) with ESMTP id 3E6FAA1898F for <linaro-patchwork@canonical.com>; Sat, 23 Feb 2013 20:04:26 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id 15so1415709vea.14 for <linaro-patchwork@canonical.com>; Sat, 23 Feb 2013 12:04:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-extloop1:x-ironport-av:message-id:from:to:date :in-reply-to:references:x-mailer:mime-version:cc:subject:x-beenthere :x-mailman-version:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=YIeIR8oloJFqfDcvdxq+gYffyQBPfcHAN9M3oKC47hs=; b=NGPHcC2PKQ8qezdRL+fPUas6TYvhWSri72C0S3fu2dn/m30d5DqxHLdQJYE8YYA32B Tn4c9leaghV8VZGHRrcfK4KyRLmA4/xc36Exo8bg/4BwOmkjmMVdN1/UTGX/tJJvkGds s2laeU+gqVMUbP7R+k2CAan95H1W8/Xtrw0yveTqKfSHUrCd4VHPBLnDIEn+HBA5CCfc HjTQlcxVfPO7pnqJ3sonZB4P/UnZqNrtZ/tYdL6HsY7lmBITvVUZpZ2xkem35k/dW9qv luRh7BpjU+nYLRZs9Dn9nTNDQt7xZOzTVbUFaca6a00wkrnHyyzsKr8itY7CJHoM43LW cOZw== X-Received: by 10.220.149.82 with SMTP id s18mr7908291vcv.14.1361649865504; Sat, 23 Feb 2013 12:04:25 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp146057veb; Sat, 23 Feb 2013 12:04:24 -0800 (PST) X-Received: by 10.14.3.70 with SMTP id 46mr21274710eeg.2.1361649863926; Sat, 23 Feb 2013 12:04:23 -0800 (PST) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id g8si12796255eem.147.2013.02.23.12.04.22; Sat, 23 Feb 2013 12:04:23 -0800 (PST) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from <linaro-mm-sig-bounces@lists.linaro.org>) id 1U9LKU-0000Dq-KE; Sat, 23 Feb 2013 20:04:18 +0000 Received: from mga14.intel.com ([143.182.124.37]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from <imre.deak@intel.com>) id 1U9LKS-0000Dl-F6 for linaro-mm-sig@lists.linaro.org; Sat, 23 Feb 2013 20:04:16 +0000 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 23 Feb 2013 12:04:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,723,1355126400"; d="scan'208";a="205628707" Received: from unknown (HELO [10.252.120.83]) ([10.252.120.83]) by AZSMGA002.ch.intel.com with ESMTP; 23 Feb 2013 12:04:08 -0800 Message-ID: <1361649846.4025.28.camel@ideak-mobl> From: Imre Deak <imre.deak@intel.com> To: Stephen Warren <swarren@wwwdotorg.org> Date: Sat, 23 Feb 2013 22:04:06 +0200 In-Reply-To: <51284595.5040903@wwwdotorg.org> References: <1360768224-18163-1-git-send-email-imre.deak@intel.com> <1360768224-18163-2-git-send-email-imre.deak@intel.com> <51284595.5040903@wwwdotorg.org> X-Mailer: Evolution 3.6.2-0ubuntu0.1 Mime-Version: 1.0 Cc: Maxim Levitsky <maximlevitsky@gmail.com>, linux-kernel@vger.kernel.org, linaro-mm-sig@lists.linaro.org, "linux-next@vger.kernel.org" <linux-next@vger.kernel.org>, Tejun Heo <tj@kernel.org>, Andrew Morton <akpm@linux-foundation.org> Subject: Re: [Linaro-mm-sig] [PATCH v3 2/2] lib/scatterlist: use page iterator in the mapping iterator X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." <linaro-mm-sig.lists.linaro.org> List-Unsubscribe: <http://lists.linaro.org/mailman/options/linaro-mm-sig>, <mailto:linaro-mm-sig-request@lists.linaro.org?subject=unsubscribe> List-Archive: <http://lists.linaro.org/pipermail/linaro-mm-sig> List-Post: <mailto:linaro-mm-sig@lists.linaro.org> List-Help: <mailto:linaro-mm-sig-request@lists.linaro.org?subject=help> List-Subscribe: <http://lists.linaro.org/mailman/listinfo/linaro-mm-sig>, <mailto:linaro-mm-sig-request@lists.linaro.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQkYPOHrRCXCFEc4Y+uboCAjOe9I2jgiVAFcFRt6P8/ymdNTblofw3DfmwMHW8AyZpuLd2SE |
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 2645acf..b83c144 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -493,6 +493,8 @@ bool sg_miter_next(struct sg_mapping_iter *miter) miter->__offset = pgoffset ? 0 : sg->offset; miter->__remaining = sg->offset + sg->length - (pgoffset << PAGE_SHIFT) - miter->__offset; + miter->__remaining = min_t(unsigned long, miter->__remaining, + PAGE_SIZE - miter->__offset); } miter->page = miter->piter.page; miter->consumed = miter->length = miter->__remaining;