From patchwork Thu Nov 6 17:07:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 40361 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E1C9C24687 for ; Thu, 6 Nov 2014 17:08:16 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id x13sf925084wgg.1 for ; Thu, 06 Nov 2014 09:08:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=s6+nOR9d3QK3tFmFH7/DWTXrYUEQDzlRx1ppAwJjA/M=; b=FU3HtgaVlETA4vLw6kncx5/eUHL0d6E3KTIqfwhCxBSyVX6F0GFnLOw0oUhHgG+mXT NypWtILNK0bQSTvmjetoQqXca8Dnwk8uFJi4i/Vqsr7HX+E8Au3N3rqbbAVYcIWS2cTN TyCkkzglMyVsKiP0TN/AlN5pzPVncn2NFfNDzyY0QRiuW+Io7wKqG7DR1KNbyUnxnfP4 FQSwETrEItof9r4L4djg6KvQykwJ63jApFe3yDmm02HjXwIrblF+nf37Wp11Tp3ymyb6 C2NVfZkXYnPiLfCqbjdqP2MAMBZZTlKRNbXjkEbAruxhOYb7b0GjVtEv7Q9W923436QE PqlQ== X-Gm-Message-State: ALoCoQld3XkH5UerElm+VCR23eanaGMh7lRG2ekUlK9Ae5N34QVcqW91yHwr7uQ9zU/UGPjZyiFP X-Received: by 10.112.41.228 with SMTP id i4mr993112lbl.0.1415293695323; Thu, 06 Nov 2014 09:08:15 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.137 with SMTP id j9ls108771laa.45.gmail; Thu, 06 Nov 2014 09:08:14 -0800 (PST) X-Received: by 10.152.7.71 with SMTP id h7mr6111199laa.68.1415293694957; Thu, 06 Nov 2014 09:08:14 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id mi5si12130177lbc.61.2014.11.06.09.08.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Nov 2014 09:08:14 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id q1so2963750lam.24 for ; Thu, 06 Nov 2014 09:08:14 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr6319843lbc.34.1415293691657; Thu, 06 Nov 2014 09:08:11 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp76941lbc; Thu, 6 Nov 2014 09:08:10 -0800 (PST) X-Received: by 10.66.222.7 with SMTP id qi7mr5557798pac.111.1415293690106; Thu, 06 Nov 2014 09:08:10 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si6402420pas.155.2014.11.06.09.08.09 for ; Thu, 06 Nov 2014 09:08:10 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752137AbaKFRIH (ORCPT + 25 others); Thu, 6 Nov 2014 12:08:07 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:38820 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751051AbaKFRIE (ORCPT ); Thu, 6 Nov 2014 12:08:04 -0500 Received: from 172.24.2.119 (EHLO SZXEML455-HUB.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CBY96866; Fri, 07 Nov 2014 01:07:51 +0800 (CST) Received: from localhost.localdomain (10.47.66.28) by SZXEML455-HUB.china.huawei.com (10.82.67.198) with Microsoft SMTP Server id 14.3.158.1; Fri, 7 Nov 2014 01:07:41 +0800 From: Frediano Ziglio To: Konrad Rzeszutek Wilk , Boris Ostrovsky , David Vrabel , CC: , Subject: [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page Date: Thu, 6 Nov 2014 17:07:31 +0000 Message-ID: <1415293651-13917-1-git-send-email-frediano.ziglio@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.47.66.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: frediano.ziglio@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On ARM error code is not 0 so avoid to return it as error. Signed-off-by: Frediano Ziglio Acked-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index ebd8f21..3b8d628 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -425,7 +425,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, */ if (!dma_capable(dev, dev_addr, size)) { swiotlb_tbl_unmap_single(dev, map, size, dir); - dev_addr = 0; + dev_addr = DMA_ERROR_CODE; } return dev_addr; }