From patchwork Thu Feb 18 00:51:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 62142 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp308641lbl; Wed, 17 Feb 2016 16:54:19 -0800 (PST) X-Received: by 10.98.66.138 with SMTP id h10mr6391286pfd.89.1455756858946; Wed, 17 Feb 2016 16:54:18 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id gc5si5282421pac.224.2016.02.17.16.54.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Feb 2016 16:54:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aWCqM-0004t9-7i; Thu, 18 Feb 2016 00:53:18 +0000 Received: from mail-ob0-x22b.google.com ([2607:f8b0:4003:c01::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aWCpb-0004bq-Hw for linux-arm-kernel@lists.infradead.org; Thu, 18 Feb 2016 00:52:32 +0000 Received: by mail-ob0-x22b.google.com with SMTP id jq7so42636278obb.0 for ; Wed, 17 Feb 2016 16:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xkdl0c1rQlUNVZs3+10SrWRUx3fHjqF8iadsivFL3SU=; b=dxe4XBZZzYHQa0APVSJH+qwL1r/uO9XOM4pNS3Jn6HdcHky5BdMxvSaEZ5ddHd8Rrv BpGY0oGuoQqh4E+mGVV2op23kXsRmPxt7ZVhp+wcF4TxGCJAEx0Bkx5guxzzU+0IM03v HD1DqCdBKKOGL0JR7/qplQKy+uQqo4T3IqFjc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xkdl0c1rQlUNVZs3+10SrWRUx3fHjqF8iadsivFL3SU=; b=GEo3v2rB67x6sAamopRRly4XIWtnHRin+3/zEOp/pwt6AbSWp1yVZcaaMJyAxZ4jyX WBI6PkAPYoUNbW8OWXt7IK4it175xpfsh9wnrvoIYhaAFehrPr5flGQBqEFJGFhUvvu6 +hcCN9v+3rLW8E9RObz74UQRtWkiLDrv0DbmdRGncfBvBczuVb4OtZrIhMXGL/NJRPZt VqWYahbWLFpP5O999O2dvn32EGV/PkK0/zBaamoYbB1ifBrQu24K38FZWhgbH+ey2JdZ JUkTiB8SMJ3drQtySoPNi8vBozQzzQQfCZ510YdDkONSzUI7UldKAiGnI1fjkmCl3BhU YB1A== X-Gm-Message-State: AG10YOTIeAcWttv7Nt8dvTuR9OUH5IRJHbbOKoKF17FZL/sHpCbRE7plsXGpiblJKWVSm7Po X-Received: by 10.202.78.150 with SMTP id c144mr3606712oib.108.1455756730584; Wed, 17 Feb 2016 16:52:10 -0800 (PST) Received: from t430.globalsuite.net (h58.159.185.173.static.ip.windstream.net. [173.185.159.58]) by smtp.gmail.com with ESMTPSA id gi5sm2357650obb.6.2016.02.17.16.52.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Feb 2016 16:52:10 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 02/21] coresight: etm4x: Check every parameter used by dma_xx_coherent. Date: Wed, 17 Feb 2016 17:51:44 -0700 Message-Id: <1455756723-8456-3-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455756723-8456-1-git-send-email-mathieu.poirier@linaro.org> References: <1455756723-8456-1-git-send-email-mathieu.poirier@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160217_165231_737491_83DAF79C X-CRM114-Status: GOOD ( 12.18 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4003:c01:0:0:0:22b listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org From: Eric Long The dma_alloc_coherent return an "void *" not an "void __iomen *". It uses the wrong parameters when calls dma_free_coherent function. The sparse tool output logs as the following: coresight-tmc.c:199:23: expected void * coresight-tmc.c:199:23: got void [noderef] *vaddr coresight-tmc.c:336:30: warning: incorrect type in assignment (different address spaces) coresight-tmc.c:336:30: expected char *buf coresight-tmc.c:336:30: got void [noderef] * coresight-tmc.c:769:50: warning: incorrect type in argument 4 (different base types) coresight-tmc.c:769:50: expected unsigned long long [unsigned] [usertype] dma_handle coresight-tmc.c:769:50: got restricted gfp_t Signed-off-by: Eric Long Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-tmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c index 570d96815f78..c4fa70ed14ce 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.c +++ b/drivers/hwtracing/coresight/coresight-tmc.c @@ -124,7 +124,7 @@ struct tmc_drvdata { bool reading; char *buf; dma_addr_t paddr; - void __iomem *vaddr; + void *vaddr; u32 size; bool enable; enum tmc_config_type config_type; @@ -766,7 +766,7 @@ err_misc_register: err_devm_kzalloc: if (drvdata->config_type == TMC_CONFIG_TYPE_ETR) dma_free_coherent(dev, drvdata->size, - &drvdata->paddr, GFP_KERNEL); + drvdata->vaddr, drvdata->paddr); return ret; }