All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: monstr@seznam.cz
Cc: Joe Perches <joe@perches.com>,
	paulus@samba.org, arnd@arndb.de, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org
Subject: Re: [PATCH 1/2] OF: clean coding style - prom_parse.c
Date: Sun, 04 May 2008 17:51:53 +0200	[thread overview]
Message-ID: <481DDB99.2090209@gmail.com> (raw)
In-Reply-To: <481D711E.6000003@seznam.cz>

On 05/04/2008 10:17 AM, Michal Simek wrote:
> Hi All,
> 
> I fixed only part of coding style violation. Not all of them.

Actually, you introduced a bug. See:
http://lkml.org/lkml/2008/5/3/141

You should have used KERN_CONT, or even better sprintf and friends to be atomic 
in logs.

> But you are right KERN_<level> is necessary.
> 
> For me is especially important to move these files from arch/powerpc to drivers/of.
> 
> M
> 
>>>  /* Debug utility */
>>>  #ifdef DEBUG
>>>  static void of_dump_addr(const char *s, const u32 *addr, int na)
>>>  {
>>> -	printk("%s", s);
>>> -	while(na--)
>>> -		printk(" %08x", *(addr++));
>>> -	printk("\n");
>>> +	printk(KERN_INFO "%s", s);
>>> +	while (na--)
>>> +		printk(KERN_INFO " %08x", *(addr++));
>>> +	printk(KERN_INFO "\n");
>>>  }
>> You've prefixed KERN_INFO before every address block.
>>
>> How about:
>>
>> print_hex_dump(KERN_<level>, s, DUMP_PREFIX_NONE, 4, addr, na, false);

  reply	other threads:[~2008-05-04 15:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-03 15:13 Clean PROM_PARSE.C file monstr
2008-05-03 15:13 ` [PATCH 1/2] OF: clean coding style - prom_parse.c monstr
2008-05-03 15:13   ` [PATCH 2/2] OF: move prom_parse to drivers/of folder monstr
2008-05-03 17:25   ` [PATCH 1/2] OF: clean coding style - prom_parse.c Jiri Slaby
2008-05-03 17:26   ` Joe Perches
2008-05-04  8:17     ` Michal Simek
2008-05-04 15:51       ` Jiri Slaby [this message]
2008-05-04 16:18         ` Michal Simek

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=481DDB99.2090209@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=arnd@arndb.de \
    --cc=joe@perches.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monstr@seznam.cz \
    --cc=paulus@samba.org \
    /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.