Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp298040rwd; Tue, 6 Jun 2023 23:28:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4rc1eyRS2w2IXIyNRwRqOmFj7mAoEkHrl/cRDPXPV3HaSKYogZBSlWIZSj0ih6Z74jXxia X-Received: by 2002:a05:6a20:68aa:b0:10c:ef18:7473 with SMTP id n42-20020a056a2068aa00b0010cef187473mr892149pzj.56.1686119314888; Tue, 06 Jun 2023 23:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686119314; cv=none; d=google.com; s=arc-20160816; b=w0GxYakL7+bCEo9EZhx6tDvHHE38z2thZ2QLQymcEm8BXegJ8XwOGZ+h1m9cHFbQbY 9r3lCvxN9kWhtTE+3RManc11xdA6MM/mDdHUf2f8lqQe8PH9IloYWd0HaeravYbNH1Dx Zu9z7ujb322Y+knFSmKGpe/bFpTheRFgDWc9v41xhpQYkDhPF6yMaGHlFhfHV7FwupqN KpSFiAUVHo6TMH/90gLl24+/Cprqmj3ROY21UaQXCUYazS7giaikmMJw0CXHDD35BPV2 Y5XNqHMc1VW+cIjMMvL6+4LTFBt6ajd6EYWp4HTBg7MphnClgGBFsbwqtrA2NsWTqvjk 9zWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:hmm_source_type:hmm_attache_num :hmm_source_ip; bh=XTrVyb0p00AOpPi2sQBf27zC43GaW5sVX+btdMEZX+w=; b=WHqAw96ov/PCSm65HtgrO3mcUBV1TT8RWPeLA7bv2hVljU/mXgQo5xs/wXU0Don/g5 2HWMtx5JRkXQfM/ZX8uksi2SjZRVNOIo10Ce5/9SXcmHIgolc3eQ1cK/uYKZz3ViCG8O 48quznZdDE+PEhwX7GDX0hN1m8Y1EPnql2aoEm54wxB2i9Jf3036A8yZoydkE4bx+H0h E8uRP59PHs9yFOKLGR5fYFTH6uuqUX/6u5VwnAJ0b419YnbDvL059tDgbGGzkLusAx4g cwO3rFFywR7Gw1ywwvtvDrjNm5SF2R3+3CTQLiKbSCdoaEu+hN9JmORBlkjUMPY82y8u mW1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a170902ee5300b001ae4c3bbb0dsi8229254plo.145.2023.06.06.23.28.21; Tue, 06 Jun 2023 23:28:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234283AbjFGGQp (ORCPT + 99 others); Wed, 7 Jun 2023 02:16:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234075AbjFGGQo (ORCPT ); Wed, 7 Jun 2023 02:16:44 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 34B68AA; Tue, 6 Jun 2023 23:16:41 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.43:37502.551464108 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.43]) by 189.cn (HERMES) with SMTP id 0EAFE1002C5; Wed, 7 Jun 2023 14:16:34 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-75648544bd-7vx9t with ESMTP id 63d46740575b4bae9c59180969e45e00 for helgaas@kernel.org; Wed, 07 Jun 2023 14:16:39 CST X-Transaction-ID: 63d46740575b4bae9c59180969e45e00 X-Real-From: 15330273260@189.cn X-Receive-IP: 114.242.206.180 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn Message-ID: Date: Wed, 7 Jun 2023 14:16:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [Intel-gfx] [PATCH v2 1/2] vgaarb: various coding style and comments fix Content-Language: en-US To: Bjorn Helgaas Cc: Alex Deucher , Christian Konig , Pan Xinhui , David Airlie , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Ben Skeggs , Karol Herbst , Lyude Paul , Bjorn Helgaas , Alex Williamson , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Hawking Zhang , Mario Limonciello , Lijo Lazar , YiPeng Chai , Andrey Grodzovsky , Somalapuram Amaranath , Bokun Zhang , Ville Syrjala , Li Yi , Sui Jingfeng , Jason Gunthorpe , Kevin Tian , Cornelia Huck , Yishai Hadas , Abhishek Sahu , Yi Liu , kvm@vger.kernel.org, nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, loongson-kernel@lists.loongnix.cn, amd-gfx@lists.freedesktop.org, linux-pci@vger.kernel.org References: <20230606194921.GA1139774@bhelgaas> From: Sui Jingfeng <15330273260@189.cn> In-Reply-To: <20230606194921.GA1139774@bhelgaas> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_LOCAL_DIGITS, FROM_LOCAL_HEX,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2023/6/7 03:49, Bjorn Helgaas wrote: > Match the subject line style: > > $ git log --oneline drivers/pci/vgaarb.c > f321c35feaee PCI/VGA: Replace full MIT license text with SPDX identifier > d5109fe4d1ec PCI/VGA: Use unsigned format string to print lock counts > 4e6c91847a7f PCI/VGA: Log bridge control messages when adding devices > dc593fd48abb PCI/VGA: Remove empty vga_arb_device_card_gone() > ... > > Subject line should be a summary of the commit log, not just "various > style fixes". This one needs to say something about > vga_str_to_iostate(). Ok, thanks for the educating . > On Mon, Jun 05, 2023 at 04:58:30AM +0800, Sui Jingfeng wrote: >> From: Sui Jingfeng >> >> To keep consistent with vga_iostate_to_str() function, the third argument >> of vga_str_to_iostate() function should be 'unsigned int *'. >> >> Signed-off-by: Sui Jingfeng >> --- >> drivers/pci/vgaarb.c | 29 +++++++++++++++-------------- >> include/linux/vgaarb.h | 8 +++----- >> 2 files changed, 18 insertions(+), 19 deletions(-) >> >> diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c >> index 5a696078b382..e40e6e5e5f03 100644 >> --- a/drivers/pci/vgaarb.c >> +++ b/drivers/pci/vgaarb.c >> @@ -61,7 +61,6 @@ static bool vga_arbiter_used; >> static DEFINE_SPINLOCK(vga_lock); >> static DECLARE_WAIT_QUEUE_HEAD(vga_wait_queue); >> >> - >> static const char *vga_iostate_to_str(unsigned int iostate) >> { >> /* Ignore VGA_RSRC_IO and VGA_RSRC_MEM */ >> @@ -77,10 +76,12 @@ static const char *vga_iostate_to_str(unsigned int iostate) >> return "none"; >> } >> >> -static int vga_str_to_iostate(char *buf, int str_size, int *io_state) >> +static int vga_str_to_iostate(char *buf, int str_size, unsigned int *io_state) >> { >> - /* we could in theory hand out locks on IO and mem >> - * separately to userspace but it can cause deadlocks */ >> + /* >> + * we could in theory hand out locks on IO and mem >> + * separately to userspace but it can cause deadlocks >> + */ > Omit all the comment formatting changes. They are distractions from the > vga_str_to_iostate() parameter change. > > I think this patch should be the single line change to the > vga_str_to_iostate() prototype so it matches the callers. > > If you want to do the other comment formatting changes, they're fine, > but they should be all together in a separate patch that clearly > doesn't change the generated code. Ok, no problem. Will be improved at next version. > Bjorn