staging: vc04_services: merge vchiq_kern_lib.c into vchiq_arm.c
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Feb 2018 15:01:46 +0000 (16:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 14:23:32 +0000 (15:23 +0100)
commit5c5e6ef6287cbf31f43c8c9f643d197ab9eb2039
tree06202431ee81fa5e436cf38f196a453011b7125d
parente5fe0af51707faa1016465e5e9775cb60fdd8629
staging: vc04_services: merge vchiq_kern_lib.c into vchiq_arm.c

There are two incompatible definitions of 'vchiq_instance_struct', so
passing them through vchiq_initialise(), vchiq_connect() or another
such interface is broken, as shown by building the driver with link-time
optimizations:

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h:129:0: error: type of 'vchiq_initialise' does not match original declaration [-Werror=lto-type-mismatch]
 extern VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *pinstance);

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:68:0: note: 'vchiq_initialise' was previously declared here
 VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *instance_out)

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:68:0: note: code may be misoptimized unless -fno-strict-aliasing is used
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h:131:0: error: type of 'vchiq_connect' does not match original declaration [-Werror=lto-type-mismatch]
 extern VCHIQ_STATUS_T vchiq_connect(VCHIQ_INSTANCE_T instance);

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:168:0: note: 'vchiq_connect' was previously declared here
 VCHIQ_STATUS_T vchiq_connect(VCHIQ_INSTANCE_T instance)

It's possible that only one of the two sides actually access the members,
but it's clear that they need to agree on the layout. The easiest way
to achieve this appears to be to merge the two files into one. I tried
moving the structure definition into a shared header first, but ended
up running into too many interdependencies that way.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/Makefile
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c [deleted file]