lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Jan 2015 18:54:38 -0500
From:	Johannes Weiner <hannes@...xchg.org>
To:	linux-kernel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, gthelen@...gle.com,
	mm-commits@...r.kernel.org
Subject: Re: +
 mm-memcontrol-default-hierarchy-interface-for-memory-checkpatch-fixes.patch
 added to -mm tree

On Mon, Jan 12, 2015 at 03:39:19PM -0800, akpm@...ux-foundation.org wrote:
> From: Andrew Morton <akpm@...ux-foundation.org>
> Subject: mm-memcontrol-default-hierarchy-interface-for-memory-checkpatch-fixes
> 
> Cc: Greg Thelen <gthelen@...gle.com>
> 
> WARNING: Prefer seq_puts to seq_printf
> #315: FILE: mm/memcontrol.c:5340:
> +		seq_printf(m, "none\n");
> 
> WARNING: Prefer seq_puts to seq_printf
> #349: FILE: mm/memcontrol.c:5374:
> +		seq_printf(m, "none\n");
> 
> WARNING: Prefer seq_puts to seq_printf
> #383: FILE: mm/memcontrol.c:5408:
> +		seq_printf(m, "none\n");
> 
> total: 0 errors, 3 warnings, 431 lines checked
> 
> ./patches/mm-memcontrol-default-hierarchy-interface-for-memory.patch has style problems, please review.
> 
> If any of these errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
> 
> Please run checkpatch prior to sending patches
> 
> Cc: Johannes Weiner <hannes@...xchg.org>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  mm/memcontrol.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff -puN mm/memcontrol.c~mm-memcontrol-default-hierarchy-interface-for-memory-checkpatch-fixes mm/memcontrol.c
> --- a/mm/memcontrol.c~mm-memcontrol-default-hierarchy-interface-for-memory-checkpatch-fixes
> +++ a/mm/memcontrol.c
> @@ -5337,7 +5337,7 @@ static int memory_low_show(struct seq_fi
>  	unsigned long low = ACCESS_ONCE(memcg->low);
>  
>  	if (low == 0)
> -		seq_printf(m, "none\n");
> +		seq_puts(m, "none\n");
>  	else
>  		seq_printf(m, "%llu\n", (u64)low * PAGE_SIZE);

Hm, is that really an improvement to the code?  With seq_printf() the
calls in both branches align visually much nicer, IMO.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ