All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kunit: Include missing header
@ 2022-10-28  6:30 Bo Liu
  2022-10-28 14:46 ` Daniel Latypov
  0 siblings, 1 reply; 2+ messages in thread
From: Bo Liu @ 2022-10-28  6:30 UTC (permalink / raw)
  To: brendan.higgins, davidgow
  Cc: linux-kselftest, kunit-dev, linux-kernel, Bo Liu

The file debugfs.c missed the header debugfs.h, which
resulted on the following warning:

lib/kunit/debugfs.c:28:6: warning: no previous prototype for 'kunit_debugfs_cleanup' [-Wmissing-prototypes]
 void kunit_debugfs_cleanup(void)
      ^~~~~~~~~~~~~~~~~~~~~
lib/kunit/debugfs.c:33:6: warning: no previous prototype for 'kunit_debugfs_init' [-Wmissing-prototypes]
 void kunit_debugfs_init(void)
      ^~~~~~~~~~~~~~~~~~
lib/kunit/debugfs.c:92:6: warning: no previous prototype for 'kunit_debugfs_create_suite' [-Wmissing-prototypes]
 void kunit_debugfs_create_suite(struct kunit_suite *suite)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
lib/kunit/debugfs.c:108:6: warning: no previous prototype for 'kunit_debugfs_destroy_suite' [-Wmissing-prototypes]
 void kunit_debugfs_destroy_suite(struct kunit_suite *suite)

Signed-off-by: Bo Liu <liubo03@inspur.com>
---
 lib/kunit/debugfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/kunit/debugfs.c b/lib/kunit/debugfs.c
index 1048ef1b8d6e..83411075f614 100644
--- a/lib/kunit/debugfs.c
+++ b/lib/kunit/debugfs.c
@@ -10,6 +10,7 @@
 #include <kunit/test.h>
 
 #include "string-stream.h"
+#include "debugfs.h"
 
 #define KUNIT_DEBUGFS_ROOT             "kunit"
 #define KUNIT_DEBUGFS_RESULTS          "results"
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kunit: Include missing header
  2022-10-28  6:30 [PATCH] kunit: Include missing header Bo Liu
@ 2022-10-28 14:46 ` Daniel Latypov
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Latypov @ 2022-10-28 14:46 UTC (permalink / raw)
  To: Bo Liu
  Cc: brendan.higgins, davidgow, linux-kselftest, kunit-dev, linux-kernel

On Thu, Oct 27, 2022 at 11:31 PM Bo Liu <liubo03@inspur.com> wrote:
>
> The file debugfs.c missed the header debugfs.h, which
> resulted on the following warning:
>
> lib/kunit/debugfs.c:28:6: warning: no previous prototype for 'kunit_debugfs_cleanup' [-Wmissing-prototypes]
>  void kunit_debugfs_cleanup(void)
>       ^~~~~~~~~~~~~~~~~~~~~
> lib/kunit/debugfs.c:33:6: warning: no previous prototype for 'kunit_debugfs_init' [-Wmissing-prototypes]
>  void kunit_debugfs_init(void)
>       ^~~~~~~~~~~~~~~~~~
> lib/kunit/debugfs.c:92:6: warning: no previous prototype for 'kunit_debugfs_create_suite' [-Wmissing-prototypes]
>  void kunit_debugfs_create_suite(struct kunit_suite *suite)
>       ^~~~~~~~~~~~~~~~~~~~~~~~~~
> lib/kunit/debugfs.c:108:6: warning: no previous prototype for 'kunit_debugfs_destroy_suite' [-Wmissing-prototypes]
>  void kunit_debugfs_destroy_suite(struct kunit_suite *suite)
>
> Signed-off-by: Bo Liu <liubo03@inspur.com>

Tested-by: Daniel Latypov <dlatypov@google.com>

Looks good to me, one minor nit below.
Brendan, can you take a look when you get a moment?

Question for context: is there a plan to enable this flag by default
or something like that?
I was a bit surprised that -Wall doesn't seem to enable this flag when
I was testing locally.

> ---
>  lib/kunit/debugfs.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/kunit/debugfs.c b/lib/kunit/debugfs.c
> index 1048ef1b8d6e..83411075f614 100644
> --- a/lib/kunit/debugfs.c
> +++ b/lib/kunit/debugfs.c
> @@ -10,6 +10,7 @@
>  #include <kunit/test.h>
>
>  #include "string-stream.h"
> +#include "debugfs.h"

Very minor nit: could we swap the order of these?
#include "debugfs.h"
#include "string-stream.h"

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-28 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28  6:30 [PATCH] kunit: Include missing header Bo Liu
2022-10-28 14:46 ` Daniel Latypov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.