From: Andrew Morton <akpm@linux-foundation.org>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: Neaten warn_alloc_failed
Date: Thu, 25 Aug 2011 16:50:06 -0700 [thread overview]
Message-ID: <20110825165006.af771ef7.akpm@linux-foundation.org> (raw)
In-Reply-To: <5a0bef0143ed2b3176917fdc0ddd6a47f4c79391.1314303846.git.joe@perches.com>
On Thu, 25 Aug 2011 13:26:19 -0700
Joe Perches <joe@perches.com> wrote:
> Add __attribute__((format (printf...) to the function
> to validate format and arguments. Use vsprintf extension
> %pV to avoid any possible message interleaving. Coalesce
> format string. Convert printks/pr_warning to pr_warn.
>
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1334,7 +1334,8 @@ extern void si_meminfo(struct sysinfo * val);
> extern void si_meminfo_node(struct sysinfo *val, int nid);
> extern int after_bootmem;
>
> -extern void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
> +extern __attribute__((format (printf, 3, 4)))
> +void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
>
> extern void setup_per_cpu_pageset(void);
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
looky:
--- a/include/linux/mm.h~mm-neaten-warn_alloc_failed-fix
+++ a/include/linux/mm.h
@@ -1335,7 +1335,7 @@ extern void si_meminfo(struct sysinfo *
extern void si_meminfo_node(struct sysinfo *val, int nid);
extern int after_bootmem;
-extern __attribute__((format (printf, 3, 4)))
+extern __printf(3, 4)
void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
extern void setup_per_cpu_pageset(void);
_
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm: Neaten warn_alloc_failed
Date: Thu, 25 Aug 2011 16:50:06 -0700 [thread overview]
Message-ID: <20110825165006.af771ef7.akpm@linux-foundation.org> (raw)
In-Reply-To: <5a0bef0143ed2b3176917fdc0ddd6a47f4c79391.1314303846.git.joe@perches.com>
On Thu, 25 Aug 2011 13:26:19 -0700
Joe Perches <joe@perches.com> wrote:
> Add __attribute__((format (printf...) to the function
> to validate format and arguments. Use vsprintf extension
> %pV to avoid any possible message interleaving. Coalesce
> format string. Convert printks/pr_warning to pr_warn.
>
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1334,7 +1334,8 @@ extern void si_meminfo(struct sysinfo * val);
> extern void si_meminfo_node(struct sysinfo *val, int nid);
> extern int after_bootmem;
>
> -extern void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
> +extern __attribute__((format (printf, 3, 4)))
> +void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
>
> extern void setup_per_cpu_pageset(void);
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
looky:
--- a/include/linux/mm.h~mm-neaten-warn_alloc_failed-fix
+++ a/include/linux/mm.h
@@ -1335,7 +1335,7 @@ extern void si_meminfo(struct sysinfo *
extern void si_meminfo_node(struct sysinfo *val, int nid);
extern int after_bootmem;
-extern __attribute__((format (printf, 3, 4)))
+extern __printf(3, 4)
void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
extern void setup_per_cpu_pageset(void);
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-08-25 23:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 20:26 [PATCH] mm: Neaten warn_alloc_failed Joe Perches
2011-08-25 20:26 ` Joe Perches
2011-08-25 23:50 ` Andrew Morton [this message]
2011-08-25 23:50 ` Andrew Morton
2011-08-26 0:00 ` Joe Perches
2011-08-26 0:00 ` Joe Perches
2011-08-26 0:05 ` Andrew Morton
2011-08-26 0:05 ` Andrew Morton
2011-08-26 0:38 ` Joe Perches
2011-08-26 0:38 ` Joe Perches
2011-08-26 1:07 ` Andrew Morton
2011-08-26 1:07 ` Andrew Morton
2011-08-26 2:55 ` [PATCH] treewide: Use __printf not __attribute__((format(printf,...))) Joe Perches
2011-08-26 2:55 ` Joe Perches
2011-10-11 17:22 ` Kirill A. Shutemov
2011-10-11 17:22 ` Kirill A. Shutemov
2011-10-11 17:22 ` Kirill A. Shutemov
2011-10-11 17:43 ` Joe Perches
2011-10-11 17:43 ` Joe Perches
[not found] ` <20111101150908.b482fad5.akpm@linux-foundation.org>
2011-11-02 2:27 ` [PATCH] checkpatch: Prefer " Joe Perches
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=20110825165006.af771ef7.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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 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.