From: Joe Perches <joe@perches.com>
To: Choi Gi-yong <yong@gnoy.org>
Cc: tj@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Fix Coding style
Date: Fri, 07 Mar 2014 19:55:53 -0800 [thread overview]
Message-ID: <1394250953.6972.16.camel@joe-AO722> (raw)
In-Reply-To: <1394250361-5151-1-git-send-email-yong@gnoy.org>
On Sat, 2014-03-08 at 12:46 +0900, Choi Gi-yong wrote:
[]
> diff --git a/mm/percpu.c b/mm/percpu.c
Please run your suggested patches through checkpatch.
> @@ -715,7 +715,7 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved)
>
> if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) {
> WARN(true, "illegal size (%zu) or align (%zu) for "
> - "percpu allocation\n", size, align);
> + "percpu allocation\n", size, align);
It'd be better to coalesce the format fragments
[]
> @@ -968,8 +968,8 @@ bool is_kernel_percpu_address(unsigned long addr)
> void *start = per_cpu_ptr(base, cpu);
>
> if ((void *)addr >= start && (void *)addr < start + static_size)
> - return true;
> - }
> + return true;
> + }
Not an improvement.
Why do you think it's better?
> @@ -1929,8 +1929,7 @@ void __init setup_per_cpu_areas(void)
> */
> void __init percpu_init_late(void)
> {
> - struct pcpu_chunk *target_chunks[] =
> - { pcpu_first_chunk, pcpu_reserved_chunk, NULL };
> + struct pcpu_chunk *target_chunks[] = { pcpu_first_chunk, pcpu_reserved_chunk, NULL };
This exceeds 80 columns.
This would be better as:
struct pcpu_chunk *target_chunks[] = {
pcpu_first_chunk, pcpu_reserved_chunk, NULL
};
And perhaps this should be static const
> struct pcpu_chunk *chunk;
> unsigned long flags;
> int i;
next prev parent reply other threads:[~2014-03-08 3:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-08 3:46 Choi Gi-yong
2014-03-08 3:55 ` Joe Perches [this message]
[not found] ` <CAH4bKb02r2Co08u8nSVOw2eFVCF-5r_bA33B8RGDwW1BLtjoKA@mail.gmail.com>
2014-03-09 8:00 ` 최(Choi)기용(Gi-yong)
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=1394250953.6972.16.camel@joe-AO722 \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=yong@gnoy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®