linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Víctor M. Jáquez L." <vjaquez@igalia.com>
To: Joe Perches <joe@perches.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	"Ramirez Luna, Omar" <omar.ramirez@ti.com>,
	devel@driverdev.osuosl.org, Greg Kroah-Hartman <gregkh@suse.de>,
	Ivan Gomez Castellanos <ivan.gomez@ti.com>,
	Armando Uribe <x0095078@ti.com>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 3/5] staging: tidspbridge: Lindent to drv_interface.c
Date: Mon, 30 Jan 2012 21:33:12 +0100	[thread overview]
Message-ID: <20120130203312.GA3296@lit.local.igalia.com> (raw)
In-Reply-To: <1327953180.25132.39.camel@joe2Laptop>

On Mon, Jan 30, 2012 at 11:53:00AM -0800, Joe Perches wrote:
> On Mon, 2012-01-30 at 22:29 +0300, Dan Carpenter wrote:
> > On Mon, Jan 30, 2012 at 11:25:34AM -0600, Ramirez Luna, Omar wrote:
> > > > +                       pr_info("%s:%d handle(s) still opened\n", __func__,
> > > > +                               atomic_read(&bridge_cref));
> > > I remember the rule was to break lines as far to the right as
> > > possible, no? Chapter 2 CodingStyle, same for the other similar
> > > changes.
> > It doesn't mean you have to right justify things, it just means
> > indented.  The original code is fine here and the new code is fine
> > here.  It's up to whoever writes the code to decide.
> 
> I concur.
> 
> My personal preference is to use a new line after the format
> string if necessary.
> 
> ie:
> 	pr_<level>("fmt\n"[, args to 80 columns if all fit])
> or
> 	pr_<level>("fmt\n",
> 		   args when single line exceeds 80 columns);
> 
> So for this case:
> 			pr_info("%s:%d handle(s) still opened\n",
> 				__func__, atomic_read(&bridge_cref));
> 
> I've done a patch here to tidspbridge that standardizes
> printk output.
> 
> Basically, the patch adds
> #define pr_fmt(fmt) KBUILD_MODNAME "%s: ", __func__
> to prefix "tidspbridge:%s:", removes the leading
> "%s:...",  __func__ from the uses, coalesces
> formats and does argument alignment.
> 
> It cleans up the DBC_ASSERT, DBC_REQUIRE and DBC_ENSURE
> macros too.

hehehe... I also have one for this... But I prefer yours: I'm a newbie :)

vmjl

> 
> I'm waiting for the Makefile change and whatever
> patches Víctor produces to be applied.  I'll then
> redo my patch and submit it.
> 
> 
> 

  reply	other threads:[~2012-01-30 20:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 20:09 [PATCH 0/5] staging: tidspbridge: clean up drv_interface.c Víctor Manuel Jáquez Leal
2012-01-23 20:09 ` [PATCH 1/5] staging: tidspbridge: more readable code Víctor Manuel Jáquez Leal
2012-01-24 18:22   ` Felipe Contreras
2012-01-30 17:14     ` Ramirez Luna, Omar
2012-01-23 20:09 ` [PATCH 2/5] staging: tidspbridge: remove unused header Víctor Manuel Jáquez Leal
2012-01-24 17:45   ` Felipe Contreras
2012-01-30 17:15     ` Ramirez Luna, Omar
2012-01-23 20:09 ` [PATCH 3/5] staging: tidspbridge: Lindent to drv_interface.c Víctor Manuel Jáquez Leal
2012-01-30 17:25   ` Ramirez Luna, Omar
2012-01-30 17:59     ` Víctor M. Jáquez L.
2012-01-30 19:29     ` Dan Carpenter
2012-01-30 19:53       ` Joe Perches
2012-01-30 20:33         ` Víctor M. Jáquez L. [this message]
2012-01-30 20:40           ` Joe Perches
2012-01-23 20:09 ` [PATCH 4/5] staging: tidspbridge: silence the compiler Víctor Manuel Jáquez Leal
2012-01-30 17:28   ` Ramirez Luna, Omar
2012-01-23 20:09 ` [PATCH 5/5] staging: tidspbridge: remove header inclusions Víctor Manuel Jáquez Leal

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=20120130203312.GA3296@lit.local.igalia.com \
    --to=vjaquez@igalia.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=ivan.gomez@ti.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --cc=x0095078@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).