[PATCH] i915/drm/gvt: treat intel_gvt_mpt as const in gvt code
Zhenyu Wang
zhenyuw at linux.intel.com
Tue Nov 17 01:40:53 UTC 2020
On 2020.11.11 18:28:11 +0100, Julian Stecklina wrote:
> The current interface of intel_gvt_register_hypervisor() expects a
> non-const pointer to struct intel_gvt_mpt, even though the mediator
> never modifies (or should modifiy) the content of this struct.
>
> Change the function signature and relevant struct members to const to
> properly express the API's intent and allow instances of intel_gvt_mpt
> to be allocated as const.
>
> While I was here, I also made KVM's instance of this struct const to
> reduce the number of writable function pointers in the kernel.
>
> Cc: Zhenyu Wang <zhenyuw at linux.intel.com>
> Cc: intel-gvt-dev at lists.freedesktop.org
> Signed-off-by: Julian Stecklina <julian.stecklina at cyberus-technology.de>
> ---
Looks good to me. Thanks!
Reviewed-by: Zhenyu Wang <zhenyuw at linux.intel.com>
--
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20201117/15bc7690/attachment.sig>
More information about the intel-gvt-dev
mailing list