s390/s390dbf: use debug_level_enabled() where applicable
Refactor direct debug level comparisons with the (internal) s390db->level member. Use the debug_level_enabled() function instead. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
f1d86b61fb
commit
8e6a828566
@@ -105,15 +105,9 @@ MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver");
|
||||
|
||||
DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf);
|
||||
|
||||
/* Allow to sort out low debug levels early to avoid wasted sprints */
|
||||
static inline int iucv_dbf_passes(debug_info_t *dbf_grp, int level)
|
||||
{
|
||||
return (level <= dbf_grp->level);
|
||||
}
|
||||
|
||||
#define IUCV_DBF_TEXT_(name, level, text...) \
|
||||
do { \
|
||||
if (iucv_dbf_passes(iucv_dbf_##name, level)) { \
|
||||
if (debug_level_enabled(iucv_dbf_##name, level)) { \
|
||||
char* __buf = get_cpu_var(iucv_dbf_txt_buf); \
|
||||
sprintf(__buf, text); \
|
||||
debug_text_event(iucv_dbf_##name, level, __buf); \
|
||||
|
Reference in New Issue
Block a user