From patchwork Wed Jun 13 12:14:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9269 Return-Path: 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 0E82F23E4F for ; Wed, 13 Jun 2012 12:14:44 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id B14CAA184BF for ; Wed, 13 Jun 2012 12:14:43 +0000 (UTC) Received: by ghbz12 with SMTP id z12so313735ghb.11 for ; Wed, 13 Jun 2012 05:14:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:date:from :to:message-id:mime-version:x-mailer:x-auditid:x-brightmail-tracker :x-tm-as-mml: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=U0ViU6v2Q7kjOTyCkNxScM3W0lXCoIwSDtw9Kf2GOZc=; b=krI6FvHwlU6kC83Nan3M0qdpOoM2mgukBRZs81mX7DlecOOMvvOLPhZUxXh34PyckY gAj4JSoadCJis7kLmuNsCwas6Jx7ICngXVFxgdxJIm7xlTVlreWSWOywpPsHW0+ucmn6 l17jcWrJO3ddBI8kxUOO0nu+M3f4HoN3qRfpkbjSo21ItOhMVOUlGqj/iFOuIn91t5/9 Lt8A2ZPeKKDEeWyj4LgnmeKkxhn6j2TRIMkt5nO/QltLaDDihOmVW+JlwcgjbSu96MiG NuTv5GOiryzz1KEIxIUKs0eiwMMrhUbWFiikfBmO1T3/EOwmYHU8Crpi+lFZtBkaCdJG yfjg== Received: by 10.50.163.99 with SMTP id yh3mr10203515igb.53.1339589683010; Wed, 13 Jun 2012 05:14:43 -0700 (PDT) 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.231.24.148 with SMTP id v20csp19130ibb; Wed, 13 Jun 2012 05:14:42 -0700 (PDT) Received: by 10.216.142.215 with SMTP id i65mr10367208wej.29.1339589681297; Wed, 13 Jun 2012 05:14:41 -0700 (PDT) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id d59si3877450wed.5.2012.06.13.05.14.39; Wed, 13 Jun 2012 05:14:41 -0700 (PDT) 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 ) id 1SemT6-00029W-W4; Wed, 13 Jun 2012 12:14:37 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SemT5-00027y-HW for linaro-mm-sig@lists.linaro.org; Wed, 13 Jun 2012 12:14:35 +0000 Received: from epcpsbgm2.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M5K00EP7202VTE0@mailout2.samsung.com> for linaro-mm-sig@lists.linaro.org; Wed, 13 Jun 2012 21:14:32 +0900 (KST) Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AE.A9.14970.82488DF4; Wed, 13 Jun 2012 21:14:32 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M5K00K8V1ZYZ320@mmp1.samsung.com> for linaro-mm-sig@lists.linaro.org; Wed, 13 Jun 2012 21:14:32 +0900 (KST) Date: Wed, 13 Jun 2012 14:14:09 +0200 From: Marek Szyprowski To: linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org Message-id: <1339589649-31970-1-git-send-email-m.szyprowski@samsung.com> MIME-version: 1.0 X-Mailer: git-send-email 1.7.10 X-AuditID: cbfee61b-b7fcc6d000003a7a-ff-4fd88428417f X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprILMWRmVeSWpSXmKPExsVy+t9jAV2Nlhv+BnPmc1p8ufKQyYHR4/a/ x8wBjFFcNimpOZllqUX6dglcGS1t59kKnotW3Lg3h62B8axQFyMnh4SAicTcZQ0sELaYxIV7 69m6GLk4hAQWMUrs+nOFGSTBKyAo8WPyPaAiDg5mAXmJI5eyQcLMAuoSk+YtAisREljLJPHy miWIzSZgKNH1tosNxBYR8JB4suIcM8hMZoFWRokp7cvBGoQF3CUezp0NZrMIqEp0LLvBBrHL Q+Luj4esEAfJSzy938c2gZFvFpIzZiGcMQvJGQsYmVcxiqYWJBcUJ6XnGukVJ+YWl+al6yXn 525iBAfUM+kdjKsaLA4xCnAwKvHwHmi44S/EmlhWXJl7iFGCg1lJhPdZNlCINyWxsiq1KD++ qDQntfgQozQHi5I4b5P1BX8hgfTEktTs1NSC1CKYLBMHp1QDY0awc5B5SWHVmoDH2a1vZ4p6 yE5ZmbW8bv+uvd2ZJvVijO8LlGe8W9K+0b1OQFrApi+sJWTFfTNOmc2L4v8e2sJwhO9er7mj UVbPgT+tOws+VJ2JOWl19JDSBN8boevubuyztr14ZvWDZ2u2SzNsamRc/L7siMostTd8LwNF zujq9nZHlryfpMRSnJFoqMVcVJwIAEQIIPQkAgAA X-TM-AS-MML: No Cc: Kyungmin Park , Russell King Subject: [Linaro-mm-sig] [PATCH] ARM: dma-mapping: fix debug messages in dmabounce code X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQlf2cmcbYIbAIxsKFr+ah5kXEFpA8zLjP0lXl+2Wji+f8sqeoWsV+iPIvuXUyf5qrbSO6hh This patch fixes the usage of uninitialized variables in dmabounce code intoduced by commit a227fb92 ('ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops'): arch/arm/common/dmabounce.c: In function ‘dmabounce_sync_for_device’: arch/arm/common/dmabounce.c:409: warning: ‘off’ may be used uninitialized in this function arch/arm/common/dmabounce.c:407: note: ‘off’ was declared here arch/arm/common/dmabounce.c: In function ‘dmabounce_sync_for_cpu’: arch/arm/common/dmabounce.c:369: warning: ‘off’ may be used uninitialized in this function arch/arm/common/dmabounce.c:367: note: ‘off’ was declared here Signed-off-by: Marek Szyprowski --- arch/arm/common/dmabounce.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 9d7eb53..aa07f59 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -366,8 +366,8 @@ static int __dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr, struct safe_buffer *buf; unsigned long off; - dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n", - __func__, addr, off, sz, dir); + dev_dbg(dev, "%s(dma=%#x,sz=%zx,dir=%x)\n", + __func__, addr, sz, dir); buf = find_safe_buffer_dev(dev, addr, __func__); if (!buf) @@ -377,8 +377,8 @@ static int __dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr, BUG_ON(buf->direction != dir); - dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n", - __func__, buf->ptr, virt_to_dma(dev, buf->ptr), + dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x off=%#lx) mapped to %p (dma=%#x)\n", + __func__, buf->ptr, virt_to_dma(dev, buf->ptr), off, buf->safe, buf->safe_dma_addr); DO_STATS(dev->archdata.dmabounce->bounce_count++); @@ -406,8 +406,8 @@ static int __dmabounce_sync_for_device(struct device *dev, dma_addr_t addr, struct safe_buffer *buf; unsigned long off; - dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n", - __func__, addr, off, sz, dir); + dev_dbg(dev, "%s(dma=%#x,sz=%zx,dir=%x)\n", + __func__, addr, sz, dir); buf = find_safe_buffer_dev(dev, addr, __func__); if (!buf) @@ -417,8 +417,8 @@ static int __dmabounce_sync_for_device(struct device *dev, dma_addr_t addr, BUG_ON(buf->direction != dir); - dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n", - __func__, buf->ptr, virt_to_dma(dev, buf->ptr), + dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x off=%#lx) mapped to %p (dma=%#x)\n", + __func__, buf->ptr, virt_to_dma(dev, buf->ptr), off, buf->safe, buf->safe_dma_addr); DO_STATS(dev->archdata.dmabounce->bounce_count++);