From patchwork Mon Nov 6 13:37:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 118044 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2775565qgn; Mon, 6 Nov 2017 05:37:52 -0800 (PST) X-Google-Smtp-Source: ABhQp+TicTzJs65pMEw9D41pjJn8gGJG9i7pshHcFyuHcMdcedaeFZruBbOSQprax/8rQqKHb+TU X-Received: by 10.99.119.4 with SMTP id s4mr15079866pgc.377.1509975472856; Mon, 06 Nov 2017 05:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509975472; cv=none; d=google.com; s=arc-20160816; b=FKUFWswOAW4s3kCoSR8ZgQy2Omn6iqw8t3EcZOIVtHl/Bxy2wo02/x3EaHkTH2XB2R IMopn8MdRXUK0GaDvQE+qqgrMTXt/HafqajfqBWSGo/jXx0rwsf70F70CiNNNc/VfscW p4tYJo8BfsmEmpHQJ0/6iwVngzDvbCw5TOEgajLhkGueBGftpJdHL15PzGpjcu50/P8+ w7E5cH2B/pOUcmmZccvNoqrcVisH+3SWxPWHJBCUt+Ha5yz3gOr63+8pV7sb/skH9aze iZqMCYCcg3WKhWGgv+7pwjgeZxLqCwhGzedvDlJ30QQO9ixes/ER2txyILlrl1ogsWjC KCuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=iOEBlU+OFoEV9S03N692PYrpjodm0zohTW/RBoR9YKk=; b=vryM2/v0nroAI2/gxkxugf3dFXnsJVn1OWhySyiC/+AByanQp2s6Vd8RjtLAS+k4dt Z5elgXJEIMUdLBSdyG+YyWAIy9Kzwv/i0cLSxeujgCNmP4CkADKPAa3DXl+sSnmmAmPZ HHUdDN/G9Q9Ixu7aM85bUfg4Op/jB/boUsZH1i72khsPvF0NWjikPAtHq141VsNHuad5 +BnF+caaJFvDK4jL1KxN3l6kuvyGoB3o5ATJd3PoDXIRrqsod/ZqtZ50MwoscjlmPKql dg23qXJ/0w5IhrdLkjAutzBy20/5wizKYeM53aMmRP4E8zNHoRLVem/w31Vk+ynojqvU VDqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si11430703pga.622.2017.11.06.05.37.52; Mon, 06 Nov 2017 05:37:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753162AbdKFNhu (ORCPT + 26 others); Mon, 6 Nov 2017 08:37:50 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:57235 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752632AbdKFNht (ORCPT ); Mon, 6 Nov 2017 08:37:49 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M7az9-1f8uE10Sgx-00xK6h; Mon, 06 Nov 2017 14:37:38 +0100 From: Arnd Bergmann To: Ohad Ben-Cohen , Bjorn Andersson Cc: Arnd Bergmann , Avaneesh Kumar Dwivedi , Andy Gross , Philipp Zabel , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] remoteproc: qcom: use %pap format string for phys_addr_t Date: Mon, 6 Nov 2017 14:37:17 +0100 Message-Id: <20171106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aznrd+yXTbESvslI/fjV2bEWLGPZppWN5fQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We cannot cast a phys_addr_t variable to a pointer on 32-bit architectures with CONFIG_PHYS_ADDR_T_64BIT set: In file included from include/linux/kernel.h:14:0, from include/linux/clk.h:16, from drivers/remoteproc/qcom_q6v5_pil.c:18: drivers/remoteproc/qcom_q6v5_pil.c: In function 'q6v5_xfer_mem_ownership': drivers/remoteproc/qcom_q6v5_pil.c:337:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] (void *)addr, (void *)(addr + size), ^ The correct way to print the contents is to use the %pap format string, passing the phys address by reference. Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch") Signed-off-by: Arnd Bergmann --- drivers/remoteproc/qcom_q6v5_pil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index 5460f61ee21c..4576f88499cb 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -333,9 +333,9 @@ static int q6v5_xfer_mem_ownership(struct q6v5 *qproc, int *current_perm, ret = qcom_scm_assign_mem(addr, ALIGN(size, SZ_4K), current_perm, &next, 1); if (ret < 0) { - pr_err("Failed to assign memory access in range %p to %p to %s ret = %d\n", - (void *)addr, (void *)(addr + size), - remote_owner ? "mss" : "hlos", ret); + phys_addr_t end = addr + size; + pr_err("Failed to assign memory access in range %pap to %pap to %s ret = %d\n", + &addr, &end, remote_owner ? "mss" : "hlos", ret); return ret; }