lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW2PR2101MB105245D2BF9C9B5995D0188ED7F61@MW2PR2101MB1052.namprd21.prod.outlook.com>
Date:   Sun, 29 Nov 2020 16:51:47 +0000
From:   Michael Kelley <mikelley@...rosoft.com>
To:     Matheus Castello <matheus@...tello.eng.br>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        "joe@...ches.com" <joe@...ches.com>
CC:     KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "sashal@...nel.org" <sashal@...nel.org>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        Dexuan Cui <decui@...rosoft.com>,
        Sunil Muthuswamy <sunilmut@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 4/6] drivers: hv: vmbus: Fix checkpatch SPLIT_STRING

From: Matheus Castello <matheus@...tello.eng.br> Sent: Tuesday, November 24, 2020 7:29 PM
> 
> 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@...tello.eng.br>
> ---
> This is the V3 of patch 4 of the series "Add improvements suggested by
> checkpatch for vmbus_drv" with the changes suggested by Michael Kelley and
> Joe Perches. Thanks!
> ---
>  drivers/hv/vmbus_drv.c | 35 ++++++++++++++++++++---------------
>  1 file changed, 20 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 61d28c743263..edcc419ba328 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -1387,6 +1387,24 @@ static struct kmsg_dumper hv_kmsg_dumper = {
>  	.dump = hv_kmsg_dump,
>  };
> 
> +static void hv_kmsg_dump_register(void)
> +{
> +	int ret;
> +
> +	hv_panic_page = (void *)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;
> 
>  /*
> @@ -1477,21 +1495,8 @@ static int vmbus_bus_init(void)
>  		 * capability is supported by the hypervisor.
>  		 */
>  		hv_get_crash_ctl(hyperv_crash_ctl);
> -		if (hyperv_crash_ctl & HV_CRASH_CTL_CRASH_NOTIFY_MSG) {
> -			hv_panic_page = (void *)hv_alloc_hyperv_zeroed_page();
> -			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");
> -		}
> +		if (hyperv_crash_ctl & HV_CRASH_CTL_CRASH_NOTIFY_MSG)
> +			hv_kmsg_dump_register();
> 
>  		register_die_notifier(&hyperv_die_block);
>  	}
> --
> 2.29.2

Reviewed-by: Michael Kelley <mikelley@...rosoft.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ