Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3455219pxf; Mon, 29 Mar 2021 02:42:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9QjkMyTa2/e4YRmL7tpwf1nNhieHgzahFNhdezG2uzjzHC1jJbUOBP+Zs26D9I3z2ezC4 X-Received: by 2002:a17:906:398a:: with SMTP id h10mr28107820eje.155.1617010939120; Mon, 29 Mar 2021 02:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617010939; cv=none; d=google.com; s=arc-20160816; b=mmeUpyGdDGxqV/EU/Xp+g8vAVBzpD0U1QVRsvLHHsYEcRJ9LdBAfD1UpcgkaIhuY4u 9UqdtcafFwUl58z+WJQuRj147BGaGNrDUg01Z0Cb9c0lZI0nuMrCI859UMlZ3nlGG336 uZUwQAQYrkO+YVXbcz9i0VYg95s3naKDXT3VWSyHyPJaVWLNbr9tSrcAzX7nrLzdsIXQ LG6lJ1xsh+SXsQ7KgpIKDxfGdQ9h+clNiJ2AkEADeP7x9nWw4D2kK4goeReFaY5n6qLT jiTa5GROvwpIrhR8wljJdSlkyECPDV97hDQ3M9hJZ0GolzdQc7ZccTLBFiuQBP7sFl5x UekQ== 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; bh=bWy5enDcbbi73lgzbP4sCVk6TsmcPRCSK8gMWlKEoIE=; b=NV6alrcsO//pis1Pvymz47JFG4wcrUfOU5jYm3sLnHX3ddL3LwHhZjcuTxJZgwPtWN WXPgV8VUArex9tlM3vjoeDStxcBWemPxewPf7gEr5nw1yk4DrWjiT31QcUl6U25UKTey qGrVi7IcMKkVfUnmjcZLask1I6GsOzeB4J9PFTVYnDhn4YmMxA8JegdJZH8ySNDJhafw FLQJy64x8hrxLgv5/AtH5sRO/z5fxTXR/zrNjhRDTy9Tav1JbxGBZrzNajiSsoJjYU+u uJf9S0RwaJanEprr4PS0Pm+nXUR8atF5JNDYF068K5genzoGeoHSc0KQjWZ5V21GLcO3 5KLQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jy27si12098914ejc.748.2021.03.29.02.41.57; Mon, 29 Mar 2021 02:42:19 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232343AbhC2JlA (ORCPT + 99 others); Mon, 29 Mar 2021 05:41:00 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14183 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231776AbhC2Jkj (ORCPT ); Mon, 29 Mar 2021 05:40:39 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F86vD4W4hzmbDH; Mon, 29 Mar 2021 17:38:00 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Mon, 29 Mar 2021 17:40:29 +0800 From: Shixin Liu To: Karsten Keil CC: , , Shixin Liu Subject: [PATCH -next 2/2] mISDN: Use LIST_HEAD() for list_head Date: Mon, 29 Mar 2021 17:40:18 +0800 Message-ID: <20210329094018.66993-2-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210329094018.66993-1-liushixin2@huawei.com> References: <20210329094018.66993-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro. Signed-off-by: Shixin Liu --- drivers/isdn/mISDN/dsp_core.c | 7 ++----- drivers/isdn/mISDN/l1oip_core.c | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c index 8766095cd6e7..d541b487176a 100644 --- a/drivers/isdn/mISDN/dsp_core.c +++ b/drivers/isdn/mISDN/dsp_core.c @@ -177,8 +177,8 @@ MODULE_LICENSE("GPL"); /*int spinnest = 0;*/ DEFINE_SPINLOCK(dsp_lock); /* global dsp lock */ -struct list_head dsp_ilist; -struct list_head conf_ilist; +struct LIST_HEAD(dsp_ilist); +struct LIST_HEAD(conf_ilist); int dsp_debug; int dsp_options; int dsp_poll, dsp_tics; @@ -1169,9 +1169,6 @@ static int __init dsp_init(void) printk(KERN_INFO "mISDN_dsp: DSP clocks every %d samples. This equals " "%d jiffies.\n", dsp_poll, dsp_tics); - INIT_LIST_HEAD(&dsp_ilist); - INIT_LIST_HEAD(&conf_ilist); - /* init conversion tables */ dsp_audio_generate_law_tables(); dsp_silence = (dsp_options & DSP_OPT_ULAW) ? 0xff : 0x2a; diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index 62fad8f1fc42..2c40412466e6 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c @@ -230,7 +230,7 @@ static const char *l1oip_revision = "2.00"; static int l1oip_cnt; static DEFINE_SPINLOCK(l1oip_lock); -static struct list_head l1oip_ilist; +static LIST_HEAD(l1oip_ilist); #define MAX_CARDS 16 static u_int type[MAX_CARDS]; @@ -1440,8 +1440,6 @@ l1oip_init(void) printk(KERN_INFO "mISDN: Layer-1-over-IP driver Rev. %s\n", l1oip_revision); - INIT_LIST_HEAD(&l1oip_ilist); - if (l1oip_4bit_alloc(ulaw)) return -ENOMEM; -- 2.25.1