From patchwork Sat Dec 5 19:17:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 11953413 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=-16.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 80BC3C4361A for ; Sat, 5 Dec 2020 19:19:47 +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 3F5FB23110 for ; Sat, 5 Dec 2020 19:19:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F5FB23110 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=prevas.dk 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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=j8FjnyyFkEw07mXo83hyN/lKLl0cgyZvxJxEZEHCxMg=; b=rjcL/obQfhUkhIJWX3thY8py2 6zWHIVUXm3wgWsAxDPxiNVcvaKKLtwNVNKsHZy/I4xiQI3gHMeSEdVfdzGGfBeCg15fNhzTWbR619 Q0oerKHtq+UBDe49kM9JSZ8Bnd1jNRYnKbb/TXKGy4EUj7m6JMeSHu/EgQnSLflmIIpkrxtG3U2Kt Ms8jnorkjvbwuPyVbDIM7ZydMg1ScXDIe+xfL4+lBJt6HpbJPhGF7p7GFNDRTeTFZ/LeHNYzgAlQV TsSlNJxs0Tbad206P82gWH4OyiVuTaV2Mvy8HvWM2Qz5KzGEmDuh9Xk8rSGrgAktEcu5ff3KIpAs0 IjMBq6nPA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kld4g-00043z-32; Sat, 05 Dec 2020 19:18:30 +0000 Received: from mail-am6eur05on2132.outbound.protection.outlook.com ([40.107.22.132] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kld4Z-00042O-Rb for linux-arm-kernel@lists.infradead.org; Sat, 05 Dec 2020 19:18:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dVg/OPtMnqDfTgwEVDTlvHAgaV0ZAFDJNL/wDn4ttVBp1OzPwZzIC2JrR66KwqQEvjx88Sfjvzd6oSpmw78JAJwKHYJHDXSBBxi3kxlZr5TTA+AqPQjN2YP+MiQnPVHuRt3QjB8/Q8i2nMOo8itcyWmK2nx/U385Nljr6HZbValMq7nUclhRNop0CzOukYNjoKjz1CxD44Dxv6oZoMRZV23FSkXIxDlJqAQgBP7qwje8DW2S63cXtacflGfz5sQ324TuCLjheHI8IIVlt/u1pekj/DRjXwMxAhjLCHDaZsU/BN7agXRwe6jAulSa/6gSgHj+OOvXuBuuI9y426ml2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hD3p33cq2Q/qHWFYl7dyPaDVPwth76FWgEjkXuOOk2k=; b=E6kz3Zy19HuMOsUbCNhiJ94nLWtt8RdLdFSZrJCv0WteqWeKO1nelDaL1gFm8TItmPKeNVfWIz2jKJ32P62HG88ey/yfTpImvQe/Minp1+j4gMwa9rVfIPyH4/qU1999fgHyGMTynm4dgFZiuQqJbDYJZu39iLhv+oRowMsUtsF0LbarEeJmUFwDj+51esMHLgzKqvH7+rbT4Z5EUZ9xZiJI81R24bu+jTKrG/UMkvGt25Os6qPNZiJeepi91tqhC+koZQnYsiHDUNoL6Yy8KrLRzogfmIEKbcvfBE8p5SI3G8f00sCAuzJv7axNx8sTq4seMAZTyIXra0cdDGD5rg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hD3p33cq2Q/qHWFYl7dyPaDVPwth76FWgEjkXuOOk2k=; b=HT8ffAt3Ay12LAz0u4GGleeMOyEmplnHZocGeL+7m6hRs5uF8mhFPpSnCN0yiPXQJN31VrVgEeWJ/xXcck9WJbZYG/nZf5/iFr+ec+UPHQgsHfP+cXHLo+FklsZVYU1jDhkkiJ5jgHpW5KBDxl4624sfhFN54ylWs3MjDY4G11g= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=prevas.dk; Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) by AM4PR1001MB1363.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:200:99::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.19; Sat, 5 Dec 2020 19:18:21 +0000 Received: from AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::9068:c899:48f:a8e3]) by AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM ([fe80::9068:c899:48f:a8e3%6]) with mapi id 15.20.3632.021; Sat, 5 Dec 2020 19:18:21 +0000 From: Rasmus Villemoes To: Qiang Zhao , Li Yang Subject: [PATCH 05/20] soc: fsl: qe: store muram_vbase as a void pointer instead of u8 Date: Sat, 5 Dec 2020 20:17:28 +0100 Message-Id: <20201205191744.7847-6-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201205191744.7847-1-rasmus.villemoes@prevas.dk> References: <20201205191744.7847-1-rasmus.villemoes@prevas.dk> X-Originating-IP: [5.186.115.188] X-ClientProxiedBy: AM5PR0701CA0063.eurprd07.prod.outlook.com (2603:10a6:203:2::25) To AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:3f::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (5.186.115.188) by AM5PR0701CA0063.eurprd07.prod.outlook.com (2603:10a6:203:2::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.5 via Frontend Transport; Sat, 5 Dec 2020 19:18:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1121de58-b2c9-4ddf-8a30-08d89952875e X-MS-TrafficTypeDiagnostic: AM4PR1001MB1363: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7S+yvHFOXe8CLDzlH1DjO5GCwol/bLOxJqOPDeEV0FCZJdd2GsGFtH5EuAY8eqqqX2D5THRXVGGFycwTbrj+ZUpg7vM5FImB3b8HGL6VIakl9QTetDlSD48IjFTLAUTuI5XtEGaKZv82ACqQwGpzc6gWthvdoLRz6F+A4T5pGSoPvOYiDos3Wnz62YqnZWIDwbxXMa2mNsitBD4Y/IV1zPd8bH9UQ8+2SRuSDRLS74WeQApeDW8hCPg7COdSnJYcCVDdxGO2kBtomg+39262vYLQnNXzRjIKkda1aW7M6nrmmDFEYbFdj9WM/GUQvTkvzONdtgTRkvU2gHeqGCQKnw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(396003)(39840400004)(346002)(136003)(366004)(376002)(2616005)(2906002)(8676002)(8936002)(83380400001)(52116002)(36756003)(66476007)(66946007)(66556008)(4326008)(8976002)(5660300002)(1076003)(6486002)(44832011)(6512007)(186003)(26005)(110136005)(316002)(86362001)(478600001)(16526019)(54906003)(956004)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: FQ4P38eHL60L3b62IsOr2JpT1fMjnyvNBjzKSa2CObinkIywVXPJaGI7+5rygkNjkxPxyQlUFzRF/PZiKsiAoC5IMf8bC4DW2QaCrB6JuWnfcBzPnZ2T4pXYDWaDjFSE+n1KxmmkgAeCK4Xape4zZU2n5ahjWeTHLpcQJggxvGK+luQuFzVY0+IKz8u0HFF3GSpwQKYTgYmsGpRL/4Ww6B+Vzl6OO2n26mt/w4Xr694nGc4cBxKLGmkyIsa3NgO8529GpOG3SzgJkgCH/RpdeSJcnj4iX9wdS4FMoeLd/qNFsDocRId8gId1lVc46g5xlfVp2FGD8EWHtF2X6EJ4UBPVbJYyrDsmmoi5bN9aEMiOwjRavSCJzgzTD+F+V+5/7oKBmnKm2TUjz+EhuE3mgu1huIO1KI2jFA+ehRJzJ+D73JgIfRLVRORbiC2YgmB+4jzJ9iXu7q0olwSu9pcEIAGVgzgI/euDjfp1Pb/jicI/ATZGYUGmFiUgFcLnp7QgHfQDDC+6KmJrRQnQacknJws9sVsNmlV22NUoR/j1FKhEdF/k6lq4YeekMOqus/vAsN78HIcA36ywwRhwsUAsUEK5atHvC2j7JNz6Pvwx/1kNYVEReJPbobzBHUgjN/i5MaoYcrNxKepSqxhE4YodzLyY6YL81AhkWuXXGWmHR8CU3nnP2URqdGsIjYnFmelA0cxvpbDBSPqoP0GevzU0+BO0NV6LRuTSViMR9WKq6dkuSd/89HGHS7RUDzrrCmkMFCfhNXDttu1ND/uIpwEqO4VktfM4VTdIyhBqIDLOuIEVgDzRogQL1J2CBxPThjxGiGtkA0+LQ6CMf8yDbbz9vFUCChnsV9gMwanHack9kndNUriHll1fU1hkCAIsieCNZyo272JdkVzHAc1zUYxkr22HMItfgZQfnbYYuRUm9A4/H3uwFAuCU4FXl3q4PtO1u/kaxBTk3q2UuyVSvUiHdYKSGwp6AUH9X3yz9+sZXnXedx5WvbPPlkRdwdzF4i9K X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 1121de58-b2c9-4ddf-8a30-08d89952875e X-MS-Exchange-CrossTenant-AuthSource: AM0PR10MB1874.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2020 19:18:21.1882 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ka26JN6H28u3Vkn41HV63GNA0YjSP3uoijgPSUNjHFugy+4cOyVStpdWP0qLE+sqtqd/liTtGnAp4gyMq+gv89b8cIfVhBZmZZ4AJHvFKOg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR1001MB1363 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201205_141823_900775_ED98434A X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. 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: Vladimir Oltean , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rasmus Villemoes Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The two functions cpm_muram_offset() and cpm_muram_dma() both need a cast currently, one casts muram_vbase to do the pointer arithmetic on void pointers, the other casts the the passed-in address u8*. It's simpler and more consistent to just always use void* and drop all the casting. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c index 0fbdc965c4cb..303cc2f5eb4a 100644 --- a/drivers/soc/fsl/qe/qe_common.c +++ b/drivers/soc/fsl/qe/qe_common.c @@ -27,7 +27,7 @@ static struct gen_pool *muram_pool; static spinlock_t cpm_muram_lock; -static u8 __iomem *muram_vbase; +static void __iomem *muram_vbase; static phys_addr_t muram_pbase; struct muram_block { @@ -225,7 +225,7 @@ EXPORT_SYMBOL(cpm_muram_addr); unsigned long cpm_muram_offset(const void __iomem *addr) { - return addr - (void __iomem *)muram_vbase; + return addr - muram_vbase; } EXPORT_SYMBOL(cpm_muram_offset); @@ -235,6 +235,6 @@ EXPORT_SYMBOL(cpm_muram_offset); */ dma_addr_t cpm_muram_dma(void __iomem *addr) { - return muram_pbase + ((u8 __iomem *)addr - muram_vbase); + return muram_pbase + (addr - muram_vbase); } EXPORT_SYMBOL(cpm_muram_dma);