From: Andrey Konovalov <andreyknvl@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: akpm@linux-foundation.org, ryabinin.a.a@gmail.com,
glider@google.com, dvyukov@google.com,
vincenzo.frascino@arm.com, kasan-dev@googlegroups.com,
linux-mm@kvack.org, patches@lists.linux.dev
Subject: Re: [PATCH] kasan: Mark unpoison_slab_object() as static
Date: Thu, 21 Dec 2023 18:33:21 +0100 [thread overview]
Message-ID: <CA+fCnZfO6JyNvf7Wt7sOBoPKTX_UGexuWpyvgXYq9XSJEp-dLg@mail.gmail.com> (raw)
In-Reply-To: <20231221-mark-unpoison_slab_object-as-static-v1-1-bf24f0982edc@kernel.org>
On Thu, Dec 21, 2023 at 6:27 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> With -Wmissing-prototypes enabled, there is a warning that
> unpoison_slab_object() has no prototype, breaking the build with
> CONFIG_WERROR=y:
>
> mm/kasan/common.c:271:6: error: no previous prototype for 'unpoison_slab_object' [-Werror=missing-prototypes]
> 271 | void unpoison_slab_object(struct kmem_cache *cache, void *object, gfp_t flags,
> | ^~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> Mark the function as static, as it is not used outside of this
> translation unit, clearing up the warning.
>
> Fixes: 3f38c3c5bc40 ("kasan: save alloc stack traces for mempool")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> mm/kasan/common.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/kasan/common.c b/mm/kasan/common.c
> index ebb1b23d6480..563cda95240b 100644
> --- a/mm/kasan/common.c
> +++ b/mm/kasan/common.c
> @@ -277,8 +277,8 @@ void __kasan_kfree_large(void *ptr, unsigned long ip)
> /* The object will be poisoned by kasan_poison_pages(). */
> }
>
> -void unpoison_slab_object(struct kmem_cache *cache, void *object, gfp_t flags,
> - bool init)
> +static void unpoison_slab_object(struct kmem_cache *cache, void *object,
> + gfp_t flags, bool init)
> {
> /*
> * Unpoison the whole object. For kmalloc() allocations,
>
> ---
> base-commit: eacce8189e28717da6f44ee492b7404c636ae0de
> change-id: 20231221-mark-unpoison_slab_object-as-static-3bf224e1527f
>
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>
>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
I'll fold this fix into v2 if I end up resending the series.
Thank you, Nathan!
next prev parent reply other threads:[~2023-12-21 17:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 17:26 Nathan Chancellor
2023-12-21 17:33 ` Andrey Konovalov [this message]
2023-12-21 18:00 ` Andrey Konovalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+fCnZfO6JyNvf7Wt7sOBoPKTX_UGexuWpyvgXYq9XSJEp-dLg@mail.gmail.com \
--to=andreyknvl@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-mm@kvack.org \
--cc=nathan@kernel.org \
--cc=patches@lists.linux.dev \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox