kfence: fix typo in test
diff mbox series

Message ID X9lHQExmHGvETxY4@elver.google.com
State In Next
Commit d95414cef563e8def4d11fad0302dbd8394f4910
Headers show
Series
  • kfence: fix typo in test
Related show

Commit Message

Marco Elver Dec. 15, 2020, 11:31 p.m. UTC
Fix a typo/accidental copy-paste that resulted in the obviously
incorrect 'GFP_KERNEL * 2' expression.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Marco Elver <elver@google.com>
---
 mm/kfence/kfence_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Potapenko Dec. 17, 2020, 3:57 p.m. UTC | #1
On Wed, Dec 16, 2020 at 12:44 AM Marco Elver <elver@google.com> wrote:
>
> On Wed, 16 Dec 2020 at 00:31, Marco Elver <elver@google.com> wrote:
> > Fix a typo/accidental copy-paste that resulted in the obviously
> > incorrect 'GFP_KERNEL * 2' expression.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Marco Elver <elver@google.com>
Acked-by: Alexander Potapenko <glider@google.com>

> > ---
> >  mm/kfence/kfence_test.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c
> > index 1433a35a1644..f57c61c833e6 100644
> > --- a/mm/kfence/kfence_test.c
> > +++ b/mm/kfence/kfence_test.c
> > @@ -665,7 +665,7 @@ static void test_krealloc(struct kunit *test)
> >         for (; i < size * 3; i++) /* Fill to extra bytes. */
> >                 buf[i] = i + 1;
> >
> > -       buf = krealloc(buf, size * 2, GFP_KERNEL * 2); /* Shrink. */
> > +       buf = krealloc(buf, size * 2, GFP_KERNEL); /* Shrink. */
> >         KUNIT_EXPECT_GE(test, ksize(buf), size * 2);
> >         for (i = 0; i < size * 2; i++)
> >                 KUNIT_EXPECT_EQ(test, buf[i], (char)(i + 1));
> > --
> > 2.29.2.684.gfbc64c5ab5-goog
> >
>
> This patch could, if appropriate, be squashed into "kfence: add test suite".
>
> Thanks,
> -- Marco

Patch
diff mbox series

diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c
index 1433a35a1644..f57c61c833e6 100644
--- a/mm/kfence/kfence_test.c
+++ b/mm/kfence/kfence_test.c
@@ -665,7 +665,7 @@  static void test_krealloc(struct kunit *test)
 	for (; i < size * 3; i++) /* Fill to extra bytes. */
 		buf[i] = i + 1;
 
-	buf = krealloc(buf, size * 2, GFP_KERNEL * 2); /* Shrink. */
+	buf = krealloc(buf, size * 2, GFP_KERNEL); /* Shrink. */
 	KUNIT_EXPECT_GE(test, ksize(buf), size * 2);
 	for (i = 0; i < size * 2; i++)
 		KUNIT_EXPECT_EQ(test, buf[i], (char)(i + 1));