vbox: fix link error with 'gcc -Og'
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Nov 2018 15:38:53 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:46:59 +0000 (19:46 +0100)
commit922fd2d0464430ca63e8fdb46b4b496f2cc5548e
tree11e693542130514da0edae0398d3ff70c3dee7c8
parentf060c825c45517abdbf60c01ba30f7407342fb24
vbox: fix link error with 'gcc -Og'

[ Upstream commit b8ae30a7020d61e0504529adf45abb08fa5c59f5 ]

With the new CONFIG_CC_OPTIMIZE_FOR_DEBUGGING option, we get a link
error in the vboxguest driver, when that fails to optimize out the
call to the compat handler:

drivers/virt/vboxguest/vboxguest_core.o: In function `vbg_ioctl_hgcm_call':
vboxguest_core.c:(.text+0x1f6e): undefined reference to `vbg_hgcm_call32'

Another compile-time check documents better what we want and avoids
the error.

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/virt/vboxguest/vboxguest_core.c