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 <[email protected]>
Reviewed-by: Vaneet Narang <[email protected]>
---
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;
--
1.7.1
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 <[email protected]>
> Reviewed-by: Vaneet Narang <[email protected]>
Reviewed-by: Christian K?nig <[email protected]>
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;
>
On Fri, Jun 19, 2015 at 3:26 AM, Christian König
<[email protected]> wrote:
> 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 <[email protected]>
>> Reviewed-by: Vaneet Narang <[email protected]>
>
>
> Reviewed-by: Christian König <[email protected]>
>
> Alex should pick that up in his 4.2 branch.
Applied. thanks!
Alex
>
> 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;
>>
>
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/dri-devel