]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/xe: Introduce const cast helper
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Sat, 20 Jul 2024 14:25:22 +0000 (16:25 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 22 Jul 2024 10:20:07 +0000 (12:20 +0200)
commitbd40536ae33911bc74df5ba3b29b573dcb72f904
treeffbd745c379d4fb87f060a00196635a7c9e4332a
parentbe1dcdffa8fadc22ad272f605a53e2a2fd30e7f8
drm/xe: Introduce const cast helper

Typically we want to preserve pointer constness when converting
from one xe pointer to another, but in some rare cases, like kunit
parameter conversions, we might want to discard this constness.
Add a helper that we will use to clearly indicate our intention.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> #v1
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240720142528.530-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_device.h