Message ID | 20250307-scanf-kunit-convert-v9-5-b98820fa39ff@gmail.com |
---|---|
State | New |
Headers | show |
Series | scanf: convert self-test to KUnit | expand |
On Fri 2025-03-07 06:27:38, Tamir Duberstein wrote: > Remove the unused `kernel.h`. Replace `string.h` with `sprintf.h` as the > former doesn't seem to be used directly. > --- a/lib/tests/scanf_kunit.c > +++ b/lib/tests/scanf_kunit.c > @@ -5,12 +5,11 @@ > > #include <kunit/test.h> > #include <linux/bitops.h> > -#include <linux/kernel.h> > #include <linux/module.h> > #include <linux/overflow.h> > #include <linux/prandom.h> > #include <linux/slab.h> > -#include <linux/string.h> > +#include <linux/sprintf.h> > > #define BUF_SIZE 1024 > The change makes sense and looks good to me. I would go with it. Reviewed-by: Petr Mladek <pmladek@suse.com> Tested-by: Petr Mladek <pmladek@suse.com> Further improvements might be done later in a separate patchset... Best Regards, Petr
diff --git a/lib/tests/scanf_kunit.c b/lib/tests/scanf_kunit.c index e9a36ed80575..d96d7ca85b52 100644 --- a/lib/tests/scanf_kunit.c +++ b/lib/tests/scanf_kunit.c @@ -5,12 +5,11 @@ #include <kunit/test.h> #include <linux/bitops.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/overflow.h> #include <linux/prandom.h> #include <linux/slab.h> -#include <linux/string.h> +#include <linux/sprintf.h> #define BUF_SIZE 1024
Remove the unused `kernel.h`. Replace `string.h` with `sprintf.h` as the former doesn't seem to be used directly. Signed-off-by: Tamir Duberstein <tamird@gmail.com> --- lib/tests/scanf_kunit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)