]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
kunit: platform: Resolve 'struct completion' warning
authorBrian Norris <briannorris@chromium.org>
Fri, 13 Dec 2024 18:08:23 +0000 (10:08 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Sat, 11 Jan 2025 23:00:36 +0000 (16:00 -0700)
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>
include/kunit/platform_device.h

index 0fc0999d2420aa90c5fbc88613f8b412ca90d0a6..f8236a8536f7ebcee6b0e00a7bd799a14b345c1b 100644 (file)
@@ -2,6 +2,7 @@
 #ifndef _KUNIT_PLATFORM_DRIVER_H
 #define _KUNIT_PLATFORM_DRIVER_H
 
+struct completion;
 struct kunit;
 struct platform_device;
 struct platform_driver;