From: Brian Norris Date: Fri, 13 Dec 2024 18:08:23 +0000 (-0800) Subject: kunit: platform: Resolve 'struct completion' warning X-Git-Tag: v6.14-rc1~142^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=875aec2357cd22d412226e4134d1106248b0eb9d;p=thirdparty%2Fkernel%2Flinux.git kunit: platform: Resolve 'struct completion' warning If the header is included in a test without certain other headers, it produces compiler warnings like: In file included from [...] ../include/kunit/platform_device.h:15:57: warning: ‘struct completion’ declared inside parameter list will not be visible outside of this definition or declaration 15 | struct completion *x); | ^~~~~~~~~~ Add a 'struct completion' forward declaration to resolve this. Signed-off-by: Brian Norris Reviewed-by: David Gow Signed-off-by: Shuah Khan --- diff --git a/include/kunit/platform_device.h b/include/kunit/platform_device.h index 0fc0999d2420a..f8236a8536f7e 100644 --- a/include/kunit/platform_device.h +++ b/include/kunit/platform_device.h @@ -2,6 +2,7 @@ #ifndef _KUNIT_PLATFORM_DRIVER_H #define _KUNIT_PLATFORM_DRIVER_H +struct completion; struct kunit; struct platform_device; struct platform_driver;