From: Andrew Morton WARNING: consider using strict_strtoull in preference to simple_strtoull #42: FILE: lib/cmdline.c:133: + unsigned long long ret = simple_strtoull(ptr, &endptr, 0); WARNING: braces {} are not necessary for single statement blocks #58: FILE: lib/cmdline.c:150: + if (retptr) { + *retptr = endptr; + } total: 0 errors, 2 warnings, 37 lines checked ./patches/lib-allow-memparse-to-accept-a-null-and-ignorable-second-parm.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: "Robert P. J. Day" Cc: Robert P. J. Day Signed-off-by: Andrew Morton --- lib/cmdline.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -puN lib/cmdline.c~lib-allow-memparse-to-accept-a-null-and-ignorable-second-parm-checkpatch-fixes lib/cmdline.c --- a/lib/cmdline.c~lib-allow-memparse-to-accept-a-null-and-ignorable-second-parm-checkpatch-fixes +++ a/lib/cmdline.c @@ -126,7 +126,7 @@ char *get_options(const char *str, int n * megabyte, or one gigabyte, respectively. */ -unsigned long long memparse (char *ptr, char **retptr) +unsigned long long memparse(char *ptr, char **retptr) { char *endptr; /* local pointer to end of parsed string */ @@ -147,9 +147,8 @@ unsigned long long memparse (char *ptr, break; } - if (retptr) { + if (retptr) *retptr = endptr; - } return ret; } _