On Fri, Oct 09, 2020 at 04:29:55PM +0200, Christian König wrote:
> > > > - entity = kcalloc(1, offsetof(typeof(*entity),
> > > > fences[amdgpu_sched_jobs]),
> > > > + entity = kmalloc(struct_size(entity, fences, amdgpu_sched_jobs),
> > > NAK. You could use kzalloc() here, but kmalloc
Am 09.10.20 um 15:54 schrieb Gustavo A. R. Silva:
On Fri, Oct 09, 2020 at 09:08:51AM +0200, Christian König wrote:
Am 08.10.20 um 16:34 schrieb Gustavo A. R. Silva:
Make use of the new struct_size() helper instead of the offsetof() idiom.
Also, use kmalloc() instead of kcalloc().
On Fri, Oct 09, 2020 at 09:08:51AM +0200, Christian König wrote:
> Am 08.10.20 um 16:34 schrieb Gustavo A. R. Silva:
> > Make use of the new struct_size() helper instead of the offsetof() idiom.
> > Also, use kmalloc() instead of kcalloc().
> >
> > Signed-off-by: Gustavo A. R. Silva
> > ---
> >
Am 08.10.20 um 16:34 schrieb Gustavo A. R. Silva:
Make use of the new struct_size() helper instead of the offsetof() idiom.
Also, use kmalloc() instead of kcalloc().
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +-
1 file changed, 1 insertion(+), 1
Applied. Thanks!
Alex
On Thu, Oct 8, 2020 at 10:29 AM Gustavo A. R. Silva
wrote:
>
> Make use of the new struct_size() helper instead of the offsetof() idiom.
> Also, use kmalloc() instead of kcalloc().
>
> Signed-off-by: Gustavo A. R. Silva
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c |
Make use of the new struct_size() helper instead of the offsetof() idiom.
Also, use kmalloc() instead of kcalloc().
Signed-off-by: Gustavo A. R. Silva
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git