All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cruz Julian Bishop <cruzjbishop@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: "Ken O'Brien" <kernel@kenobrien.org>,
	gregkh@linuxfoundation.org, swetland@google.com,
	arve@android.com, viro@zeniv.linux.org.uk, dhowells@redhat.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: android: checkpatch.pl fixes
Date: Sun, 21 Oct 2012 12:05:21 +1000	[thread overview]
Message-ID: <1350785121.12361.2.camel@CruzBishop-ASPIRE> (raw)
In-Reply-To: <1350781512.16706.3.camel@joe-AO722>

On Sat, 2012-10-20 at 18:05 -0700, Joe Perches wrote:
> On Sat, 2012-10-20 at 23:33 +0100, Ken O'Brien wrote:
> > Fixed all instances of strings spanning multiple lines from checkpatch.pl.
> []
> > diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
> []
> > @@ -556,7 +556,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate,
> >  		goto free_range;
> >  
> >  	if (vma == NULL) {
> > -		pr_err("binder: %d: binder_alloc_buf failed to "
> > +		pr_err("binder: %d: binder_alloc_buf failed to " \
> >  		       "map pages in userspace, no vma\n", proc->pid);
> 
> Hi Ken.
> 
> Nice try, but the "right" way to do this is to coalesce formats like:
> 
> 		pr_err("binder: %d: binder_alloc_buf failed to map pages in userspace, no vma\n",
> 		       proc->pid);
> 
> and ignore 80 column line lengths for these coalesced formats.

Going off that, is there currently any way to insert, say,
a comment that filters out the next line for checkpatch
errors?

For example,

/* checkpatch_ignore_(rulename) */
(Long line that can't be broken here)


> 
> An even better way is to add
> 
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> 
> before any #include and change the format to:
> 
> 		pr_err("%d: binder_alloc_buf failed to map pages in userspace, no vma\n",
> 		       proc->pid);
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



  reply	other threads:[~2012-10-21  2:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 22:33 [PATCH 1/2] staging: android: checkpatch.pl fixes Ken O'Brien
2012-10-20 22:33 ` [PATCH 2/2] staging: android: binder.c: checkpatch.pl Ken O'Brien
2012-10-21  1:05 ` [PATCH 1/2] staging: android: checkpatch.pl fixes Joe Perches
2012-10-21  2:05   ` Cruz Julian Bishop [this message]
2012-10-21  2:09     ` Joe Perches
2012-10-22  9:37 ` David Howells
2012-10-22 12:15   ` Joe Perches
2012-10-22 13:02     ` Peter Hurley
2012-10-22 13:16       ` [PATCH] checkpatch: Warn on unnecessary line continuations Joe Perches
2012-10-22 16:45         ` Joe Perches
2012-10-28  4:46           ` [PATCH v2] " Joe Perches
2012-10-22 20:03 ` [PATCH 1/2] staging: android: checkpatch.pl fixes Greg KH
2012-10-24 14:48   ` kernel kernel

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=1350785121.12361.2.camel@CruzBishop-ASPIRE \
    --to=cruzjbishop@gmail.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dhowells@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=kernel@kenobrien.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swetland@google.com \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.