drm/i915/query: Use struct_size() helper
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 17 Jun 2020 22:03:31 +0000 (17:03 -0500)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 19 Jun 2020 09:17:42 +0000 (10:17 +0100)
commitbf3c508375069c9e0b57d8453f99ec26e95b6548
tree0bfdfdae7bdb95228c2aa0e9ed4073705f67ea24
parent810b7ee3008ab2ac94791f75857815484c2f9cce
drm/i915/query: Use struct_size() helper

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200617220331.GA19550@embeddedor
drivers/gpu/drm/i915/i915_query.c