Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2647983pxb; Sun, 15 Nov 2020 12:27:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9qKqY/46PQSCsOW4pT13HW8eheZB6GDmWJiCMgWiAe8N2lV5Nwx2YXNjynnDrxJJAI3yz X-Received: by 2002:a17:906:6c93:: with SMTP id s19mr12250528ejr.544.1605472059303; Sun, 15 Nov 2020 12:27:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605472059; cv=none; d=google.com; s=arc-20160816; b=ZZd6u8iWlqoavwFhAxcYzYSw10jWOMNe9EKkOztP1EYdMYDuCnDe33yZdSFQF8nasR dZM3M5BbsWbMXaLBofK975jCMkFzddF/xcym4DD3RcT8rnbVTUwqPbScYeJpcdCUDv7k iCWoN2gSd9iVZ4Cz/t8VIPWmihmxjLNFVbfVkEASPgNCa2tyKHIlQ61zk+kcz6PKomc1 lVc7Q0JE5PmwegnBwvMJfef/MbZub9MKEKmus2WfO+FZyUdkG2xppD1nXx4FbQ5AG0kG 1Fy7gEewfa12+MwYYwd8wwV5gUowCT5HYiRgvCiahU0ug6ts+Fk10MzCn14JrQLvW/vU OKSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C6X59wyPVRlF1KUI8WrlY0BS6G519N9srE9MF7rS9Mg=; b=yKZaK7s86g2/H9shauMwFkZS0B9dAivvhNbGpeQ/O3Ent+YlYARTOOCC+RsMtaELp0 LwGPwlajeqMs/q4VwS1pg83izRPpRr0OvMLSzWTxWsgsgMMyxkv88Xd/B2AyNmVCrOfH EULaHTgQNMvo4HzfG0J60ZKg18hycsJw1W5LHPfRNdDqugIi9wnuCYSYwgEA5ASgk+7P SaTLZ4kVcBygqyUXhiWO+JM0jxdm2M9TEVs8/N+sYYeSsCqAc9Kszn8X4ubhaWlw/Tfu E//VNAPj65H6RwGeL+7kV0dFyCNMMj9jgLAO3aaoxcDqquT7yzSDufFKukvJtTQ2ZB29 zfSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@castello.eng.br header.s=default header.b=QXk+q6y9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si7817077edy.568.2020.11.15.12.27.17; Sun, 15 Nov 2020 12:27:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@castello.eng.br header.s=default header.b=QXk+q6y9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727736AbgKOUWs (ORCPT + 99 others); Sun, 15 Nov 2020 15:22:48 -0500 Received: from gateway21.websitewelcome.com ([192.185.45.175]:30645 "EHLO gateway21.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727375AbgKOUWr (ORCPT ); Sun, 15 Nov 2020 15:22:47 -0500 X-Greylist: delayed 1454 seconds by postgrey-1.27 at vger.kernel.org; Sun, 15 Nov 2020 15:22:46 EST Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 797F5400CE383 for ; Sun, 15 Nov 2020 13:58:32 -0600 (CST) Received: from br164.hostgator.com.br ([192.185.176.180]) by cmsmtp with SMTP id eOASkZ2TCYLDneOASkcg8m; Sun, 15 Nov 2020 13:58:32 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=castello.eng.br; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=C6X59wyPVRlF1KUI8WrlY0BS6G519N9srE9MF7rS9Mg=; b=QXk+q6y9FHie5C8vLRGSEklwL4 cokCfFhiAO/2Nco1WiQpAA68vCwMJ0rSQxDnVnn9rByRwRvEEjLH6mUilVIZGhk2ess5cDyEocHkM ut1GwhuW+vv/o8gfp12+nTFwTSSpivrv7e6S3ZhzT9OiBgx+IVYTEiRW5uzU7X7e8o/q9wzZ0lMUl clV7PaiaPUJgfwXpkYifLAhIc1rX9p5eQFBEOcg7eEythkFe5Kf9AocvaiHIdTeGJjJ2a3nDs3S0t haRvxvxwoo1HlQl5DavoUWMo2rgMF0/2m9UR83HC+4i7lAvxqP+1AQUe488aechVEjY0efMJY1X9H 5JMCUVQw==; Received: from 179-197-124-241.ultrabandalargafibra.com.br ([179.197.124.241]:50406 helo=DESKTOP-TKDJ6MU.localdomain) by br164.hostgator.com.br with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1keOAR-000kPb-U5; Sun, 15 Nov 2020 16:58:32 -0300 From: Matheus Castello To: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org Cc: sashal@kernel.org, Tianyu.Lan@microsoft.com, decui@microsoft.com, mikelley@microsoft.com, sunilmut@microsoft.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Matheus Castello Subject: [PATCH 4/6] drivers: hv: vmbus: Fix checkpatch SPLIT_STRING Date: Sun, 15 Nov 2020 16:57:32 -0300 Message-Id: <20201115195734.8338-5-matheus@castello.eng.br> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201115195734.8338-1-matheus@castello.eng.br> References: <20201115195734.8338-1-matheus@castello.eng.br> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - br164.hostgator.com.br X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - castello.eng.br X-BWhitelist: no X-Source-IP: 179.197.124.241 X-Source-L: No X-Exim-ID: 1keOAR-000kPb-U5 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 179-197-124-241.ultrabandalargafibra.com.br (DESKTOP-TKDJ6MU.localdomain) [179.197.124.241]:50406 X-Source-Auth: matheus@castello.eng.br X-Email-Count: 51 X-Source-Cap: Y2FzdGUyNDg7Y2FzdGUyNDg7YnIxNjQuaG9zdGdhdG9yLmNvbS5icg== X-Local-Domain: yes Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/hv/vmbus_drv.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 61d28c743263..09d8236a51cf 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -1387,6 +1387,23 @@ 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) { + 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"); + } +} + static struct ctl_table_header *hv_ctl_table_hdr; /* @@ -1477,21 +1494,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.28.0