From patchwork Wed Sep 4 09:32:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Li X-Patchwork-Id: 1980543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=netfilter-devel+bounces-3667-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WzHCg2fW7z1yXY for ; Wed, 4 Sep 2024 19:25:35 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A09161F2142C for ; Wed, 4 Sep 2024 09:25:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFC44194C82; Wed, 4 Sep 2024 09:24:17 +0000 (UTC) X-Original-To: netfilter-devel@vger.kernel.org Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5946F18A95E; Wed, 4 Sep 2024 09:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725441857; cv=none; b=Y1NQF5gH335+7LBJxxwAoYBYwqeE7pb+C6xq8Mq3qfkwybqyUjouEZJJyoUezKAHylpEKncOWimElGwxSrf0/tP69u8uIta8jNGTpAUHceLsoCSIW+sv3g/0qJJyPlTkQc9FKNdnSr+2nHuj/J4xcjL5+993Kh9lgN2hwJPT5Ws= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725441857; c=relaxed/simple; bh=oE9Stb6+bAQcPyENRZbspP2lpEs/2To/u5FLnr7doxk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Te7nPLuL+IbzptEgEvIhQICbCknK9lo+eJYAKtQeDHXwFeFdWFNXQRVDbAI3qMgUAZbnN8v9Qbg25KY984jU4yg+Laboib5OIsU0Br9Uf8vszruDFaxWmgkl2r/FbipBSvnKnb+HqDO0vHjmGAh1gcg/oXgllO7SGjYru0eCtP4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4WzH6568tMz1HHLV; Wed, 4 Sep 2024 17:20:45 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id 47E641401E9; Wed, 4 Sep 2024 17:24:13 +0800 (CST) Received: from huawei.com (10.90.53.73) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 4 Sep 2024 17:24:13 +0800 From: Hongbo Li To: , , , , , , , , , CC: , , Subject: [PATCH net-next v2 0/5] make use of the helper macro LIST_HEAD() Date: Wed, 4 Sep 2024 17:32:38 +0800 Message-ID: <20240904093243.3345012-1-lihongbo22@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500022.china.huawei.com (7.185.36.66) The macro LIST_HEAD() declares a list variable and initializes it, which can be used to simplify the steps of list initialization, thereby simplifying the code. These serials just do some equivalatent substitutions, and with no functional modifications. Changes in v2: - Keep the reverse xmas tree order as Simon's and Pablo's suggested. Hongbo Li (5): net/ipv4: make use of the helper macro LIST_HEAD() net/tipc: make use of the helper macro LIST_HEAD() net/netfilter: make use of the helper macro LIST_HEAD() net/ipv6: make use of the helper macro LIST_HEAD() net/core: make use of the helper macro LIST_HEAD() net/core/dev.c | 6 ++---- net/ipv4/ip_input.c | 6 ++---- net/ipv6/ip6_input.c | 6 ++---- net/netfilter/core.c | 4 +--- net/tipc/socket.c | 6 ++---- 5 files changed, 9 insertions(+), 19 deletions(-)