From patchwork Sat Dec 5 19:17:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 11953415 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 1B317C433FE for ; Sat, 5 Dec 2020 19:19:50 +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 C32AF23110 for ; Sat, 5 Dec 2020 19:19:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C32AF23110 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=05yCjTy6X+J+SpntGE2PLjlthCsn0tlofo04v+qpv/k=; b=BaZPQcPfpagcK/iG0J26iV5IB 6kmulWme7JFlOibNFBckKjbZYWI4T9sEn43uPCB0crMA5sVpH1xFDcPXxygM3IQ5Ur7lWKq2GF0Xm /YaNDiJvv0I1sIPI9qhS/cx1A6L5XgGc0eGfrn+7l2hsNm+e5tk8R5dda/5t45/x+j1C3vQHndlYi EQj4DuXQuNai2xloVndGwy8qIiRnJksr2hHrWjhDoLFgJFnX/hNSDIbuLH2A1xz55V2c8BdxMG5Fj eF6J1t1afaCkxy+1RKrrCXStrXgEJsE6gYoANs9oPWwvGWkPKSGNNdGMx84+qTwYqF+45pxkY/2j8 rKVDaXPdg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kld4d-00043k-An; Sat, 05 Dec 2020 19:18:27 +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 1kld4Y-00042O-Hv for linux-arm-kernel@lists.infradead.org; Sat, 05 Dec 2020 19:18:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Py0RdWxu21rr5NbcRVJrRwt2BrqRlAa+V4prWoiTXL2I6heaKjE6E+0HDLPSYv8RpGEHJ3i8UdRmv8ZBkJ00nK5suFBeG6kW0G/OwcVcbK2S0ZipyZ2YN8NUyMIJTaXkaMwk/AtgnuqS+VgG1n5VkFO62ph+yj6yLru2H8YiDp49lnxcYkgR+xBzxBO4pcyRsgaC4SQugyX6SXfgeiURCpT7gLQ+LmkeJ9azGEJ9MVFllhg2i5LIkIpH1q0sm9OEDZxicYdpzzWumGihSg91f938Qrv5zGcljY+RYWi6KnHTvIkHygrEU9WpV+0iySjaTX9R40R6I7G9QCyKOZ3y/g== 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=L9pAQ+YkqD8NXspjdVpOzcZ8lBwEd3OxgZUpUgEUfGk=; b=RCqNTPpTt8/c7knjsBmzL0LgzxuWQbQiZjdNtDuQ51KVB1i7hfzlNgGW5LyIvSopuPQgO6u6Ej0Bogvn4QAXjh5MhXgbhV5159I9Dfl0XFLUx08eTTaeLkNOfjdkDMzhRn6bhiyNOzIYABr07vJx64Ij2lvl7XjELyK4hfAPhkMea25SXThsI1ZcSvqGHWqciwOp1LlGhJw91oylUqtkpMYVB82PhLAtrLrIrSjzf+nd3w3lrDIjHB2PBkZUKERT25rz43CipeQv5Z1PAhvVMwJfT3M3yy0CEFYvBN1cpRZZQbbN4+WHalNPeuRV9pHhhsXb/0V9TI3fMXP95BPSEg== 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=L9pAQ+YkqD8NXspjdVpOzcZ8lBwEd3OxgZUpUgEUfGk=; b=OcUUy2W3N22zLQV8ykKz68dNVC4zBJQbkpOYmj/YEAJVFqCpALBNkHXTKZWZzV3qzgkEXvzcsE3gbXOSs1XrZ0ldMbEq7ZCdpCsTFAoDG+cIxoteRoR3iS0bO0p4cN/VM8PYnH+q5dsNTJPb3v4IIXc1FWNi2x9Fyc2uRHn4NXc= 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:20 +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:20 +0000 From: Rasmus Villemoes To: Qiang Zhao , Li Yang Subject: [PATCH 04/20] soc: fsl: qe: make cpm_muram_offset take a const void* argument Date: Sat, 5 Dec 2020 20:17:27 +0100 Message-Id: <20201205191744.7847-5-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: 5ac33b1c-c87a-495a-976c-08d8995286de X-MS-TrafficTypeDiagnostic: AM4PR1001MB1363: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aYQDumrQnT+OF5o9JB47+9HZQRBZfE0kXx4BucBXfm9ZT1ln/lhxa3R1wuaJ3qIhnd1nJYkQVv+icg1JK0abUSHT5/TLyXOaRCcY8EM8yG7FnwMHbEOosiK+fBir9jArk1ay4RujMFAiNIUHfD9/cu99ZHG5lqXbHymBk9bKQS/9F0ELBNVM23otukNgFUPXZJ5TuUTKZxhmy07C7RZkyIC2nEPEdTVDsgeI5c+uHzZdhcjRSMEoqOpUHxNJPHpIevlJHgSHsLeZ5UOyoSEXvjcrXGC3KmXH7d84osKuGP/34WcfANdE5N7omeRFLeu88WVz2FXlgJLRN51PTAhzzw== 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: a84jwIJNlLFA2sQTN5pqEAcPLSCkuM0eBjvlXZ9Uz7zYbEUF9EZ12SfmPzaZ9qqpAcUtRXBqlLtBVWA5Jm94H5sBxFNGabfAQtHIQLNdVLqecJPIccLQ//Ylv9PCsorImlayQnY4Y+EuTNVrbO557pWba4xV2wl5OdW+hClzlPzqGdPXkkmYhOfHZc/6bIHiFr2JsVLcGGI3XrjKp8Vh1ZGZXzcBk9ZyMkN1tItKUqj4T5XrfGsJW8qFPGGMWlmHtogQuzdUsxQOy3cyJ70uDjrPC72zpPj8q+4FovKpeR5h5UZo3wroIpNCARUfuhpPVjrO21TF9vEEnxIgeBCgJ2Dh3UcN2HlO1m9n0mt8q0XKCCNluanKtE+yEj6Rt8OAu1lV0EHFw3rxh+AWei7SVC4kE3BGa/AkK1Me7kqrVckLqgS6qBt3vWTnSJIfpSNvfdew/NGSUUlXEIIrCdZLD9X3NzsmjQktSbR4zU1UFmRdpET4oMYtPBUAeFxdPVLZosQWwiGK1gRoUdbCD73g1SM2wGwRS65yt2T0phQc+loJ3vKMfMj0J5o5H45aWwMdEeASgurANh9G1s+5uqVSMtnrOW7eLkA+9lmFFUvESRuzFN3fCLLRtuxJh9TseTf0XxovpH6taxLZ5tmTZzylKdM3+AOIVqQRwkoxzTkuiZMvW+CHeV5vh6IbAnuVXpLD7noT/phD3ueviylEK5W00Kb9Sh+xUdAQgW3qsMdy7hB7bRZHcvGvWar4wX76yadCFe9fQyrmhankpsqzhyNKOKfTh6kGT59Co+PNopjcGNdeJVoYhSoKotSAipmzXArAgEb1jEv9qTn2vhtTFkGWe/JGdIF/1yR58+ErlKJMZjZN7WRWsCAjwTp7W2+XuZrVOjdPuoV9KRBbuwu1CcKBN3GO+H6DCIihMqv+YdXHb2ahmxgxRAYEZfrFoWEzFyOimXVYb4wNppROAoetS1Bh/azfPEMcejiYzRUW7LPKZ/XXUidTRDXz+9lA5z477TAU X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 5ac33b1c-c87a-495a-976c-08d8995286de 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:20.3457 (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: tFOV25s5V8wGIlmsFgcgnE5fViDG5SXa8O8wI3MbkwaeJVpC5k2o5bEsC1kmlP5mykIW0v306lBL8Kra1H+gVsWtyO5rKlVBG4K1rTBeklw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR1001MB1363 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201205_141822_712212_9E55840F X-CRM114-Status: UNSURE ( 9.81 ) 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 Allow passing const-qualified pointers without requiring a cast in the caller. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_common.c | 2 +- include/soc/fsl/qe/qe.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c index 75075591f630..0fbdc965c4cb 100644 --- a/drivers/soc/fsl/qe/qe_common.c +++ b/drivers/soc/fsl/qe/qe_common.c @@ -223,7 +223,7 @@ void __iomem *cpm_muram_addr(unsigned long offset) } EXPORT_SYMBOL(cpm_muram_addr); -unsigned long cpm_muram_offset(void __iomem *addr) +unsigned long cpm_muram_offset(const void __iomem *addr) { return addr - (void __iomem *)muram_vbase; } diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h index 3feddfec9f87..8ee3747433c0 100644 --- a/include/soc/fsl/qe/qe.h +++ b/include/soc/fsl/qe/qe.h @@ -102,7 +102,7 @@ s32 cpm_muram_alloc(unsigned long size, unsigned long align); void cpm_muram_free(s32 offset); s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size); void __iomem *cpm_muram_addr(unsigned long offset); -unsigned long cpm_muram_offset(void __iomem *addr); +unsigned long cpm_muram_offset(const void __iomem *addr); dma_addr_t cpm_muram_dma(void __iomem *addr); #else static inline s32 cpm_muram_alloc(unsigned long size, @@ -126,7 +126,7 @@ static inline void __iomem *cpm_muram_addr(unsigned long offset) return NULL; } -static inline unsigned long cpm_muram_offset(void __iomem *addr) +static inline unsigned long cpm_muram_offset(const void __iomem *addr) { return -ENOSYS; }