From patchwork Thu Aug 4 09:21:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 73247 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1289698qga; Thu, 4 Aug 2016 02:24:34 -0700 (PDT) X-Received: by 10.98.98.193 with SMTP id w184mr104580682pfb.120.1470302674183; Thu, 04 Aug 2016 02:24:34 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 9si13769872pfr.240.2016.08.04.02.24.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 02:24:34 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVEsA-0005te-7N; Thu, 04 Aug 2016 09:23:26 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVErf-0005Nm-PL for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2016 09:22:58 +0000 Received: by mail-wm0-x235.google.com with SMTP id i5so370062079wmg.0 for ; Thu, 04 Aug 2016 02:22:35 -0700 (PDT) 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=V11yLZKyG+TmR1uXnnLrowGbrzpxvOjpbpUxedNptI8=; b=PJx1c8FL2lOHe979cE6/RNF0BRUyEr5CHbzOULN+a3eMk0tnDBtYdAJwTTTB9vXpGG QRvqnmJ8erDB7fX8eF8oMgxqx/MXDro/nb3qNUTc9f7d1zWF0DFjnU9EMJRYkqnE0DD/ +2+vRf/kSQAJTV52/FFsNNjrsFVehrr0mE4UU= 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=V11yLZKyG+TmR1uXnnLrowGbrzpxvOjpbpUxedNptI8=; b=kwmo7s8crQugzGH0bQpO5BxpXglFH1Qo1ykrAFhvqlvKaJkmyK9TauvhrwDVk51lHY spPkY6EpRd9w8312erfU2yqwrnnIkZ9p1Q3Hgz/NWdec5CEWFVTWKzH1bwJisd6cf/jH MgJ+Ov8lOfI92B8RexufQk39cb+CgL2JxkJt3nAYKLmaV661KB4L9NWbezOkWh6PvvoV raN/qR7G+Wyc9tzLlXuZNIbZCF4Fcl7vkXxYEmFRXm+83kZs3b5U9MRCjgNoS0Wgjp0z eMQmwrVL6x2gvGc4USR0y7Dt7FqRjm7TCTF/fKfayVYUVYlAs7qc4kuju+N+7XZ35b3A CTlw== X-Gm-Message-State: AEkoouuXsVIOQ5oBAAIZE1i6nwMFG/rB1NLBnGnb3eyysShGD8rLYLfIXrY846sNzr5mvB6o X-Received: by 10.194.149.176 with SMTP id ub16mr64840010wjb.54.1470302554199; Thu, 04 Aug 2016 02:22:34 -0700 (PDT) Received: from localhost.localdomain (host86-185-202-8.range86-185.btcentralplus.com. [86.185.202.8]) by smtp.gmail.com with ESMTPSA id d64sm2615461wmc.22.2016.08.04.02.22.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 02:22:33 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/9] remoteproc: core: Ensure error message is clear Date: Thu, 4 Aug 2016 10:21:45 +0100 Message-Id: <20160804092153.23032-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160804092153.23032-1-lee.jones@linaro.org> References: <20160804092153.23032-1-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160804_022256_334746_B3358A2D X-CRM114-Status: GOOD ( 12.10 ) 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 [2a00:1450:400c:c09:0:0:0:235 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 Message has at least one valid DKIM or DK signature -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 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: ohad@wizery.com, kernel@stlinux.com, loic.pallardy@st.com, linux-remoteproc@vger.kernel.org, patrice.chotard@st.com, bjorn.andersson@linaro.org, Lee Jones MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Before this patch, the dma_alloc_coherent() failure path printed out: "dma_alloc_coherent err: 16760832" ... alluding to the Linux error code being 16760832, but seeing as Linux error codes are all negative, this looks like a signed/unsigned issue. In fact, the message is trying to print the length of the requested memory region. Let's clear that up. While we're at it, let's standardise the way 'len' is printed. In all other locations 'len' is in hex prefixed by a '0x' for clarity. Signed-off-by: Lee Jones --- drivers/remoteproc/remoteproc_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index aea29a75c..3566dc9 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -581,7 +581,7 @@ static int rproc_handle_carveout(struct rproc *rproc, return -EINVAL; } - dev_dbg(dev, "carveout rsc: da %x, pa %x, len %x, flags %x\n", + dev_dbg(dev, "carveout rsc: da %x, pa %x, len 0x%x, flags %x\n", rsc->da, rsc->pa, rsc->len, rsc->flags); carveout = kzalloc(sizeof(*carveout), GFP_KERNEL); @@ -590,7 +590,8 @@ static int rproc_handle_carveout(struct rproc *rproc, va = dma_alloc_coherent(dev->parent, rsc->len, &dma, GFP_KERNEL); if (!va) { - dev_err(dev->parent, "dma_alloc_coherent err: %d\n", rsc->len); + dev_err(dev->parent, + "failed to allocate dma memory: len 0x%x\n", rsc->len); ret = -ENOMEM; goto free_carv; }