Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1036436lqj; Mon, 3 Jun 2024 08:23:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVr1BS4Zmj+VAR/g75MvBLcPku0eVwA8SOFsgbSj3HmrgmwPtZf+RNZs/WSXI/kvwOCKKaxBdHBuP/y558140ovmwAnxnwqGy0vKtaqsQ== X-Google-Smtp-Source: AGHT+IGJV1C+suJWlXzNBWMc0fksn1yzaBGCiMHbsJi99hoUw6ROBEw85LVtqmfaukDFDyPZUH7S X-Received: by 2002:a17:902:f682:b0:1f6:5fb6:c993 with SMTP id d9443c01a7336-1f65fb6cc40mr60295495ad.14.1717428232049; Mon, 03 Jun 2024 08:23:52 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f6751b1157si23265185ad.350.2024.06.03.08.23.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 08:23:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199357-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=SZc1LeD7; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-199357-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1806B2839FD for ; Mon, 3 Jun 2024 15:23:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9EFB130E40; Mon, 3 Jun 2024 15:23:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="SZc1LeD7" Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2053.outbound.protection.outlook.com [40.107.13.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 978DD12FF8B; Mon, 3 Jun 2024 15:23:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.13.53 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717428217; cv=fail; b=i3RZF3wpuUBwTU6fmFoh0WsmlBwbyRuD/Ynvb5hI/8jQy0JEleJTa1XMHTzIwlLth5jrRqFeYVazbBwkWHUx8b6DcY2e5fI/Dv0L9uiX4lR+ncGXPq9gppSDRU/pYCZOHQI+NMVIa83guPyJr+lnfujF7/q5Nw5lwUZItyStvqQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717428217; c=relaxed/simple; bh=3Iplv631NWl55AVG49oXrkiGJT/8mska1/a5dTVLp0o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=uzDQbQCdBwgQECa8vkhdJI0KG8gr3gm6IUiX9j69t1rx3hNy8giVEGDvnu2fMYHAHeSCnaN/mL6195NNkaNMOl8nhBCvBGqgvbSWkkhes1I33JT3A2zvK/T06lXRoF7xAm/WayPPPuJA234+cr0C50luQnjFOPdds7JSKuxUX80= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=SZc1LeD7; arc=fail smtp.client-ip=40.107.13.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZKNzyRnXejRJr3GJGYV9hav0FBxxwnba0f55cwKYjyDZ9xN6iP0SLY9FleCzw80Oz8UQvQf7+OYKe4169LhDdh9heFkOLN2HLOYzXZRt/u7rBZpTCF+N7l9UxsJdwmRusPfDK5+Imoo1k/dincJWSrNpyNN/DdflvdjjiikDK0aTLUlpZkgjQfcS0QkbjKNGgq+9LI476xg4aWBLr0cVyLP4wxCqVWueJLGG7snQLs9yj8ZE3NCnvCIJ6VrIyAqSVJQc158bWRG5WmJ3D6W5ave0wh3oPLD7lxYRJlXFPUVctTpXAEWU4sRpwXmyTGS4kmw6T1CRLOgAZAxsmVZiwg== 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=Ro8mhtjonCwWBYscZA88GaoXM8W8XvWKbYlgOdmek74=; b=QlsRb7J8u/gW2DZ1pOeIL8cQcy5d3bpYiBjRXZwEl4gzDn+9K8cDGST3xnyqvD3eX9NqjMAmr0c1DWlFSp+fXex1k+/Mc2UVPH4HNbMHz2yCTfimqujfdYkJ9KP96ZaCtmzGx11PES1A88a2Idb1JhnDuBjivzLwZ+VOyFi7pUJXev/CX9VKAdbOIhqO2X1HP1r3HtTCNXgRpZsvz62Hqf+HaeaNlpYTM50+sTK1tDDmR3hJw6QVcOiHUSwQkkBpnJk80D4KwsnHmPCO5d5lcqFR0jupTZKfptrR4w3XyLnayuRoiO+DmvabXsfasB8KP7k9gpCWXMwg91k8q5UNHA== 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=Ro8mhtjonCwWBYscZA88GaoXM8W8XvWKbYlgOdmek74=; b=SZc1LeD7GQ0AxSPOYZc1ZtBHEMVdg66nrAdWkKbOqtffuU055/fKLtUBOIlsovSyUO5uV0qsZ1Rf0QQtYIspUkSX4T9AP1qmjfaaflCKgo8aqmQF322vx/Nt41hR1PYMuC69cSWiWAtOakTfAbke1KA/sOPFY+b+PUyiRcaw6aU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS4PR04MB9243.eurprd04.prod.outlook.com (2603:10a6:20b:4e2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Mon, 3 Jun 2024 15:23:30 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7633.021; Mon, 3 Jun 2024 15:23:30 +0000 From: Frank Li To: Vinod Koul , imx@lists.linux.dev (open list:FREESCALE eDMA DRIVER), dmaengine@vger.kernel.org (open list:FREESCALE eDMA DRIVER), linux-kernel@vger.kernel.org (open list) Cc: imx@lists.linux.dev Subject: [PATCH v2 2/2] dmaengine: fsl-edma: remove redundant "idle" field from fsl_chan Date: Mon, 3 Jun 2024 11:23:16 -0400 Message-Id: <20240603152317.69917-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240603152317.69917-1-Frank.Li@nxp.com> References: <20240603152317.69917-1-Frank.Li@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY5PR17CA0047.namprd17.prod.outlook.com (2603:10b6:a03:167::24) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS4PR04MB9243:EE_ X-MS-Office365-Filtering-Correlation-Id: 33bec09a-a198-4d57-15d3-08dc83e11ffb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|52116005|1800799015|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?iiY3DCtHfnlWCIRW4g96TX0Q5Er6gRIcelPyaWn/5LA9mQHk6epkjJUBZkg2?= =?us-ascii?Q?vfZq4t8yprpfppLk4B+brQkhwkTdRUPma9yWFohaYGeK8LW5U54s+btwUyxa?= =?us-ascii?Q?J5S1U5u2IeMHy8G8qBtDNhhh9b7FB564PG/4IE+87BrRPGYwSiydLnHUs0kW?= =?us-ascii?Q?+UA1hnwLwMCcqlpUB777FliPP6vst9q6cEk+NJVqxYGiN5x1CbqcvI+Sh5n9?= =?us-ascii?Q?aHdZH0Y07uKOhQIHC+cS9b0euVtUVopJwstF0RRelsjHVAorY7ThKRTX/cBG?= =?us-ascii?Q?0uGW7Aeejgi5Lboc9abXG9YPMNhSyaV5v/iRz/fDmhu45PXufz10DjvbZJdW?= =?us-ascii?Q?5pzeoR27LkoPmDa9T3erNm+kBBshWdpljuTfNk7pVww8Fi5K2ka6qUF6FN0I?= =?us-ascii?Q?lmkvanRW16dqgdf6wU2Lrtma87yYAU88TlRpSqQLKuq1xXTC98ly2clClbyT?= =?us-ascii?Q?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i/pQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(52116005)(1800799015)(366007)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?jOqNb8Uk44LaxlZJ7esR4o005aPQJV9AksCcUEghqwtPLtIop+HmEZZ4gjH3?= =?us-ascii?Q?n9cvZlVgkAZkVIa2n49Amz/Tx8aAbvv1hcN1w+zAHYRZkiAQ8bR6FhwLeV40?= =?us-ascii?Q?grBYSxFU2NU+K+2bSh0NOOIQR68DJpypUQlZjqOIOhYOhks8T+VRc4nIgwZ5?= =?us-ascii?Q?RfNWM8aVRpg/qi9zH8pZ/AAbwhoJ1wZOJ1lMNVvFpRScAk9eHdFvi75UzPYA?= =?us-ascii?Q?1AAISzOCzRpHMN7v33agyyIpvK81RwrIGqFkr8mqwoXVjKzfUYRwJtWzZ7iv?= =?us-ascii?Q?yNr6xlo4ldzHmV9vD+nZ1d3tocjvVvOhXWK8R1yfhQ6qw3XxY3uEZVhTV1SH?= =?us-ascii?Q?OZZcqM/GoI208/8yPqXOuJ03+4yodbX45jPpklg1VjaKfg65yBu8vdD9wMbp?= =?us-ascii?Q?qxROAVYWuKaqx2HEbyyQFaLWj0lyEB8k5OzfrzCzk40TfroyvYAgErZgphzk?= =?us-ascii?Q?c29tO+9EoeBYLcfvc93Q939bvB96ctWxS4aX3mqIkCnMZkGlFO+GdjdEElLx?= =?us-ascii?Q?cqub/qGD9rkfUz33TgmEGCpbOVMir5TB+OVIxlJMvLN1bSUReiZcAIloOYQw?= =?us-ascii?Q?IOii8VOMVZjovCcNFwqa+e9mCtPjxBLEFQgk9znf0thv1CW/2PslbQHAFACc?= =?us-ascii?Q?7QoixeWYPESwTM6kBU60nN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7/kbsTSHQjqsU0qQ5ZCTs4b66D82FKQvD?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33bec09a-a198-4d57-15d3-08dc83e11ffb X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2024 15:23:30.8382 (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: 1tfmqG6PXWkaKeSe4wWpWfOCRVd2SUMCNUKYUUv0DowveQcgp9+U6HiZShfd3wE9iGSay3g7CEbmPN5BKLHSeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9243 The 'idle' in fsl_chan is redundant as it's equivalent to 'status != DMA_IN_PROGRESS'. So remote it to simple code logic. Signed-off-by: Frank Li --- Notes: Change from v1 to v2 Remove "idle" at mcf-edma-main.c also to build error found by | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202406011344.s3sPp61I-lkp@intel.com/ drivers/dma/fsl-edma-common.c | 6 +----- drivers/dma/fsl-edma-common.h | 2 -- drivers/dma/fsl-edma-main.c | 3 +-- drivers/dma/mcf-edma-main.c | 2 -- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index 91a4c11b7cbfd..e31dcc127708d 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -59,7 +59,6 @@ void fsl_edma_tx_chan_handler(struct fsl_edma_chan *fsl_chan) vchan_cookie_complete(&fsl_chan->edesc->vdesc); fsl_chan->edesc = NULL; fsl_chan->status = DMA_COMPLETE; - fsl_chan->idle = true; } else { vchan_cyclic_callback(&fsl_chan->edesc->vdesc); } @@ -239,7 +238,7 @@ int fsl_edma_terminate_all(struct dma_chan *chan) spin_lock_irqsave(&fsl_chan->vchan.lock, flags); fsl_edma_disable_request(fsl_chan); fsl_chan->edesc = NULL; - fsl_chan->idle = true; + fsl_chan->status = DMA_COMPLETE; vchan_get_all_descriptors(&fsl_chan->vchan, &head); spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); vchan_dma_desc_free_list(&fsl_chan->vchan, &head); @@ -259,7 +258,6 @@ int fsl_edma_pause(struct dma_chan *chan) if (fsl_chan->edesc) { fsl_edma_disable_request(fsl_chan); fsl_chan->status = DMA_PAUSED; - fsl_chan->idle = true; } spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); return 0; @@ -274,7 +272,6 @@ int fsl_edma_resume(struct dma_chan *chan) if (fsl_chan->edesc) { fsl_edma_enable_request(fsl_chan); fsl_chan->status = DMA_IN_PROGRESS; - fsl_chan->idle = false; } spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); return 0; @@ -780,7 +777,6 @@ void fsl_edma_xfer_desc(struct fsl_edma_chan *fsl_chan) fsl_edma_set_tcd_regs(fsl_chan, fsl_chan->edesc->tcd[0].vtcd); fsl_edma_enable_request(fsl_chan); fsl_chan->status = DMA_IN_PROGRESS; - fsl_chan->idle = false; } void fsl_edma_issue_pending(struct dma_chan *chan) diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index c5a766da02b88..b846cfe0a7fc6 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -150,7 +150,6 @@ struct fsl_edma_chan { struct virt_dma_chan vchan; enum dma_status status; enum fsl_edma_pm_state pm_state; - bool idle; struct fsl_edma_engine *edma; struct fsl_edma_desc *edesc; struct dma_slave_config cfg; @@ -456,7 +455,6 @@ static inline struct fsl_edma_desc *to_fsl_edma_desc(struct virt_dma_desc *vd) static inline void fsl_edma_err_chan_handler(struct fsl_edma_chan *fsl_chan) { fsl_chan->status = DMA_ERROR; - fsl_chan->idle = true; } void fsl_edma_tx_chan_handler(struct fsl_edma_chan *fsl_chan); diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 82ac56be2d832..af05166ed251f 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -544,7 +544,6 @@ static int fsl_edma_probe(struct platform_device *pdev) fsl_chan->edma = fsl_edma; fsl_chan->pm_state = RUNNING; fsl_chan->srcid = 0; - fsl_chan->idle = true; fsl_chan->dma_dir = DMA_NONE; fsl_chan->vchan.desc_free = fsl_edma_free_desc; @@ -669,7 +668,7 @@ static int fsl_edma_suspend_late(struct device *dev) continue; spin_lock_irqsave(&fsl_chan->vchan.lock, flags); /* Make sure chan is idle or will force disable. */ - if (unlikely(!fsl_chan->idle)) { + if (unlikely(fsl_chan->status == DMA_IN_PROGRESS)) { dev_warn(dev, "WARN: There is non-idle channel."); fsl_edma_disable_request(fsl_chan); fsl_edma_chan_mux(fsl_chan, 0, false); diff --git a/drivers/dma/mcf-edma-main.c b/drivers/dma/mcf-edma-main.c index d97991a1e9518..3ceb7b8f9a67d 100644 --- a/drivers/dma/mcf-edma-main.c +++ b/drivers/dma/mcf-edma-main.c @@ -64,7 +64,6 @@ static irqreturn_t mcf_edma_err_handler(int irq, void *dev_id) fsl_edma_disable_request(&mcf_edma->chans[ch]); iowrite8(EDMA_CERR_CERR(ch), regs->cerr); mcf_edma->chans[ch].status = DMA_ERROR; - mcf_edma->chans[ch].idle = true; } } @@ -196,7 +195,6 @@ static int mcf_edma_probe(struct platform_device *pdev) mcf_chan->edma = mcf_edma; mcf_chan->srcid = i; - mcf_chan->idle = true; mcf_chan->dma_dir = DMA_NONE; mcf_chan->vchan.desc_free = fsl_edma_free_desc; vchan_init(&mcf_chan->vchan, &mcf_edma->dma_dev); -- 2.34.1