From patchwork Mon Nov 16 08:25:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11907699 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04C60C55ABD for ; Mon, 16 Nov 2020 08:27:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 800502071E for ; Mon, 16 Nov 2020 08:27:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tq33y4FF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="JsL/W1lT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 800502071E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MIZhnsSYG9nNriJ1w0HKSGq2HJBx2BoGemsCg1ASmVk=; b=tq33y4FFB0t16AExEBVH+HTyI 4ix2KuQe3Xbc0lQuVU2R64TBcpONSCDJyasJCgDGgxrv7eZOC6n8LxQq8fbkkgUaAiOuPc6pdp2Z7 ihlBnM70U2oKEYsi0GV68yaOMQMhUyF1ops0KeLvzBOSnWlyb3nhvsosH75b7nd+PQ2cn1d4v9W91 l8Xy2J/tT1AbJ87XmCwT3Aw4g1uCuaulthQLf3hwfU6aaZ4Vby0anxu2ktFlal3bcq5oLJSGKM2m2 x/bljscNL+jJ2EAuQxWuYN7GuBUUfYpMdeVzE6z2OY+1I4rWcspZfUy8l+y6Bgs75MADld8xXAYwl 8gtFd1R1w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keZqA-0007PL-SK; Mon, 16 Nov 2020 08:26:22 +0000 Received: from mail-qt1-x84a.google.com ([2607:f8b0:4864:20::84a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1keZq0-0007MF-DD for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2020 08:26:14 +0000 Received: by mail-qt1-x84a.google.com with SMTP id z8so9656529qti.17 for ; Mon, 16 Nov 2020 00:26:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=FGK3po+1mabmofbsrOAmqgZTB285sISrAEMhHIPEXVY=; b=JsL/W1lTuj6I5ZApSjpS7ca/5BQyo4GmrFUADec+nmp2dPG5WZqt3B+a7DbQaVymYU x6f2oycz6c8JtN9wbjU7JRHN5+lvqWJAIiT97Q5+7aQVf/Io/EUh2rKdP/QJ9N8XWQaS 9gaGS9xBbiCluwBzhShkSc2E5FHOUW+cSc+46uw7R4MS5y94nQImZ2Ihb7HlwdcfFjgY L+SsuYC5oaTo4rUy5ZOGTDLTXH0rLMswsJHlMJrrSUkuvqVhGc+2xz75zROYAw52tcuA pz5sB6lq3VnDeAxlylx+pHesOCHROgprfGpQ9q7kY023QojLs4IjQ6879cCAY8Vn3Z3x C0zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=FGK3po+1mabmofbsrOAmqgZTB285sISrAEMhHIPEXVY=; b=qzW9FW8+u30j/bL4iyfSFOSLly/2IMU7m3lLHwCBvSWhDIr6D685/BprpCmV4fzsM8 6TMM/pcSCpICAjmjmtNALAvCDvUmCL4uqZmLHL2GvNiLf00HDPysNwJX5xsmrIaVOq8f LGLbdMqeZfrryxns0WaE+ioQgiX0eii095lar6FM1qZLUH7/uNKQJnIZeSWPXRRDV0OM Y3fMiHZ/1vkAmJHBedk6kP2rb7tEY3zKW9MmZNXymsm8wV205gCIET8N8yJ+oG8L42CX tp4gfvZ2dWGSCB9fh4wp8yyvRI9Z8MySso7XSF5r+kx9cDYMOVOL/pbqm39cUQTilCn4 69gA== X-Gm-Message-State: AOAM532lQj3pS9m7CESzKUHysxPqCA7qn8hen+5Si767QLAxlGBiWRVt P81/Vhg22GRqylYBBHq/8zMK+R2K+FWW X-Google-Smtp-Source: ABdhPJzDrTnHczzHtkZNBK/N7SQ6we1yTn8KBhiJm4PEqnZsFVM7m+93BhG3MptVNJqxfLnG0DfgmB+BOgq7 X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:ad4:54cd:: with SMTP id j13mr13656224qvx.8.1605515168633; Mon, 16 Nov 2020 00:26:08 -0800 (PST) Date: Mon, 16 Nov 2020 16:25:36 +0800 In-Reply-To: <20201116082537.3287009-1-tzungbi@google.com> Message-Id: <20201116082537.3287009-2-tzungbi@google.com> Mime-Version: 1.0 References: <20201116082537.3287009-1-tzungbi@google.com> X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off From: Tzung-Bi Shih To: ohad@wizery.com, bjorn.andersson@linaro.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201116_032612_465437_80AE8DE9 X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drinkcat@chromium.org, kernel test robot , tzungbi@google.com, linux-remoteproc@vger.kernel.org, groeck@chromium.org, linux-mediatek@lists.infradead.org, pihsun@chromium.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fixes the following sparse errors on sram power on and off: On drivers/remoteproc/mtk_scp.c:306:17: warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] __iomem *addr got void *addr On drivers/remoteproc/mtk_scp.c:307:9: warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] __iomem *addr got void *addr On drivers/remoteproc/mtk_scp.c:314:9: warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] __iomem *addr got void *addr On drivers/remoteproc/mtk_scp.c:316:17: warning: incorrect type in argument 2 (different address spaces) expected void volatile [noderef] __iomem *addr got void *addr Reported-by: kernel test robot Signed-off-by: Tzung-Bi Shih Reviewed-by: Nicolas Boichat Reviewed-by: Mathieu Poirier --- drivers/remoteproc/mtk_scp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index 577cbd5d421e..8ed89ea1eb78 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -298,7 +298,7 @@ static int mt8183_scp_before_load(struct mtk_scp *scp) return 0; } -static void mt8192_power_on_sram(void *addr) +static void mt8192_power_on_sram(void __iomem *addr) { int i; @@ -307,7 +307,7 @@ static void mt8192_power_on_sram(void *addr) writel(0, addr); } -static void mt8192_power_off_sram(void *addr) +static void mt8192_power_off_sram(void __iomem *addr) { int i; From patchwork Mon Nov 16 08:25:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11907697 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81C71C4742C for ; Mon, 16 Nov 2020 08:26:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 080C820702 for ; Mon, 16 Nov 2020 08:26:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xMylCtFx"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="QOBEhTLv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 080C820702 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xMca3A0PAK+xGn3eHa2F0N6kJ3ILEGmiKwnfeG7UHzU=; b=xMylCtFxkoEIq2BJQ37Ej1OYN 8YDNc8QHJyMVk5hGASQEwNNAE7x1nmBnYfQP/BYpb9Rfau0xVIZsGoPR06typfMNY7NGYldTS+GS1 ehl/bFfnrYVzk3pFv6I5fe70hzB4QZE4TYFdvoVbgytCcdyV4clSzPSqWjifOVeUjLMTVb4+hq9Fh 5BXPK3KuoiHNL7h+wj07a8CcRTveBMnEwXtN7f3Y7nksMhXMaKpW5k0Si+8HlmZ9oJ5lEFTERj2L4 PvIkg9CqnXZv5oheP4rEjx1b4Y3Bs4bogJYdaZLck/ojXlddx04oSknYvTwlCCLeV9zQcxeCn8bAf oVXlTwbHg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keZqE-0007QC-VK; Mon, 16 Nov 2020 08:26:27 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1keZq4-0007NJ-NZ for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2020 08:26:18 +0000 Received: by mail-yb1-xb49.google.com with SMTP id c9so19736991ybs.8 for ; Mon, 16 Nov 2020 00:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=iRKdGUeQKewf5nuXxBX2agP7HYNBW301CirwCFhx4pU=; b=QOBEhTLv6QVv/QjZqTP+H+yyG/6mzw35iNQXRNy1YtY/1cays5xvfiDfdKHvbTTDS+ 2YSyEvQ1HADSKiodkgTxOjX1QQDG/L/gJ5iA9Hz6adaEPpASQUu9DvqifQpNAgE0nU5T PFlgzbIQ6XbOXWAe2kerZkJUBEkmpnLyQ/IFB7WXMy76lv+rK/fasC7cEZd6DmdebDpv S9uV5tIvfjS1zglfg1qhhPaqBfBcIyqFWgO309RdbxgEAR6aj4e4GoSvWVjA7JrnV0Un l8bNzLcVj+e56k+Eq1KzcueJlH62U0gTkqNjKyzsuqyyr4g2L8Ist6sX40HSJZh9IgFE 7Tmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=iRKdGUeQKewf5nuXxBX2agP7HYNBW301CirwCFhx4pU=; b=Xtj+RPNhL6ETrTdGdrjQZF9/LVU15xtU/hQ9lNSuaOC4zTO5Wkg+msOyWEhuwj2gca GHnpfNBxARSQKuInNhBuIuvYbuJEiCfg4yLTxzdlDH9jfAHyRY2REx0GibN1MUiFuXQB 6sBNqygpItq3oQuZxzYNZXNRoYZC2LxepL3Ap/5s/+8araT+2YPn0wPWN3afyeOziObz YcDFp2zGp5QpWdCOydWj66KcXyAXxMUbob7UKI1Ih//g69HAIfIOCxIpQFijQhsUNAcf HJjL9lQcPA8m6RCsrjmXWwH0uy4jGZrKh0bJbqB+3pLfg2N0I6l12uLOx9nE7cdq+B/b YTmw== X-Gm-Message-State: AOAM530Ra6UrS4q55Yz/huw/nw58ut0PodFxApJeMHHmpbMbBheUwUb7 YcYFO/PNWJh8RA1T7tP3d8nc76CpCiAf X-Google-Smtp-Source: ABdhPJw0N0XKpM+KTbbElpvFZIMiwftJ2h8EAOI91tZQq6qWMiAPMPFuFLr/2HlvN0EDQXvVSWUOTPNvIvX4 X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:a25:da0f:: with SMTP id n15mr13910518ybf.481.1605515172335; Mon, 16 Nov 2020 00:26:12 -0800 (PST) Date: Mon, 16 Nov 2020 16:25:37 +0800 In-Reply-To: <20201116082537.3287009-1-tzungbi@google.com> Message-Id: <20201116082537.3287009-3-tzungbi@google.com> Mime-Version: 1.0 References: <20201116082537.3287009-1-tzungbi@google.com> X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free From: Tzung-Bi Shih To: ohad@wizery.com, bjorn.andersson@linaro.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201116_032616_870606_9BCFA0AC X-CRM114-Status: GOOD ( 14.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drinkcat@chromium.org, kernel test robot , tzungbi@google.com, linux-remoteproc@vger.kernel.org, groeck@chromium.org, linux-mediatek@lists.infradead.org, pihsun@chromium.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fixes the following sparse errors on dma_alloc_coherent() and dma_free_coherent(). On drivers/remoteproc/mtk_scp.c:559:23: warning: incorrect type in assignment (different address spaces) expected void [noderef] __iomem *cpu_addr got void * On drivers/remoteproc/mtk_scp.c:572:56: warning: incorrect type in argument 3 (different address spaces) expected void *cpu_addr got void [noderef] __iomem *cpu_addr The cpu_addr is not a __iomem address. Removes the marker. Reported-by: kernel test robot Signed-off-by: Tzung-Bi Shih Reviewed-by: Nicolas Boichat Reviewed-by: Mathieu Poirier --- drivers/remoteproc/mtk_common.h | 2 +- drivers/remoteproc/mtk_scp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h index 47b4561443a9..b3397d327786 100644 --- a/drivers/remoteproc/mtk_common.h +++ b/drivers/remoteproc/mtk_common.h @@ -99,7 +99,7 @@ struct mtk_scp { bool ipi_id_ack[SCP_IPI_MAX]; wait_queue_head_t ack_wq; - void __iomem *cpu_addr; + void *cpu_addr; dma_addr_t dma_addr; size_t dram_size; diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c index 8ed89ea1eb78..a1e23b5f19b9 100644 --- a/drivers/remoteproc/mtk_scp.c +++ b/drivers/remoteproc/mtk_scp.c @@ -413,7 +413,7 @@ static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len) } else if (scp->dram_size) { offset = da - scp->dma_addr; if (offset >= 0 && (offset + len) < scp->dram_size) - return (void __force *)scp->cpu_addr + offset; + return scp->cpu_addr + offset; } return NULL;