]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3e8316980cfbe6dc89fa27bfc1cfb7b1ac60c06a
tree0bfdfdae7bdb95228c2aa0e9ed4073705f67ea24
parentfbbc15ac5d2e5f2f960ac92a91100a135fc81faa
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