dynamic_printk: reduce one level of indentation
Cleanup pr_debug_write() to reduce one level of indentation. Cc: Marcel Holtmann <marcel@holtmann.org> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0732b49c8c
commit
2e5ba26a48
1 changed files with 26 additions and 32 deletions
|
@ -277,13 +277,10 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
|
|||
dynamic_enabled = DYNAMIC_ENABLED_NONE;
|
||||
}
|
||||
err = 0;
|
||||
} else {
|
||||
if (elem) {
|
||||
} else if (elem) {
|
||||
if (value && (elem->enable == 0)) {
|
||||
dynamic_printk_enabled |=
|
||||
(1LL << elem->hash1);
|
||||
dynamic_printk_enabled2 |=
|
||||
(1LL << elem->hash2);
|
||||
dynamic_printk_enabled |= (1LL << elem->hash1);
|
||||
dynamic_printk_enabled2 |= (1LL << elem->hash2);
|
||||
elem->enable = 1;
|
||||
num_enabled++;
|
||||
dynamic_enabled = DYNAMIC_ENABLED_SOME;
|
||||
|
@ -301,16 +298,13 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
|
|||
dynamic_printk_enabled2 &=
|
||||
~(1LL << elem->hash2);
|
||||
if (num_enabled)
|
||||
dynamic_enabled =
|
||||
DYNAMIC_ENABLED_SOME;
|
||||
dynamic_enabled = DYNAMIC_ENABLED_SOME;
|
||||
else
|
||||
dynamic_enabled =
|
||||
DYNAMIC_ENABLED_NONE;
|
||||
dynamic_enabled = DYNAMIC_ENABLED_NONE;
|
||||
err = 0;
|
||||
printk(KERN_DEBUG
|
||||
"debugging disabled for module "
|
||||
"%s\n", elem->name);
|
||||
}
|
||||
"debugging disabled for module %s\n",
|
||||
elem->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue