dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* Re: [PATCH] txx9dmac_probe: Remove redundant null check
       [not found] <CAFAFadAYLEXCdR_yg+GXOSfsBZ879zL7+jaxooZY0Nd6CyA0NA@mail.gmail.com>
@ 2020-06-17 17:16 ` Vinod Koul
  0 siblings, 0 replies; only message in thread
From: Vinod Koul @ 2020-06-17 17:16 UTC (permalink / raw)
  To: gaurav singh; +Cc: dan.j.williams, dmaengine, linux-kernel

On 06-06-20, 10:34, gaurav singh wrote:
> The check : if (pdata) is redundant since its already being dereferenced
> above :
> ddev->have_64bit_regs = pdata->have_64bit_regs;
> 
> pdata is not initialized after that hence no need for null check.
> 
> Please find the patch below. Let me know if there is any issue.

Please send the patch using git send-email..
> 
> Thanks and regards,
> Gaurav.
> 
> >From 757eafa0f5195f7dd4c06205e6fa78ff6a282919 Mon Sep 17 00:00:00 2001
> From: Gaurav Singh <gaurav1086@gmail.com>
> Date: Sat, 6 Jun 2020 10:30:56 -0400
> Subject: [PATCH] txx9dmac_probe: Remove redundant null check
> 
> Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
> ---
>  drivers/dma/txx9dmac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c
> index 628bdf4430c7..4c71eba06a69 100644
> --- a/drivers/dma/txx9dmac.c
> +++ b/drivers/dma/txx9dmac.c
> @@ -1209,7 +1209,7 @@ static int __init txx9dmac_probe(struct
> platform_device *pdev)
>   }
> 
>   mcr = TXX9_DMA_MCR_MSTEN | MCR_LE;
> - if (pdata && pdata->memcpy_chan >= 0)
> + if (pdata->memcpy_chan >= 0)

what happened to formatting here, please run ./scripts/checkpatch.pl to check for style issues

>   mcr |= TXX9_DMA_MCR_FIFUM(pdata->memcpy_chan);
>   dma_writel(ddev, MCR, mcr);
> 
> -- 
> 2.17.1

-- 
~Vinod

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAFAFadAYLEXCdR_yg+GXOSfsBZ879zL7+jaxooZY0Nd6CyA0NA@mail.gmail.com>
2020-06-17 17:16 ` [PATCH] txx9dmac_probe: Remove redundant null check Vinod Koul

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
	public-inbox-index dmaengine

Example config snippet for mirrors

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.git