On Mon, Jan 12, 2015 at 03:39:19PM -0800, [email protected] wrote:
> From: Andrew Morton <[email protected]>
> Subject: mm-memcontrol-default-hierarchy-interface-for-memory-checkpatch-fixes
> 
> Cc: Greg Thelen <[email protected]>
> 
> 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 <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
> ---
> 
>  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to