Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kunit: platform: Resolve 'struct completion' warning

If the <kunit/platform_device.h> 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 <briannorris@chromium.org>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Brian Norris and committed by
Shuah Khan
875aec23 40384c84

+1
+1
include/kunit/platform_device.h
··· 2 2 #ifndef _KUNIT_PLATFORM_DRIVER_H 3 3 #define _KUNIT_PLATFORM_DRIVER_H 4 4 5 + struct completion; 5 6 struct kunit; 6 7 struct platform_device; 7 8 struct platform_driver;