Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3272034pxu; Sun, 29 Nov 2020 21:46:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzm/2QlT/L7FHLASGOXw2DSQhIbvZb3GhnDM7ckWWKtaMwT0wSznNen0v6MSI/iiOKB7DtP X-Received: by 2002:a17:906:c312:: with SMTP id s18mr19415132ejz.185.1606715164113; Sun, 29 Nov 2020 21:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606715164; cv=none; d=google.com; s=arc-20160816; b=b5G+a+VL0sJeisGW8WUo4oyGKdyMjFUD1uVEC0Qqk11EBNCm9ML2F/zbesX2lnYJkR 9PQ2ZbxQQM4sbWNqah93f/bzx1pAKcNDDp/zFoTm4nLIsT9vz0zsKAVKpAPdIGThuYpP ghxoSK+Ex0R7VtbVPnAI/UGIUxLMEtMYKNDkTkfNKH/0PKZ2z83geSeddnqGgg40FSWr 3vOvcn31OCS/LFE7DlIlPCp+mEWssnuMFDvrQm1L6lyfzD8Ye5I2zsg75LwflQ6Cshib j03HkNCtXSqNRZY7WhplIgJE8KTXpOzSrPjIjmvT3hMVDPMKPPasU9KlIBb7ihSBeiL/ AvoQ== 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:subject:cc:to:from:date :dkim-signature; bh=bdS70gXd6NjO8SbeScRYWAUs0FvLky5tBnpx1qPIKhg=; b=sFxa7wtqgY3b9zmKVvsBJqHBgxQt6rdesemLqX66ZIxo4lYiQAXMzOEtrOJNGeHRE7 4Ye2ahKdhF+U8D28/uAdPdbzJ65Nbu/cBO+gOgovGCxg1HiGL6vqkIqnpgbalAcQ6BZm 1QPqdNI/6BG9fcExNgglT1NRbenfXHvYxKZ3C3u+8H7iCWwnzoJF0nq535bfEFN4GcTM gXeYhZPFgRsrTKDvA31qQvE/3kybMienA0aGTDhp4T6fBurMM3CViqGfqNTVfCpBjaCy ECB/Ox62CHweiH9T/6MGFzfr007Wvqp6S2Kf+vFy9LK2rJn2yEyBXbMynT4Oxv6kzdOy Srrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b="v0/iAOyY"; 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 89si10522103edc.413.2020.11.29.21.45.40; Sun, 29 Nov 2020 21:46:04 -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=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b="v0/iAOyY"; 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 S1726623AbgK3FoN (ORCPT + 99 others); Mon, 30 Nov 2020 00:44:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbgK3FoN (ORCPT ); Mon, 30 Nov 2020 00:44:13 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D4EC0613CF for ; Sun, 29 Nov 2020 21:43:32 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id l17so9440443pgk.1 for ; Sun, 29 Nov 2020 21:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bdS70gXd6NjO8SbeScRYWAUs0FvLky5tBnpx1qPIKhg=; b=v0/iAOyYNNDCrOXv0Yl+FIoz5ptSm+333Uec0gAeGaU69pZ+FfMinBs02PIIWf0lpY i/p8JzzlUxVkyPd8+7VqjzK4GKPQ7cba81HNCWCCrMczZs9Vk2xMJ8GGEDlIbBnseQNC quf+iP3yMpZnbstOPZ1IVjN7BcFHUmDdQTR8n9hGxc3rMZgp4RR4BESMRNNbrC8UHkHX K5Dp6XAnMy9G5YRQcrfZ7aDAhbiZWS0qExr6TJGMB8QqY3r99K1lYwRaLWymyEplLK/D 1RT9nmyBv5U8muMLfQpEm1S3o32zGqzuBNoR4kghsvep593XjE2lvT0GHKqOh0RROfd8 KyOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bdS70gXd6NjO8SbeScRYWAUs0FvLky5tBnpx1qPIKhg=; b=Qe9nLrwgDI3JfYPR4Ic7qAj+/qUfSjqeQCwu2q7mJGKCDoU1JMew1y0eJ3gwLglZ77 PKiaPIeCpZ1KnD6BRpGP0hJSi/r4ldeIwrT9p+/LCft+xY9B3Ubu2rKrO+iWePRwwKK6 vKF/GcaE3UUrZ6vOSr7H4LDdc9lq98Rxv+Kgd+DA0iLleMxkoHyiMfHkMQmSLc94OxDa wQqvKNKRxkZFe479m4hBPNApO/QU0k2RSMm2iBwLsMjaHOE9PuGDoIfp+EnBUDjqrDtv T0SrmpObK61uV0lk3uABz2QrjO2Lh+iuLAZr86XdJtiWC+1SfTIsbZlCs01evtgPQoIC UvdQ== X-Gm-Message-State: AOAM531uS/4gYAOSRgegYf+fkAbFafEs7cTuu8rv1LdGEYtWRkl4jW+h YFMcQ/kdT144cmPS1akT6gWN/Q== X-Received: by 2002:aa7:86d8:0:b029:18b:585b:3b16 with SMTP id h24-20020aa786d80000b029018b585b3b16mr16955307pfo.72.1606715012561; Sun, 29 Nov 2020 21:43:32 -0800 (PST) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id nk11sm16135432pjb.26.2020.11.29.21.43.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2020 21:43:32 -0800 (PST) Date: Sun, 29 Nov 2020 21:43:28 -0800 From: Stephen Hemminger To: "Michael Kelley" Cc: "Matheus Castello" , , , "KY Srinivasan" , "Haiyang Zhang" , "Stephen Hemminger" , , "Tianyu Lan" , "Dexuan Cui" , "Sunil Muthuswamy" , , Subject: Re: [PATCH v3 4/6] drivers: hv: vmbus: Fix checkpatch SPLIT_STRING Message-ID: <20201129214328.254372dd@hermes.local> In-Reply-To: References: <20201125032926.17002-1-matheus@castello.eng.br> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 29 Nov 2020 08:51:47 -0800 "Michael Kelley" wrote: > From: Matheus Castello 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 > > --- > > 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(); I know you just copy/pasted the original code, but one other thing. Doesn't it already return void *? arch/x86/include/asm/mshyperv.h:void *hv_alloc_hyperv_zeroed_page(void); > > + 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 >