lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1327953180.25132.39.camel@joe2Laptop>
Date:	Mon, 30 Jan 2012 11:53:00 -0800
From:	Joe Perches <joe@...ches.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	"Ramirez Luna, Omar" <omar.ramirez@...com>,
	Víctor Manuel Jáquez
	 Leal <vjaquez@...lia.com>, devel@...verdev.osuosl.org,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Ivan Gomez Castellanos <ivan.gomez@...com>,
	Armando Uribe <x0095078@...com>, linux-kernel@...r.kernel.org,
	linux-omap@...r.kernel.org
Subject: Re: [PATCH 3/5] staging: tidspbridge: Lindent to drv_interface.c

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.

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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ