vfio/mdev: Make to_mdev_device() into a static inline
stable inclusion from stable-v5.10.137 commit db574d3bb6e5a26a55e174ff45ca84ddc7928eb4 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=db574d3bb6e5a26a55e174ff45ca84ddc7928eb4 -------------------------------- [ Upstream commit 66873b5f ] The macro wrongly uses 'dev' as both the macro argument and the member name, which means it fails compilation if any caller uses a word other than 'dev' as the single argument. Fix this defect by making it into proper static inline, which is more clear and typesafe anyhow. Fixes: 99e3123e ("vfio-mdev: Make mdev_device private and abstract interfaces") Reviewed-by:Christoph Hellwig <hch@lst.de> Reviewed-by:
Kevin Tian <kevin.tian@intel.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Signed-off-by:
Jason Gunthorpe <jgg@nvidia.com> Message-Id: <11-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com>
Loading
Please sign in to comment