]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kunit: platform: Resolve 'struct completion' warning
authorBrian Norris <briannorris@chromium.org>
Fri, 13 Dec 2024 18:08:23 +0000 (10:08 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 13:01:25 +0000 (14:01 +0100)
commit14a2a8ec50bcf90b087be66c30f43069402438e2
tree8ffbe967db3e7d0b798567cd1f2d16778facb48f
parent324785dc9f4319247d838b74db8093d6f69d3050
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>
include/kunit/platform_device.h