linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Maninder Singh <maninder1.s@samsung.com>,
	<alexander.deucher@amd.com>, <airlied@linux.ie>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Cc: <pankaj.m@samsung.com>
Subject: Re: [PATCH 1/1] drm/radeon: use kzalloc for allocating one thing
Date: Fri, 19 Jun 2015 09:26:24 +0200	[thread overview]
Message-ID: <5583C420.4040604@amd.com> (raw)
In-Reply-To: <1434686723-12936-1-git-send-email-maninder1.s@samsung.com>

On 19.06.2015 06:05, Maninder Singh wrote:
> Use kzalloc for allocating one thing rather than
> kcalloc(1...
>
> The semantic patch that makes this change is as follows:
>
> // <smpl>
> @@
> @@
>
> - kcalloc(1,
> + kzalloc(
>            ...)
> // </smpl>
>
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Reviewed-by: Vaneet Narang <v.narang@samsung.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

Alex should pick that up in his 4.2 branch.

Regards,
Christian.

> ---
>   drivers/gpu/drm/radeon/radeon_ttm.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index edafd3c..06ac59f 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -719,7 +719,7 @@ static int radeon_ttm_tt_populate(struct ttm_tt *ttm)
>   		return 0;
>   
>   	if (gtt && gtt->userptr) {
> -		ttm->sg = kcalloc(1, sizeof(struct sg_table), GFP_KERNEL);
> +		ttm->sg = kzalloc(sizeof(struct sg_table), GFP_KERNEL);
>   		if (!ttm->sg)
>   			return -ENOMEM;
>   


  reply	other threads:[~2015-06-19  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  4:05 [PATCH 1/1] drm/radeon: use kzalloc for allocating one thing Maninder Singh
2015-06-19  7:26 ` Christian König [this message]
2015-06-24 19:02   ` Alex Deucher

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=5583C420.4040604@amd.com \
    --to=christian.koenig@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maninder1.s@samsung.com \
    --cc=pankaj.m@samsung.com \
    /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).