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:
Wu Fengguang 2008-12-11 07:43:17 +08:00 коммит произвёл Greg Kroah-Hartman
Родитель 0732b49c8c
Коммит 2e5ba26a48
1 изменённых файлов: 26 добавлений и 32 удалений

Просмотреть файл

@ -277,40 +277,34 @@ static ssize_t pr_debug_write(struct file *file, const char __user *buf,
dynamic_enabled = DYNAMIC_ENABLED_NONE; dynamic_enabled = DYNAMIC_ENABLED_NONE;
} }
err = 0; err = 0;
} else { } else if (elem) {
if (elem) { if (value && (elem->enable == 0)) {
if (value && (elem->enable == 0)) { dynamic_printk_enabled |= (1LL << elem->hash1);
dynamic_printk_enabled |= dynamic_printk_enabled2 |= (1LL << elem->hash2);
(1LL << elem->hash1); elem->enable = 1;
dynamic_printk_enabled2 |= num_enabled++;
(1LL << elem->hash2); dynamic_enabled = DYNAMIC_ENABLED_SOME;
elem->enable = 1; err = 0;
num_enabled++; printk(KERN_DEBUG
dynamic_enabled = DYNAMIC_ENABLED_SOME; "debugging enabled for module %s\n",
err = 0; elem->name);
printk(KERN_DEBUG } else if (!value && (elem->enable == 1)) {
"debugging enabled for module %s\n", elem->enable = 0;
elem->name); num_enabled--;
} else if (!value && (elem->enable == 1)) { if (disabled_hash(elem->hash1, true))
elem->enable = 0; dynamic_printk_enabled &=
num_enabled--;
if (disabled_hash(elem->hash1, true))
dynamic_printk_enabled &=
~(1LL << elem->hash1); ~(1LL << elem->hash1);
if (disabled_hash(elem->hash2, false)) if (disabled_hash(elem->hash2, false))
dynamic_printk_enabled2 &= dynamic_printk_enabled2 &=
~(1LL << elem->hash2); ~(1LL << elem->hash2);
if (num_enabled) if (num_enabled)
dynamic_enabled = dynamic_enabled = DYNAMIC_ENABLED_SOME;
DYNAMIC_ENABLED_SOME; else
else dynamic_enabled = DYNAMIC_ENABLED_NONE;
dynamic_enabled = err = 0;
DYNAMIC_ENABLED_NONE; printk(KERN_DEBUG
err = 0; "debugging disabled for module %s\n",
printk(KERN_DEBUG elem->name);
"debugging disabled for module "
"%s\n", elem->name);
}
} }
} }
} }