lkml.org 
[lkml]   [2019]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] ipmi: use %*ph to print small buffer
On Fri, Oct 11, 2019 at 08:18:41AM -0700, Joe Perches wrote:
> On Fri, 2019-10-11 at 18:12 +0300, Andy Shevchenko wrote:
> > On Fri, Oct 11, 2019 at 07:58:14AM -0700, Joe Perches wrote:
> > > On Fri, 2019-10-11 at 17:52 +0300, Andy Shevchenko wrote:

> > > > static void ipmi_debug_msg(const char *title, unsigned char *data,
...
> > > > + pr_debug("%s: %*ph\n", title, len, buf);
...
> > > > #else
> > > > static void ipmi_debug_msg(const char *title, unsigned char *data,

> > > Now you might as well remove the #ifdef DEBUG above this
> > > and the empty function in the #else too.
> >
> > It's up to maintainer.
>
> That's like suggesting any function with a single pr_debug
> should have another duplicative empty function without.
>
> Using code like the below is not good form as it's prone
> to defects when the arguments in one block is changed but
> not the other.
>
> Also the first form doesn't work with dynamic debug.

I'm surprised to see my name in To:. I guess you intended to explain this to
Corey. I'm fine with either, since I have no idea what is in the IPMI going on.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2019-10-11 17:36    [W:0.066 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site