Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3447831pxf; Mon, 29 Mar 2021 02:26:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/h1hSKbaBWKMeS4lH8V0xkQoHK+kwFUzejUJCvXktgJQqat+A7Q+aGCf8JRzsEsZPXKTf X-Received: by 2002:aa7:d917:: with SMTP id a23mr27675857edr.122.1617009994397; Mon, 29 Mar 2021 02:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617009994; cv=none; d=google.com; s=arc-20160816; b=Y4p9q4svnfzQJ2d1a2eu3jYZ8TDRblhXq0Rq7mE78R7R3mFzpqME636LltBL8cbzPb wh/Z6uWp5sXiIw2+lY6lhY3JAVtokJdrtrJCKr2KCG+w8cX1zhiCCE1AkMKeCgQ8F6qW QTEZrK1cQsTu7pNvw5X8dDqzRRSTEfAgZzX195QL7Mu8BSH4biFE6hsqlE/ZrVNYMeNa U7AXmiC9yxJozayqvpKtsr/QrMjoTr9Qr9qg9Kal/iWhFAHp+/GQe9OeastmU1A8UmNJ DPUSDiV83RmwB751Po1hxNkuxmsLcA9WfNe4THvcMyUST2wsEItlCuJOlX37lg2nfFZe 1rqw== 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=d3foQ4BEwzEQV0MZrwZBrW6P2i+vzVt1GyDNNBI6fkI=; b=C8apq91REK2i3TnhB9UVQ+DITwAvBdE0Q4EX+FHdwt6szFeBU3SMgzMtLMgLdF5yeo DEgDqLHCFlstlm+ImCbaC7uyMxdE5jn38344ImeNaRWk8s80vPNbIP2doJM0mAeaD8ig zeOliN/JoYLoWkfz1FIvdqwFg4Hk5U7U/Aii0mKBaXJ91UjBpHE9uDsLvqGjy3x4ErlK tUvaLbLUf5fVO7mOBwD9QJWZmWu5FG19ftxdWKb36qklMp49EsuJX9ivlF+aJqOHkr0Z oX7cI+YvrK9e2XVv5vN2EaqnzVzPvNi+lHpRIHHYTxVij6vJXruwY81Z44oDjvsgVjV/ vUWg== 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 q11si12606444edn.333.2021.03.29.02.26.11; Mon, 29 Mar 2021 02:26:34 -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 S231853AbhC2JYY (ORCPT + 99 others); Mon, 29 Mar 2021 05:24:24 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:15089 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231661AbhC2JXs (ORCPT ); Mon, 29 Mar 2021 05:23:48 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F86XP5cJYz19JwG; Mon, 29 Mar 2021 17:21:41 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Mon, 29 Mar 2021 17:23:34 +0800 From: Shixin Liu To: Jens Axboe CC: , , Shixin Liu Subject: [PATCH -next 2/2] mtip32xx: use LIST_HEAD() for list_head Date: Mon, 29 Mar 2021 17:53:49 +0800 Message-ID: <20210329095349.4170870-2-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210329095349.4170870-1-liushixin2@huawei.com> References: <20210329095349.4170870-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/block/mtip32xx/mtip32xx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 39e3280030d6..07c8b99b88c1 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -95,8 +95,8 @@ /* Device instance number, incremented each time a device is probed. */ static int instance; -static struct list_head online_list; -static struct list_head removing_list; +static LIST_HEAD(online_list); +static LIST_HEAD(removing_list); static DEFINE_SPINLOCK(dev_lock); /* @@ -4363,9 +4363,6 @@ static int __init mtip_init(void) pr_info(MTIP_DRV_NAME " Version " MTIP_DRV_VERSION "\n"); - INIT_LIST_HEAD(&online_list); - INIT_LIST_HEAD(&removing_list); - /* Allocate a major block device number to use with this driver. */ error = register_blkdev(0, MTIP_DRV_NAME); if (error <= 0) { -- 2.25.1