From patchwork Fri Jul 7 19:00:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 700394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42925EB64D9 for ; Fri, 7 Jul 2023 19:01:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232808AbjGGTBC (ORCPT ); Fri, 7 Jul 2023 15:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232782AbjGGTA4 (ORCPT ); Fri, 7 Jul 2023 15:00:56 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2051.outbound.protection.outlook.com [40.107.8.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27F8A124; Fri, 7 Jul 2023 12:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=On8AGiHRlx6GIqzTMzO7Ld/iZuPt7VCwt26m3gLIQFmCfAnV3tSI7MJZR9MyRta7a4xFFcnIfh2Kh1GHiA1ZAF2hrthVGXQ/ofEj23q7u2IAZpBWejn5v2dENimpUFipd4QYpfwggebkfhKyjnX2J9HBdiNom/PNc/4J/akahzCVpSQTkhIJQDKP0Lx8etXhwUdDNU+e1ztPSVqxhF0qZG1IramlnbiyENhNl5H+SzWGLcCauLv8BUf8b6mwDYcgrBqYoXpkSL5hPReJx8Yie5o0hYMwZQipC17c84CnFVQ5xeo68889Mzx6KlE6WgecRZ2NtwVcgVIapLbJ7/DYRw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hZk1c8k1FJIoPWbylqW5yBsHWcRGzoOxvUatOi3Yo/Y=; b=mnQn4x7uBFcJ0ujq4YLF6a5lHdvbvEa8/TIE8WzYd4kOE9iecjjCVIxvBrAvBxPJeHnCeeY8lhUotpUq97lf/pbXWNxDao7ZQIZMJWXiFeWBOEyUHZdj2ueWwmUj6qf/SLIx0yTqgkFWUp4Sc0EDaqNPYlvNp2UgUN/zeA9UNjYeyr10ixHb3+ATRm3560QHHaLF9Xd2d/Tbc2bCArGY0Ii4aG4FPY8rjKRb15ZAtJPlNcJT40Lt1qcr8y01bcJMi/GLHOcn0aTfWPR8aXRw/XwgHM4rUQRmRxbFNb3p4xtQ2UINMBf6VdS4eua26lAnhtq7Xid9sYUoZcYz3+Nneg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hZk1c8k1FJIoPWbylqW5yBsHWcRGzoOxvUatOi3Yo/Y=; b=bPQcZyJa9/DWVRpZNsBPR+1Ycmi8vljql3d+xQdxcRcrFndJWlDM9voEzCvzYnc2o7tFB0rP4CmeJ7KOrlUgMcQ8meRNBLziEYheYnBx3WdyCCUPV/1nJYPYs7Js3i3wle0qyNFuWxDWeK2J8xM3xwpywP+X1Sr/ruqjY0gF1dE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AS8PR04MB8103.eurprd04.prod.outlook.com (2603:10a6:20b:3b3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.26; Fri, 7 Jul 2023 19:00:53 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6565.016; Fri, 7 Jul 2023 19:00:53 +0000 From: Frank Li To: frank.li@nxp.com, vkoul@kernel.org Cc: devicetree@vger.kernel.org, dmaengine@vger.kernel.org, imx@lists.linux.dev, joy.zou@nxp.com, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, robh+dt@kernel.org, shenwei.wang@nxp.com Subject: [PATCH v10 02/12] dmaengine: fsl-edma: clean up EXPORT_SYMBOL_GPL in fsl-edma-common.c Date: Fri, 7 Jul 2023 15:00:19 -0400 Message-Id: <20230707190029.476005-3-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230707190029.476005-1-Frank.Li@nxp.com> References: <20230707190029.476005-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR11CA0067.namprd11.prod.outlook.com (2603:10b6:a03:80::44) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AS8PR04MB8103:EE_ X-MS-Office365-Filtering-Correlation-Id: 632fa99b-6bb2-4c8c-f736-08db7f1c7d00 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Mv5gw1/rBT9/o65nud/H1eOfIa5C2fo9D4QYXcwybLVPvcgGcuMEQQRRZ0XgvtRYqRmAmExcbJrCyhjxN22TrW54JBZUampVc1iaVNztyjLzmU1CTdGyJSxqp0lNPCXviSqDwkxcXxG/LG0nBTqB+otu+MBaPCCH2y4gNupPds2PgjfQXpeIkXZYTp8PczjYZBknUwwWyavzIPjB7bBAChwatrqALtFRs1rUANOWLCe9+hLa/c7149Ajg/rB2lAcD3CdHYG8Bp53SlMXfwre0rLq4ARWCF9IuU8uFRXMYrejDU5PLuuXu0iV3eLYs/Gi/VCc/4NtYFtwLvJs3LgcWVPjoLt7XF6oy2eRc4VsgtaSWjQVvr713qGDnawsWLK6t375TF5fy4piu2dNLEvnolvytNl1kSE5fmhAT51K8HsNvspPTYdBg67HJeM0zG0igwes0SyTdueAp9dJd77FPbuutWHEOkdhOEjOG5NbMD65NJkxi2MqGo0ORzV7ma21sj2GlY5r+9k0VuyUPNndbkxJBW7IZrwSx6AxiY7vOoNcRJppObFn5uPLeLxI6FRkCIhWqN9mfkPfLkLzjOrhVeF084Axh6dlYXVcrpq2S0dwCllUA2iD/vx+QRy0KIpc X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(396003)(366004)(39860400002)(376002)(136003)(451199021)(478600001)(52116002)(6486002)(6666004)(6506007)(1076003)(26005)(6512007)(2906002)(186003)(41300700001)(316002)(4326008)(66946007)(8936002)(8676002)(5660300002)(38100700002)(38350700002)(66556008)(66476007)(86362001)(36756003)(2616005)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JgwZS4+7gfZrROWaTSv1U7v1J3qU2yRQHHILYdcbpXR7lCRsjQIR1W/ncy75BH2zcUI0l0uGZc120ISfdvrydm/CVR1BOmgPAI/jRQBntiCL9xSoK43mRU1l8kO3S2rYNBIDMgN5iZRHOVTtTOCKNcw8IMbYbWnl3HCNYDFKE1jIL2tRPg1LYWCoMiEgpudBQmKf/itgf9A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xv3Jb5TRskmzcW/3eEwiYvHpPx6313exe6TLK0F6bcFHIiwq8nhcsJqWUV7wkDLXjDKet17V5UeNjXoCKIerccol8rAJeyjOUi3LyW4CoUX56qIaWjZnaCXLbhacRhhAI1IUNGeCuMA73nzjvpOIEHyIVgf9jpW6OEGkalCGH7ZdgwK/ru2D8ZeeFrrLegn/TzFuvG6+4DfL9YwMev9rS6hzBlMSElbNTvlwt+R14D7PBsGQODIqRhgrNf/HO/KH3bEFl/XvAAXQlNSWBb76EVGBPYMLhuWxUL+KyqbXJZsAWhoq8A= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 632fa99b-6bb2-4c8c-f736-08db7f1c7d00 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2023 19:00:53.7702 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yLCLfItIB0tYfzd27w//asmqF0pA4+A/4AcxVyBCRWQyhs0On7oFd/HVNXF3wlHwxlZ6XNslvtOxoedPlv3opw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8103 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Exported functions in fsl-edma-common.c are only used within fsl-edma.c and mcf-edma.c. Global export is unnecessary. This commit removes all EXPORT_SYMBOL_GPL in fsl-edma-common.c, and renames fsl-edma.c and mcf-edma.c to maintain the same final module names as before, thereby simplifying the codebase. Signed-off-by: Frank Li Reviewed-by: Peng Fan --- drivers/dma/Makefile | 6 ++++-- drivers/dma/fsl-edma-common.c | 17 ----------------- drivers/dma/{fsl-edma.c => fsl-edma-main.c} | 0 drivers/dma/{mcf-edma.c => mcf-edma-main.c} | 0 4 files changed, 4 insertions(+), 19 deletions(-) rename drivers/dma/{fsl-edma.c => fsl-edma-main.c} (100%) rename drivers/dma/{mcf-edma.c => mcf-edma-main.c} (100%) diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index a4fd1ce29510..7f3d62c9dee2 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -32,8 +32,10 @@ obj-$(CONFIG_DW_DMAC_CORE) += dw/ obj-$(CONFIG_DW_EDMA) += dw-edma/ obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o obj-$(CONFIG_FSL_DMA) += fsldma.o -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o -obj-$(CONFIG_MCF_EDMA) += mcf-edma.o fsl-edma-common.o +fsl-edma-objs := fsl-edma-main.o fsl-edma-common.o +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o +mcf-edma-objs := mcf-edma-main.o fsl-edma-common.o +obj-$(CONFIG_MCF_EDMA) += mcf-edma.o obj-$(CONFIG_FSL_QDMA) += fsl-qdma.o obj-$(CONFIG_FSL_RAID) += fsl_raid.o obj-$(CONFIG_HISI_DMA) += hisi_dma.o diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index a06a1575a2a5..89b0d09c13ff 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -75,7 +75,6 @@ void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan) iowrite8(EDMA_CEEI_CEEI(ch), regs->ceei); } } -EXPORT_SYMBOL_GPL(fsl_edma_disable_request); static void mux_configure8(struct fsl_edma_chan *fsl_chan, void __iomem *addr, u32 off, u32 slot, bool enable) @@ -126,7 +125,6 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan, else mux_configure8(fsl_chan, muxaddr, ch_off, slot, enable); } -EXPORT_SYMBOL_GPL(fsl_edma_chan_mux); static unsigned int fsl_edma_get_tcd_attr(enum dma_slave_buswidth addr_width) { @@ -155,7 +153,6 @@ void fsl_edma_free_desc(struct virt_dma_desc *vdesc) fsl_desc->tcd[i].ptcd); kfree(fsl_desc); } -EXPORT_SYMBOL_GPL(fsl_edma_free_desc); int fsl_edma_terminate_all(struct dma_chan *chan) { @@ -172,7 +169,6 @@ int fsl_edma_terminate_all(struct dma_chan *chan) vchan_dma_desc_free_list(&fsl_chan->vchan, &head); return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_terminate_all); int fsl_edma_pause(struct dma_chan *chan) { @@ -188,7 +184,6 @@ int fsl_edma_pause(struct dma_chan *chan) spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_pause); int fsl_edma_resume(struct dma_chan *chan) { @@ -204,7 +199,6 @@ int fsl_edma_resume(struct dma_chan *chan) spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_resume); static void fsl_edma_unprep_slave_dma(struct fsl_edma_chan *fsl_chan) { @@ -265,7 +259,6 @@ int fsl_edma_slave_config(struct dma_chan *chan, return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_slave_config); static size_t fsl_edma_desc_residue(struct fsl_edma_chan *fsl_chan, struct virt_dma_desc *vdesc, bool in_progress) @@ -340,7 +333,6 @@ enum dma_status fsl_edma_tx_status(struct dma_chan *chan, return fsl_chan->status; } -EXPORT_SYMBOL_GPL(fsl_edma_tx_status); static void fsl_edma_set_tcd_regs(struct fsl_edma_chan *fsl_chan, struct fsl_edma_hw_tcd *tcd) @@ -520,7 +512,6 @@ struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( return vchan_tx_prep(&fsl_chan->vchan, &fsl_desc->vdesc, flags); } -EXPORT_SYMBOL_GPL(fsl_edma_prep_dma_cyclic); struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( struct dma_chan *chan, struct scatterlist *sgl, @@ -589,7 +580,6 @@ struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( return vchan_tx_prep(&fsl_chan->vchan, &fsl_desc->vdesc, flags); } -EXPORT_SYMBOL_GPL(fsl_edma_prep_slave_sg); struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan, dma_addr_t dma_dst, dma_addr_t dma_src, @@ -612,7 +602,6 @@ struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan, return vchan_tx_prep(&fsl_chan->vchan, &fsl_desc->vdesc, flags); } -EXPORT_SYMBOL_GPL(fsl_edma_prep_memcpy); void fsl_edma_xfer_desc(struct fsl_edma_chan *fsl_chan) { @@ -629,7 +618,6 @@ void fsl_edma_xfer_desc(struct fsl_edma_chan *fsl_chan) fsl_chan->status = DMA_IN_PROGRESS; fsl_chan->idle = false; } -EXPORT_SYMBOL_GPL(fsl_edma_xfer_desc); void fsl_edma_issue_pending(struct dma_chan *chan) { @@ -649,7 +637,6 @@ void fsl_edma_issue_pending(struct dma_chan *chan) spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); } -EXPORT_SYMBOL_GPL(fsl_edma_issue_pending); int fsl_edma_alloc_chan_resources(struct dma_chan *chan) { @@ -660,7 +647,6 @@ int fsl_edma_alloc_chan_resources(struct dma_chan *chan) 32, 0); return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_alloc_chan_resources); void fsl_edma_free_chan_resources(struct dma_chan *chan) { @@ -683,7 +669,6 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan) fsl_chan->tcd_pool = NULL; fsl_chan->is_sw = false; } -EXPORT_SYMBOL_GPL(fsl_edma_free_chan_resources); void fsl_edma_cleanup_vchan(struct dma_device *dmadev) { @@ -695,7 +680,6 @@ void fsl_edma_cleanup_vchan(struct dma_device *dmadev) tasklet_kill(&chan->vchan.task); } } -EXPORT_SYMBOL_GPL(fsl_edma_cleanup_vchan); /* * On the 32 channels Vybrid/mpc577x edma version (here called "v1"), @@ -743,6 +727,5 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) edma->regs.tcd = edma->membase + EDMA_TCD; } -EXPORT_SYMBOL_GPL(fsl_edma_setup_regs); MODULE_LICENSE("GPL v2"); diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma-main.c similarity index 100% rename from drivers/dma/fsl-edma.c rename to drivers/dma/fsl-edma-main.c diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma-main.c similarity index 100% rename from drivers/dma/mcf-edma.c rename to drivers/dma/mcf-edma-main.c