Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3694991pxb; Fri, 11 Feb 2022 05:55:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDgEJP8UA3qO2TbpW6QqVmmdu3IsSLafl6HBmwNco67J0k9CDY3QBf9+Bp6YgFF1Ceed1d X-Received: by 2002:a17:903:248:: with SMTP id j8mr1611892plh.123.1644587738322; Fri, 11 Feb 2022 05:55:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644587738; cv=none; d=google.com; s=arc-20160816; b=0yGieK+ajFxrpDVv+qYYtiY3OoWfY30yzedIEVaF/O1vBl9+PH4eYI1c2FhYY4238Y oGoX44VJoeboV4asL3y6N32oNCsXBVwhzU/H9NtvuAH4w3NYA1B7Vq4wtkGUFuzlILNl QMia7oJ2ylLoPnWyI9pu8xyeH34mmDFVrY/bT/0JdHCF36Ld4VJr3Qij94lrdDVyvPKQ 9/CGXi0o74lccrdBJoHURnUeMYaPRAxgy1X+P1RVlLwuniuFXF64wQALpAXa/z+A4hAj E5FU9lR7tHQv5msWgBGXdphElZCn559IpX4HExkJNvnmM6IjqzA86OoJmX8Aki8rDEQA s5RQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ZbXEwM/1hh5VIPvHIliHbU2s6hK/7WN9wYyQ2YQDsEk=; b=wEVP/fNK3aTqnAVA5LFsZswngFDOX7b8OQDnfNTBSaYPQVUy6lUHBwZdf7XSehHrb8 mD2xMXEU79/LnYMC2jLj66noqYXaidD9TZ8WmMxt74q3Z2ItaSm85sG7xRgs/ff86LU8 v60Y6FpFP4H3t60rpopmgMtXI4mTbl2ORK/FaTwPxdqM46m8SNBZEi4NtjWnXS+Tc1CC Uix8d7S2BZVjXHmjlSc0MT2a15GnoPMjN5tZl5ysMXQ8taphUQ/O2ESrxFFKk7cu5vqO W1shCaWgHwoWk4oorEhms8H5vxqF7B4LzsLKe84+9FhConJdLwnbHw4yf2x73gL5DmRw sV8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LWvsYdgE; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi17si4953120pjb.99.2022.02.11.05.55.23; Fri, 11 Feb 2022 05:55:38 -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=@linux.dev header.s=key1 header.b=LWvsYdgE; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346862AbiBKB2i (ORCPT + 99 others); Thu, 10 Feb 2022 20:28:38 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346834AbiBKB2h (ORCPT ); Thu, 10 Feb 2022 20:28:37 -0500 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CAD1270E; Thu, 10 Feb 2022 17:28:37 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1644542915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZbXEwM/1hh5VIPvHIliHbU2s6hK/7WN9wYyQ2YQDsEk=; b=LWvsYdgEuvdIol5X0Xsvkr050FhfDnC+wFIZJNcckHYiuD3CO3H6G8Rf/PdAXrEZlEPRHt kC+KZqQvugWliwTJAz+652fok/clCWZpVcC+zmcX6FIBFo6ONEzKPMNXFFgB16USwEavnv HxMi+o9JjjCnZxCyaZ7cn+W2bGWmEKw= From: Cai Huoqing To: cai.huoqing@linux.dev Cc: Valentina Manea , Shuah Khan , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] usbip: vudc: Make use of the helper macro LIST_HEAD() Date: Fri, 11 Feb 2022 09:28:07 +0800 Message-Id: <20220211012807.7415-1-cai.huoqing@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,TO_EQ_FM_DIRECT_MX,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 Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code. LIST_HEAD() helps to clean up the code "struct list_head vudc_devices =", only to care about the variable 'vudc_devices'. Signed-off-by: Cai Huoqing --- v1->v2: update the changelog to explain why this change simplifies the code. 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) { -- 2.25.1