Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1672442 > unrolled thread

[PATCH] kasan: make function get_wild_bug_type static

Started byColin King <colin.king@canonical.com>
First post2017-06-22 11:10 +0200
Last post2017-06-22 11:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] kasan: make function get_wild_bug_type static Colin King <colin.king@canonical.com> - 2017-06-22 11:10 +0200
    Re: [PATCH] kasan: make function get_wild_bug_type static Dmitry Vyukov <dvyukov@google.com> - 2017-06-22 11:30 +0200

#1672442 — [PATCH] kasan: make function get_wild_bug_type static

FromColin King <colin.king@canonical.com>
Date2017-06-22 11:10 +0200
Subject[PATCH] kasan: make function get_wild_bug_type static
Message-ID<tV6hI-2Cj-19@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

The helper function get_wild_bug_type does not need to be in global scope,
so make it static.

Cleans up sparse warning:
"symbol 'get_wild_bug_type' was not declared. Should it be static?"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 mm/kasan/report.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index beee0e980e2d..04bb1d3eb9ec 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -107,7 +107,7 @@ static const char *get_shadow_bug_type(struct kasan_access_info *info)
 	return bug_type;
 }
 
-const char *get_wild_bug_type(struct kasan_access_info *info)
+static const char *get_wild_bug_type(struct kasan_access_info *info)
 {
 	const char *bug_type = "unknown-crash";
 
-- 
2.11.0

[toc] | [next] | [standalone]


#1672459

FromDmitry Vyukov <dvyukov@google.com>
Date2017-06-22 11:30 +0200
Message-ID<tV6B3-2JO-11@gated-at.bofh.it>
In reply to#1672442
On Thu, Jun 22, 2017 at 11:00 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The helper function get_wild_bug_type does not need to be in global scope,
> so make it static.
>
> Cleans up sparse warning:
> "symbol 'get_wild_bug_type' was not declared. Should it be static?"
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Dmitry Vyukov <dvyukov@google.com>

> ---
>  mm/kasan/report.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/kasan/report.c b/mm/kasan/report.c
> index beee0e980e2d..04bb1d3eb9ec 100644
> --- a/mm/kasan/report.c
> +++ b/mm/kasan/report.c
> @@ -107,7 +107,7 @@ static const char *get_shadow_bug_type(struct kasan_access_info *info)
>         return bug_type;
>  }
>
> -const char *get_wild_bug_type(struct kasan_access_info *info)
> +static const char *get_wild_bug_type(struct kasan_access_info *info)
>  {
>         const char *bug_type = "unknown-crash";
>
> --
> 2.11.0
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web