Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4034154pxf; Mon, 29 Mar 2021 19:28:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKcTPPTK1nT21IeTKZs10X2gkO3zS83a6e27vvbRzwb3wp3GjmEzRDwU6Z2DYPEU6cvOAz X-Received: by 2002:aa7:da46:: with SMTP id w6mr31833252eds.40.1617071328430; Mon, 29 Mar 2021 19:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617071328; cv=none; d=google.com; s=arc-20160816; b=nHec631mUwrswhk/3Blb1bwOfgCowqho1HQa/tUA01Ifl9XnoRR8V2GzeuBEhBdTPj hkW5LHcCkQzrNu4bSHQfXZ+14OTHWn8ypcwqglS4RBQblAjxGDNAZkFOAYZ8giu7/cWK NIkTqu/yXeupvOJdjm0X99UDET4QbU8V3rxIB6uOCe1Cb9Y2oJZzlw3rBOFkguEZR3jT 0q/e7e6/tmqrX0g9GuuD/pu/fKDMy9S7TpEcrErJ6iB1dxRCUJwdUkqCj17Q+JvsUT5i DhGiNKBVYjSbvGJ7ySvxS6YD+meSu/v6CvASmV+ruHBkCRQkO/wdx5qciQjbFHU0REEe Vqng== 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=mVNPvBrxg+5K/5SaIE4mXglfSgOW3S92LcZcFppV7qE=; b=QM/Su13tWloa6vcFwzbEJfBRfhkeHAKkfH5mZQ3k4q6K2BSQfHN5m/2RNXVMNpY7vt hEY9QTNHo33UBFDEL4yjocTZ7Debf3p+PWGSPnXfKSMkR6YOzr/6wDcWTMFMtJhbtjAV UQU7brV0IMiBTqpmGud8yAoTRgwFYBI8uVBTiczoifgTXEmxw6yoMxgPIqmO/bV1dnQ7 Hm+ydLRIu3S22aVwmsbZdyXonnKlEMkyHB5j8p+JGuPS8D61bqkW88N9ouDA9Z95D9e0 SqaCjiHYBFs9SCh5awSxWRiGkXGjJFBr8oXbjNRymYb/JmQBt6E69tn2w2hWJgYPrjXv ZtgA== 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 y61si16059730ede.590.2021.03.29.19.28.26; Mon, 29 Mar 2021 19:28:48 -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 S231305AbhC3CZA (ORCPT + 99 others); Mon, 29 Mar 2021 22:25:00 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:15387 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231289AbhC3CYn (ORCPT ); Mon, 29 Mar 2021 22:24:43 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4F8YBp1vN5zmVBS; Tue, 30 Mar 2021 10:22:58 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Tue, 30 Mar 2021 10:24:29 +0800 From: Shixin Liu To: Karsten Keil CC: , , Shixin Liu Subject: [PATCH -next v2 2/2] mISDN: Use LIST_HEAD() for list_head Date: Tue, 30 Mar 2021 10:24:15 +0800 Message-ID: <20210330022416.528300-2-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210330022416.528300-1-liushixin2@huawei.com> References: <20210330022416.528300-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..386084530c2f 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; +LIST_HEAD(dsp_ilist); +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