dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] dmaengine: ti: edma: remove unused code
@ 2019-09-05  6:02 YueHaibing
  2019-09-05  8:02 ` Peter Ujfalusi
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-09-05  6:02 UTC (permalink / raw)
  To: dan.j.williams, vkoul, peter.ujfalusi, arnd, yuehaibing
  Cc: dmaengine, linux-kernel

drivers/dma/ti/edma.c: In function edma_probe:
drivers/dma/ti/edma.c:2252:11: warning:
 variable off set but not used [-Wunused-but-set-variable]

'off' is not used now, so remove it.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/dma/ti/edma.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
index ba7c4f0..54fd981 100644
--- a/drivers/dma/ti/edma.c
+++ b/drivers/dma/ti/edma.c
@@ -2249,10 +2249,8 @@ static int edma_probe(struct platform_device *pdev)
 {
 	struct edma_soc_info	*info = pdev->dev.platform_data;
 	s8			(*queue_priority_mapping)[2];
-	int			i, off;
 	const s16		(*rsv_slots)[2];
-	const s16		(*xbar_chans)[2];
-	int			irq;
+	int			i, irq;
 	char			*irq_name;
 	struct resource		*mem;
 	struct device_node	*node = pdev->dev.of_node;
@@ -2349,14 +2347,6 @@ static int edma_probe(struct platform_device *pdev)
 			edma_write_slot(ecc, i, &dummy_paramset);
 	}
 
-	/* Clear the xbar mapped channels in unused list */
-	xbar_chans = info->xbar_chans;
-	if (xbar_chans) {
-		for (i = 0; xbar_chans[i][1] != -1; i++) {
-			off = xbar_chans[i][1];
-		}
-	}
-
 	irq = platform_get_irq_byname(pdev, "edma3_ccint");
 	if (irq < 0 && node)
 		irq = irq_of_parse_and_map(node, 0);
-- 
2.7.4



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] dmaengine: ti: edma: remove unused code
  2019-09-05  6:02 [PATCH -next] dmaengine: ti: edma: remove unused code YueHaibing
@ 2019-09-05  8:02 ` Peter Ujfalusi
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Ujfalusi @ 2019-09-05  8:02 UTC (permalink / raw)
  To: YueHaibing, dan.j.williams, vkoul, arnd; +Cc: dmaengine, linux-kernel



On 05/09/2019 9.02, YueHaibing wrote:
> drivers/dma/ti/edma.c: In function edma_probe:
> drivers/dma/ti/edma.c:2252:11: warning:
>  variable off set but not used [-Wunused-but-set-variable]
> 
> 'off' is not used now, so remove it.

This reminds me that this whole in EDMA driver xbar handling is mostly
broken...

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/dma/ti/edma.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> index ba7c4f0..54fd981 100644
> --- a/drivers/dma/ti/edma.c
> +++ b/drivers/dma/ti/edma.c
> @@ -2249,10 +2249,8 @@ static int edma_probe(struct platform_device *pdev)
>  {
>  	struct edma_soc_info	*info = pdev->dev.platform_data;
>  	s8			(*queue_priority_mapping)[2];
> -	int			i, off;
>  	const s16		(*rsv_slots)[2];
> -	const s16		(*xbar_chans)[2];
> -	int			irq;
> +	int			i, irq;
>  	char			*irq_name;
>  	struct resource		*mem;
>  	struct device_node	*node = pdev->dev.of_node;
> @@ -2349,14 +2347,6 @@ static int edma_probe(struct platform_device *pdev)
>  			edma_write_slot(ecc, i, &dummy_paramset);
>  	}
>  
> -	/* Clear the xbar mapped channels in unused list */
> -	xbar_chans = info->xbar_chans;
> -	if (xbar_chans) {
> -		for (i = 0; xbar_chans[i][1] != -1; i++) {
> -			off = xbar_chans[i][1];

originally we had
			clear_bits(off, 1, ecc->channel_unused);
here, but I have removed it for some reason with
1be5336bc7ba050ee07d352643bf4c01c513553c


> -		}
> -	}
> -
>  	irq = platform_get_irq_byname(pdev, "edma3_ccint");
>  	if (irq < 0 && node)
>  		irq = irq_of_parse_and_map(node, 0);
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05  6:02 [PATCH -next] dmaengine: ti: edma: remove unused code YueHaibing
2019-09-05  8:02 ` Peter Ujfalusi

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org dmaengine@archiver.kernel.org
	public-inbox-index dmaengine


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/ public-inbox