mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Ingo Molnar <mingo@kernel.org>
Cc: Wei Tang <tangwei@cmss.chinamobile.com>,
	akpm@linux-foundation.org, peterz@infradead.org, tj@kernel.org,
	kirill.shutemov@linux.intel.com, jason.low2@hp.com,
	xypron.glpk@gmx.de, oleg@redhat.com, koct9i@gmail.com,
	josh@joshtriplett.org, ebiederm@xmission.com, cyphar@cyphar.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof
Date: Tue, 2 Feb 2016 15:45:31 +0000	[thread overview]
Message-ID: <20160202154531.GO17997@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160202091118.GB30393@gmail.com>

On Tue, Feb 02, 2016 at 10:11:18AM +0100, Ingo Molnar wrote:
> 
> * Wei Tang <tangwei@cmss.chinamobile.com> wrote:
> 
> > This patch fixes the checkpatch.pl warning to fork.c:
> > 
> > WARNING: sizeof sig->rlim should be sizeof(sig->rlim)
> > 
> > Signed-off-by: Wei Tang <tangwei@cmss.chinamobile.com>
> > ---
> >  kernel/fork.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel/fork.c b/kernel/fork.c
> > index 2e391c7..30e04d2 100644
> > --- a/kernel/fork.c
> > +++ b/kernel/fork.c
> > @@ -1143,7 +1143,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
> >  	sig->real_timer.function = it_real_fn;
> >  
> >  	task_lock(current->group_leader);
> > -	memcpy(sig->rlim, current->signal->rlim, sizeof sig->rlim);
> > +	memcpy(sig->rlim, current->signal->rlim, sizeof(sig->rlim));
> >  	task_unlock(current->group_leader);
> >  
> >  	posix_cpu_timers_init_group(sig);
> 
> So there's over 1,000 such occurances in the kernel and we do not need this 
> drip-drip churn...
> 
> If anyone feels strongly about accepting such patches, then the right solution is 
> to create a Coccinelle semantic patch to run over the whole kernel and get over 
> with the churn once and for all.

That, or a single patch taking that piece of idiocy out of checkpatch.pl...

  parent reply	other threads:[~2016-02-02 15:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02  7:53 Wei Tang
2016-02-02  9:11 ` Ingo Molnar
2016-02-02 11:28   ` [PATCH] treewide: Use 'sizeof(x)' instead of 'sizeof x' Ingo Molnar
2016-02-02 13:58     ` Joe Perches
2016-02-02 15:45   ` Al Viro [this message]
2016-02-02 17:02     ` [PATCH] kernel/fork.c: use sizeof() instead of sizeof Joe Perches
2016-02-02 17:11       ` Al Viro
2016-02-02 17:21         ` Joe Perches
     [not found]     ` <CAOviyajXB2y5zuFhdRPQfVSe_NYvaFjjUz6f86e791AvFPYfMw@mail.gmail.com>
2016-02-02 17:04       ` Al Viro
2016-02-03  3:46         ` Kevin Easton
2016-02-03  4:02           ` Al Viro

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=20160202154531.GO17997@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=cyphar@cyphar.com \
    --cc=ebiederm@xmission.com \
    --cc=jason.low2@hp.com \
    --cc=josh@joshtriplett.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=koct9i@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tangwei@cmss.chinamobile.com \
    --cc=tj@kernel.org \
    --cc=xypron.glpk@gmx.de \
    /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

Powered by JetHome