Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1286646

Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err()

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err()
Date 2015-12-08 17:20 +0100
Message-ID <qDt9E-4CC-27@gated-at.bofh.it> (permalink)
References <qDsZZ-4yl-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-12-08 17:10 +0100
  Re: [PATCH v2] of/address: replace printk() with pr_debug() /  pr_err() Joe Perches <joe@perches.com> - 2015-12-08 17:20 +0100
    Re: [PATCH v2] of/address: replace printk() with pr_debug() /  pr_err() Joe Perches <joe@perches.com> - 2015-12-08 18:10 +0100
      Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Rob Herring <robh+dt@kernel.org> - 2015-12-08 22:30 +0100
        Re: [PATCH v2] of/address: replace printk() with pr_debug() /  pr_err() Joe Perches <joe@perches.com> - 2015-12-09 01:10 +0100
          Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-09 13:10 +0100
            Re: [PATCH v2] of/address: replace printk() with pr_debug() /  pr_err() Joe Perches <joe@perches.com> - 2015-12-09 20:30 +0100
              Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-09 21:10 +0100
                Re: [PATCH v2] of/address: replace printk() with pr_debug() /  pr_err() Joe Perches <joe@perches.com> - 2015-12-09 21:20 +0100
                Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-12-09 21:20 +0100
                Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-09 21:40 +0100
                Re: [PATCH v2] of/address: replace printk() with pr_debug() /  pr_err() Joe Perches <joe@perches.com> - 2015-12-09 21:50 +0100
        [PATCH] hexdump: Add ability to do endian conversions in print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-09 23:00 +0100
          Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Andrew Morton <akpm@linux-foundation.org> - 2015-12-09 23:10 +0100
            Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-09 23:20 +0100
              Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Andrew Morton <akpm@linux-foundation.org> - 2015-12-09 23:50 +0100
                Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-10 00:10 +0100
          Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-09 23:20 +0100
            Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-09 23:30 +0100
            Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-10 00:10 +0100
              Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-10 00:20 +0100
          Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions kbuild test robot <lkp@intel.com> - 2015-12-10 07:00 +0100
            Re: [PATCH] hexdump: Add ability to do endian conversions in  print_hex_dump functions Joe Perches <joe@perches.com> - 2015-12-10 07:30 +0100

csiph-web