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]
Date:	Tue, 8 Dec 2015 15:28:10 -0600
From:	Rob Herring <robh+dt@...nel.org>
To:	Joe Perches <joe@...ches.com>
Cc:	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Frank Rowand <frowand.list@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Grant Likely <grant.likely@...aro.org>
Subject: Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err()

On Tue, Dec 8, 2015 at 11:03 AM, Joe Perches <joe@...ches.com> wrote:
> On Tue, 2015-12-08 at 08:16 -0800, Joe Perches wrote:
>> On Wed, 2015-12-09 at 01:07 +0900, Masahiro Yamada wrote:
>> > Trivial changes suggested by checkpatch.pl.
>> []
>> > diff --git a/drivers/of/address.c b/drivers/of/address.c
>> []
>> > @@ -23,7 +23,7 @@ static int __of_address_to_resource(struct device_node *dev,
>> >  #ifdef DEBUG
>> >  static void of_dump_addr(const char *s, const __be32 *addr, int na)
>> >  {
>> > -   printk(KERN_DEBUG "%s", s);
>> > +   pr_debug("%s", s);
>> >     while (na--)
>> >             printk(" %08x", be32_to_cpu(*(addr++)));
>> >     printk("\n");
>>
>> mixing pr_debug and printk doesn't make much sense.
>>
>> It might be nicer to use
>>
>> static void of_dumpaddr(const char *s, const __be32 *addr, int na)
>> {
>> #ifdef DEBUG
>>       ...
>> #endif
>> }
>>
>> to avoid the other static declaration
>
> Or more simply:
>
> static void of_dumpaddr(const char *s, const __be32 *addr, int na)
> {
>         print_hex_dump_debug(s, DUMP_PREFIX_NONE, 16, 1,
>                              addr, na * sizeof(__be32), false);
> }

Except that it doesn't do the endian swapping. Looking closer at this,
we should just drop this hunk. So I will take v1.

Rob
--
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