Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3455180pxf; Mon, 29 Mar 2021 02:42:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaWH2/4tDEpaLBNOfyUvmEMEwd1NhEWtPBMy56LE1d0ehU9xbRqz5cmDUIPmhLQBIZEuHk X-Received: by 2002:a17:906:2a50:: with SMTP id k16mr16945678eje.537.1617010932966; Mon, 29 Mar 2021 02:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617010932; cv=none; d=google.com; s=arc-20160816; b=fzmw1cbYhfgoWKlHNdy9X9gyFwBVCbzuBxMUhyMjAqd3MBlcv0pCKLl8AKsJ/m/m8m 1YSzFu2SG/UtryjufLQtnfGUx2+YQYB3+f+J51KrMkt1xeWuSHHXEdGzocap3QWVLtC2 Jom1TdOm+cp9/G/RK83IdOgNChTW8U42GjouSuBC6u2hjd42k3kwFpGNel1ZGkMbiCdh 3CF+2leWabgnrRJqzj7z5g27wvRz5bUgCN/iAAERfOHOHg40dQle6BesfG6g/eDhL0F+ WyU44f5SLd8EHnWUqh6KJkPBtGOSfICO9rML41KtLokgNZZSpjdgOfN9x2y6VsdZbG4N 48dQ== 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=/J5of1CDEzZCtt7lmhLeoF/zvq2PEjU9dIf3NH44dOU=; b=HDXuT7il/7YM0FY/OnqzUAkLlMqkA0uI2Wg3OVdxKE0eh0EkysIaOTOchHTdm0VXWJ nBVf+2aQNaMFozWvib38a40LRmtOGJ4Awr4E1OWq2Ats5/OyZVoxTuJactRcbWsLnWyS yU8AxsL6PXZXYxMw50lB5AweD43vv2UXOGoeOMmBDJgMfZxcLMZuZDC7ynuXCZcPpLB2 8DDffPK82D+98jSkZIA3TCZpLLPFa9Uu+UaaQx3hcP0x8cKc2zKRiFBv7xRrm+LkpNZ3 ixLWeZQOtAKJThoFMvvsr/kX5Mf2a+HK/3jwl1pGNqfQCacK5T9UCCBNk9C3unbMqvN5 TDYA== 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 l18si12569445edc.152.2021.03.29.02.41.49; Mon, 29 Mar 2021 02:42:12 -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 S232087AbhC2Jkw (ORCPT + 99 others); Mon, 29 Mar 2021 05:40:52 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:15091 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231942AbhC2Jkj (ORCPT ); Mon, 29 Mar 2021 05:40:39 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F86vv0gmtz19Jtj; Mon, 29 Mar 2021 17:38:35 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Mon, 29 Mar 2021 17:40:27 +0800 From: Shixin Liu To: Christian Gromm , Greg Kroah-Hartman CC: , Shixin Liu Subject: [PATCH -next 2/2] drivers: most: use LIST_HEAD() for list_head Date: Mon, 29 Mar 2021 17:40:15 +0800 Message-ID: <20210329094015.66942-2-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210329094015.66942-1-liushixin2@huawei.com> References: <20210329094015.66942-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/most/most_cdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/most/most_cdev.c b/drivers/most/most_cdev.c index 8b69cf3ca60b..8908b9363a96 100644 --- a/drivers/most/most_cdev.c +++ b/drivers/most/most_cdev.c @@ -44,7 +44,7 @@ struct comp_channel { }; #define to_channel(d) container_of(d, struct comp_channel, cdev) -static struct list_head channel_list; +static LIST_HEAD(channel_list); static DEFINE_SPINLOCK(ch_list_lock); static inline bool ch_has_mbo(struct comp_channel *c) @@ -494,7 +494,6 @@ static int __init mod_init(void) if (IS_ERR(comp.class)) return PTR_ERR(comp.class); - INIT_LIST_HEAD(&channel_list); ida_init(&comp.minor_id); err = alloc_chrdev_region(&comp.devno, 0, CHRDEV_REGION_SIZE, "cdev"); -- 2.25.1