summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2024-12-13 10:08:23 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 14:10:56 +0100
commit174db7720ca8b2162df116024cd42f6b5c929adb (patch)
tree4e025fa2f7423167512e04ef37b6bce4d5e1e34a /include
parentb3dee7abbd839b4488a2ed0b1afa5a5c944e15b6 (diff)
downloadlinux-174db7720ca8b2162df116024cd42f6b5c929adb.tar.gz
linux-174db7720ca8b2162df116024cd42f6b5c929adb.tar.bz2
linux-174db7720ca8b2162df116024cd42f6b5c929adb.zip
kunit: platform: Resolve 'struct completion' warning
[ Upstream commit 7687c66c18c66d4ccd9949c6f641c0e7b5773483 ] 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. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202412241958.dbAImJsA-lkp@intel.com/ Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: David Gow <davidgow@google.com> Link: https://lore.kernel.org/r/20241213180841.3023843-1-briannorris@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/kunit/platform_device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/kunit/platform_device.h b/include/kunit/platform_device.h
index 0fc0999d2420..f8236a8536f7 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;