lkml.org 
[lkml]   [2016]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] qed: Add and use specific logging functions to reduce object size
From
Date
On Tue, 2016-07-26 at 14:25 -0700, Joe Perches wrote:
> Current DP_ macros generate a lot of code.
> Using functions with vsprintf extension %pV helps reduce that size.

Yuval, I used the same KERN_<LEVEL> output types, but it
is unusual that DP_INFO outputs at KERN_NOTICE.

Was that a copy/paste defect or should it be emitted at
KERN_INFO and DP_VERBOSE be emitted at KERN_DEBUG?

> define DP_INFO(cdev, fmt, ...)       \
> - do {       \
> - if (unlikely((cdev)->dp_level <= QED_LEVEL_INFO)) {   \
> - pr_notice("[%s:%d(%s)]" fmt,       \
> -   __func__, __LINE__,       \
> -   DP_NAME(cdev) ? DP_NAME(cdev) : "", \
> -   ## __VA_ARGS__);       \
> - }       \
> - } while (0)
[]
> -#define DP_VERBOSE(cdev, module, fmt, ...) \
> - do { \
> - if (unlikely(((cdev)->dp_level <= QED_LEVEL_VERBOSE) && \
> -      ((cdev)->dp_module & module))) { \
> - pr_notice("[%s:%d(%s)]" fmt, \
> -   __func__, __LINE__, \
> -   DP_NAME(cdev) ? DP_NAME(cdev) : "", \
> -   ## __VA_ARGS__); \
> - } \
> - } while (0)

\
 
 \ /
  Last update: 2016-07-27 04:01    [W:0.591 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site