From: Jean Delvare <jdelvare@suse.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>, Baoquan He <bhe@redhat.com>,
Michal Hocko <mhocko@suse.com>
Subject: [PATCH v2 3/3] params: Improve STANDARD_PARAM_DEF readability
Date: Thu, 28 Sep 2017 16:27:28 +0200 [thread overview]
Message-ID: <20170928162728.756143cc@endymion> (raw)
In-Reply-To: <20170928162337.28ae03f4@endymion>
Align the parameters passed to STANDARD_PARAM_DEF for clarity.
Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
Changes since v1:
* Patch added
kernel/params.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- linux-4.13.orig/kernel/params.c 2017-09-28 11:56:49.495406813 +0200
+++ linux-4.13/kernel/params.c 2017-09-28 13:44:33.943844491 +0200
@@ -236,14 +236,14 @@ char *parse_args(const char *doing,
EXPORT_SYMBOL(param_ops_##name)
-STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", kstrtou8);
-STANDARD_PARAM_DEF(short, short, "%hi", kstrtos16);
-STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", kstrtou16);
-STANDARD_PARAM_DEF(int, int, "%i", kstrtoint);
-STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint);
-STANDARD_PARAM_DEF(long, long, "%li", kstrtol);
-STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul);
-STANDARD_PARAM_DEF(ullong, unsigned long long, "%llu", kstrtoull);
+STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", kstrtou8);
+STANDARD_PARAM_DEF(short, short, "%hi", kstrtos16);
+STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", kstrtou16);
+STANDARD_PARAM_DEF(int, int, "%i", kstrtoint);
+STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint);
+STANDARD_PARAM_DEF(long, long, "%li", kstrtol);
+STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul);
+STANDARD_PARAM_DEF(ullong, unsigned long long, "%llu", kstrtoull);
int param_set_charp(const char *val, const struct kernel_param *kp)
{
--
Jean Delvare
SUSE L3 Support
next prev parent reply other threads:[~2017-09-28 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 14:23 [PATCH v2 0/3] params: Fix potential buffer overflows Jean Delvare
2017-09-28 14:25 ` [PATCH v2 1/3] params: Fix the maximum length in param_get_string Jean Delvare
2017-09-28 14:26 ` [PATCH v2 2/3] params: Fix an overflow in param_attr_show Jean Delvare
2017-09-28 14:27 ` Jean Delvare [this message]
2017-09-28 15:54 ` [PATCH v2 0/3] params: Fix potential buffer overflows Ingo Molnar
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=20170928162728.756143cc@endymion \
--to=jdelvare@suse.de \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@kernel.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.