Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3035490pxb; Thu, 10 Feb 2022 10:42:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzk8S2xg7cTBYiHvtLORZD1dyWpIvqxlFSS5hyDe+XMWTTb/y8WA/3UmaXhlWJMXBbcyWg X-Received: by 2002:a17:906:5185:: with SMTP id y5mr7461411ejk.34.1644518550107; Thu, 10 Feb 2022 10:42:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644518550; cv=none; d=google.com; s=arc-20160816; b=vHv/Uxbnihx3UHEonWKrvHpQI+rm40TqI7xRrdlZhq0cM+ZAfW0+uVT87SrfnK5sDL v8t238J6NWT9HRVxPqTwm6K9xcTb7MShuLWq41wF0+g0XvoZlowWbFqWKPffTf+fwcmb ea541E4J89Q75KMkoYIp7bSo2C7XtXfme7uKxEf9mN5l7o6nl5LB+u4MatdYX/PvRU0o c1o2LUd6dX1a74jHIXa5qCLoMP0Hakiv1ntBLNOcSp5OIxff4ZU8KBX42vDUVqdHwdRB EDo4tzkxrropkT/amhfSfeg3LFd+ZyXcO5JR3pjzbA/aWo9FNS7ipN1NyTT5e2eHU3yk vtIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=FTAdirp5u7kTPPTGGN6xaNHqqgo+3Ngm4ug8TFgRbao=; b=MymujU1c9Sm8BlR0wd9H/4oVphsI2UH0AtOPvY+RctnZWd0MU3N73vCyMJWCITQDra u/Nh6T7Ab5R7elWk6jIbAMNIpjf4CYrKS2A6JHvW6Y5UP8r2bm2tmkjB8RntNsHGTIqV JPgjrPVr5mt6wwhGCKEXqrr1q/VYk8rygSaVHt0koYop16jp0BRjTCuNc4SzRv4FqYPs ZifkO0eeKz0xByyNsomlMqS4WQnKlg3zmPh/38P8MbgwS+Ypn1fXOuiTrdEhz6B7sCJp zyu1bSgNZbGx3AEG5DOoYEHJWqG+YIOZQSzLoOi36pgpyVUwc69As7fGCFJijXOYTZsS 2WqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=NXxgxLaG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2si13397523ejs.394.2022.02.10.10.42.04; Thu, 10 Feb 2022 10:42:30 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=NXxgxLaG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242693AbiBJONg (ORCPT + 99 others); Thu, 10 Feb 2022 09:13:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:34118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237901AbiBJONe (ORCPT ); Thu, 10 Feb 2022 09:13:34 -0500 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15E981D6 for ; Thu, 10 Feb 2022 06:13:36 -0800 (PST) Received: by mail-il1-x12a.google.com with SMTP id z7so4409381ilb.6 for ; Thu, 10 Feb 2022 06:13:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=FTAdirp5u7kTPPTGGN6xaNHqqgo+3Ngm4ug8TFgRbao=; b=NXxgxLaGF5+w3dAUHgP2M1xT8dNGrVXDIfLw2d9aAp3zn4ve9J+lzs73YNobNypHTA yfbuFMac6Zdeo9iXFLeyRWqzfM7zNDbdmbPqPyYi9fsvPBfkf6Vdj+74DSM8wM5HgadH DODEHzBNXeYw7VmiWueDAfqATbSOu+CkntoIc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FTAdirp5u7kTPPTGGN6xaNHqqgo+3Ngm4ug8TFgRbao=; b=g9NWT2g/JLK7Mw1i9ZRp01AUdidRj1ZYlSLYW+irm9vJmQnd/HaKqRs9sDEEDpoXQb 7upFAY7P3GJQSa+QKwUPes6C7AbyfYO+vpIJyHz1eCWobjGe3mW7FyzHnk4byo8i0NKw adLekQtqF7FGy5JjHUV+pBr/2lPZQTFcWqbmulHj+RsaGbWH29vMRFHYqGn/1JVtYwhV 9MUFOmfYTGWYGP2hxPaOZxKvzOnLgGj7BznpGJeZDPeQnBre3pSosznJ+yXJysjMHZ7W 6oLtx/vc85eArtVjsei9zlZDpkX1ZL34/aGyg6z/GmHN8i+4JcmwFY9Kqb9ERWivPn7F btBg== X-Gm-Message-State: AOAM530QM7MdwSketnZYYmBHLTgEDckMvsMME4Lgdyy8jdHZtLyMYBBs HGbfGEjksuH7QmFTx2njhlbVsw== X-Received: by 2002:a05:6e02:1949:: with SMTP id x9mr4198030ilu.269.1644502415395; Thu, 10 Feb 2022 06:13:35 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id e5sm9302582ilq.9.2022.02.10.06.13.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Feb 2022 06:13:35 -0800 (PST) Subject: Re: [PATCH] usbip: vudc: Make use of the helper macro LIST_HEAD() To: Cai Huoqing Cc: Valentina Manea , Shuah Khan , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20220209032813.38703-1-cai.huoqing@linux.dev> <8c8bcf5b-bbda-55e0-6a61-35bfafbafb78@linuxfoundation.org> <20220210023714.GA7791@chq-T47> From: Shuah Khan Message-ID: Date: Thu, 10 Feb 2022 07:13:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220210023714.GA7791@chq-T47> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 2/9/22 7:37 PM, Cai Huoqing wrote: > On 09 2月 22 09:00:37, Shuah Khan wrote: >> On 2/8/22 8:28 PM, Cai Huoqing wrote: >>> Replace "struct list_head head = LIST_HEAD_INIT(head)" with >>> "LIST_HEAD(head)" to simplify the code. >>> >>> Signed-off-by: Cai Huoqing >>> --- >>> drivers/usb/usbip/vudc_main.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/usb/usbip/vudc_main.c b/drivers/usb/usbip/vudc_main.c >>> index 678faa82598c..d43252b77efd 100644 >>> --- a/drivers/usb/usbip/vudc_main.c >>> +++ b/drivers/usb/usbip/vudc_main.c >>> @@ -26,7 +26,7 @@ static struct platform_driver vudc_driver = { >>> }, >>> }; >>> -static struct list_head vudc_devices = LIST_HEAD_INIT(vudc_devices); >>> +static LIST_HEAD(vudc_devices); >>> static int __init init(void) >>> { >>> >> >> Explain why this change simplifies the code and also add a comment >> above LIST_HEAD > LIST_HEAD() help to clean up the code "struct list_head vudc_devices = > ". we only to care the variable 'vudc_devices', >> How does LIST_HEAD() make it simpler. It does that I am sure. I am looking for you to explain how it does in the change log. thanks, -- Shuah