From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752926AbbLHV2e (ORCPT ); Tue, 8 Dec 2015 16:28:34 -0500 Received: from mail.kernel.org ([198.145.29.136]:50604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752892AbbLHV2c (ORCPT ); Tue, 8 Dec 2015 16:28:32 -0500 MIME-Version: 1.0 In-Reply-To: <1449594231.13275.2.camel@perches.com> References: <1449590868-19070-1-git-send-email-yamada.masahiro@socionext.com> <1449591386.3315.2.camel@perches.com> <1449594231.13275.2.camel@perches.com> From: Rob Herring Date: Tue, 8 Dec 2015 15:28:10 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] of/address: replace printk() with pr_debug() / pr_err() To: Joe Perches Cc: Masahiro Yamada , "devicetree@vger.kernel.org" , Frank Rowand , "linux-kernel@vger.kernel.org" , Grant Likely Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 8, 2015 at 11:03 AM, Joe Perches 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