dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: gaurav singh <gaurav1086@gmail.com>
Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] txx9dmac_probe: Remove redundant null check
Date: Wed, 17 Jun 2020 22:46:24 +0530	[thread overview]
Message-ID: <20200617171624.GX2324254@vkoul-mobl> (raw)
In-Reply-To: <CAFAFadAYLEXCdR_yg+GXOSfsBZ879zL7+jaxooZY0Nd6CyA0NA@mail.gmail.com>

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

           reply	other threads:[~2020-06-17 17:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAFAFadAYLEXCdR_yg+GXOSfsBZ879zL7+jaxooZY0Nd6CyA0NA@mail.gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200617171624.GX2324254@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gaurav1086@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).