drivers: hv: vmbus: Fix checkpatch SPLIT_STRING
Checkpatch emits WARNING: quoted string split across lines. To keep the code clean and with the 80 column length indentation the check and registration code for kmsg_dump_register has been transferred to a new function hv_kmsg_dump_register. Signed-off-by: Matheus Castello <matheus@castello.eng.br> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20201125032926.17002-1-matheus@castello.eng.br Signed-off-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
Родитель
206ad34d52
Коммит
b0c03eff79
|
@ -1387,6 +1387,24 @@ static struct kmsg_dumper hv_kmsg_dumper = {
|
||||||
.dump = hv_kmsg_dump,
|
.dump = hv_kmsg_dump,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void hv_kmsg_dump_register(void)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
hv_panic_page = hv_alloc_hyperv_zeroed_page();
|
||||||
|
if (!hv_panic_page) {
|
||||||
|
pr_err("Hyper-V: panic message page memory allocation failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = kmsg_dump_register(&hv_kmsg_dumper);
|
||||||
|
if (ret) {
|
||||||
|
pr_err("Hyper-V: kmsg dump register error 0x%x\n", ret);
|
||||||
|
hv_free_hyperv_page((unsigned long)hv_panic_page);
|
||||||
|
hv_panic_page = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static struct ctl_table_header *hv_ctl_table_hdr;
|
static struct ctl_table_header *hv_ctl_table_hdr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1477,21 +1495,8 @@ static int vmbus_bus_init(void)
|
||||||
* capability is supported by the hypervisor.
|
* capability is supported by the hypervisor.
|
||||||
*/
|
*/
|
||||||
hv_get_crash_ctl(hyperv_crash_ctl);
|
hv_get_crash_ctl(hyperv_crash_ctl);
|
||||||
if (hyperv_crash_ctl & HV_CRASH_CTL_CRASH_NOTIFY_MSG) {
|
if (hyperv_crash_ctl & HV_CRASH_CTL_CRASH_NOTIFY_MSG)
|
||||||
hv_panic_page = (void *)hv_alloc_hyperv_zeroed_page();
|
hv_kmsg_dump_register();
|
||||||
if (hv_panic_page) {
|
|
||||||
ret = kmsg_dump_register(&hv_kmsg_dumper);
|
|
||||||
if (ret) {
|
|
||||||
pr_err("Hyper-V: kmsg dump register "
|
|
||||||
"error 0x%x\n", ret);
|
|
||||||
hv_free_hyperv_page(
|
|
||||||
(unsigned long)hv_panic_page);
|
|
||||||
hv_panic_page = NULL;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
pr_err("Hyper-V: panic message page memory "
|
|
||||||
"allocation failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
register_die_notifier(&hyperv_die_block);
|
register_die_notifier(&hyperv_die_block);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче