public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: <coolrrsh@gmail.com>, <fenghua.yu@intel.com>, <vkoul@kernel.org>,
	<dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <linux-kernel-mentees@lists.linuxfoundation.org>
Subject: Re: [PATCH v2] dmaengine: idxd: Remove redundant memset() for eventlog allocation
Date: Tue, 29 Aug 2023 11:11:33 -0700	[thread overview]
Message-ID: <488969be-2e96-2bf4-974e-1bb5e7bedcd8@intel.com> (raw)
In-Reply-To: <20230829180027.6357-1-coolrrsh@gmail.com>



On 8/29/23 11:00, coolrrsh@gmail.com wrote:
> From: Rajeshwar R Shinde <coolrrsh@gmail.com>
> 
> dma_alloc_coherent function already zeroes the array 'addr'.
> So, memset function call is not needed.
> 
> This fixes warning such as:
> drivers/dma/idxd/device.c:783:8-26:
> WARNING: dma_alloc_coherent used in addr already zeroes out memory,
> so memset is not needed.
> 
> Signed-off-by: Rajeshwar R Shinde <coolrrsh@gmail.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
> v1->v2
> Renamed the subject line
> ---
>   drivers/dma/idxd/device.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
> index 5abbcc61c528..7c74bc60f582 100644
> --- a/drivers/dma/idxd/device.c
> +++ b/drivers/dma/idxd/device.c
> @@ -786,8 +786,6 @@ static int idxd_device_evl_setup(struct idxd_device *idxd)
>   		goto err_alloc;
>   	}
>   
> -	memset(addr, 0, size);
> -
>   	spin_lock(&evl->lock);
>   	evl->log = addr;
>   	evl->dma = dma_addr;

  reply	other threads:[~2023-08-29 18:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 18:00 [PATCH v2] dmaengine: idxd: Remove redundant memset() for eventlog allocation coolrrsh
2023-08-29 18:11 ` Dave Jiang [this message]
2023-10-04 13:48 ` Vinod Koul

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=488969be-2e96-2bf4-974e-1bb5e7bedcd8@intel.com \
    --to=dave.jiang@intel.com \
    --cc=coolrrsh@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@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