Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2514958pxb; Sat, 25 Sep 2021 09:21:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaIg8evaNW/MJKJpb785JIHKwI/DtP1ebzQZXthNybdLmiqWgnYZu1tfFAUgbeF4TtMMg8 X-Received: by 2002:a6b:6b08:: with SMTP id g8mr13826798ioc.199.1632586896047; Sat, 25 Sep 2021 09:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632586896; cv=none; d=google.com; s=arc-20160816; b=Jp2I4nbRaSothFX3tDuwFqGx3VtatE/n3VO4NC8SIxMAlT9+5L1uTEdTe4alEjt+fk u2tS6b5bZ+D0Mj0PJEnBfSPQorzhyfy7HQftZyqE+kxuxxssCJ0SdmwZzYvqhEs6YJee cXTLKjV7T94etPLcfW0OcvhwsYTA2q+KDcSO0JzKENF6x63hb+7FbKX+8WYrZwJDAWxS LNnUcmBuVG2D2XD7xRAqz2hJ9EmL5n6URI2+Z80MU7vKstY4zRc/ejQHxceQtr64mR61 XFXxymVrSuK63TeB4ubGz+wd7GS+awsAuQOlKOxYTstrSKSqBv1m8UZf00UoL2da0tCG hHnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0crdlBe2JFxj7vLeLWC6SazKmqX6D7h0wPvd1YoWPhc=; b=onXdxfNn0mE0fPvNJLlrW+/TBBo99TUFiAil9HMMEFgP4bMYbFBJC830egWy4HIITu +2kbPwMf79ujqsBYe0FfqblkuuEbHG1BXtjHIQtozjQV8b8Hxd5WL1QKeFJnp/Cp0Yr5 79qno0mItCyZEeH24oivL5okVb0e0yWlDklJGR9nV8mzeaifMUUT1w9e0rEW/laJYaxe sjscjcgaDtKFqIlcE6c9qW4rggi8LNvf264T1P5TfX+oxPsyFhzNtMK/EvC8o/ibj/cK Hox5z0OUp9LqZ00m2OvOkvQxSxVofA6Xya1uuS4GUm7MBP6nw/2tAjnewTqD1H9Aeqno Nruw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="r3STl/Ei"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s2si8894776jam.25.2021.09.25.09.20.58; Sat, 25 Sep 2021 09:21:36 -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; dkim=pass header.i=@google.com header.s=20210112 header.b="r3STl/Ei"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237257AbhIYQO1 (ORCPT + 99 others); Sat, 25 Sep 2021 12:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbhIYQOW (ORCPT ); Sat, 25 Sep 2021 12:14:22 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A23E9C061570 for ; Sat, 25 Sep 2021 09:12:47 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id s16so12872184ybe.0 for ; Sat, 25 Sep 2021 09:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0crdlBe2JFxj7vLeLWC6SazKmqX6D7h0wPvd1YoWPhc=; b=r3STl/EiBhjcGJAGxvBGIMaNrasQNOdY/xVtRaHvAhQZbIMdJXsQjx/pPZjU6xU17R dZ/FukG0qiUMnckvTSocZ6Wg+54ENNYoPmikaBCvyiB5Jy3XtsIUYan+1yxllyCO60yP bV8zzlgXOewTi8q/qFOg1RogQEuQR8ep610K4+HNg3YSSy/VpZWuN0f0TVO8+WMaoa9v ooOeL57U2EzTBWEhJoAoJ24GAqUE4z4nGueGqLaYadnn4VuQeFTiU2MElx3vnd2NlYsT FFK8sBNX0n7P8a0MoYA7E0e0pNvSTzvXri3L5WrDWPb2od9lrLthTTAOf+/hRhrplhNg 4yhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0crdlBe2JFxj7vLeLWC6SazKmqX6D7h0wPvd1YoWPhc=; b=aaLf2qaQ8uc7Zc1gOwfEOIxQ9XIFlXHVJZkx/EcTYHdsWS1k6ST/V7vnzRbPOjg6mo 4pdw8i2TPcFB5Wq75SLof1+K4NqZDo0jLJMZHrqtW3hzlkAyjbBoNu3GVzxDmtkfwae1 zCQ4I/b9yusxUCpD6CbkHIHi2OOJqXFed1jYD85xHunvQwVgUh95NgU/gIji/JrxgmMt muRA3Lmd7Hj1uklGifFJttgeQIqRimTIfnZz3eRkRCmQX07DRGHQLjEaw7W7QA1gu6/U 3WuwJ9Pp59xGSxPacnrW1Te2dUV7TcP/CHd8EDletza503GOIPIPMOvIWx4bDQsY38EC fScA== X-Gm-Message-State: AOAM532T4yyTJBS7gMH36hc5IUC0skGooVz9G6/F+mMzwZGAyaeOuR3A 1hcXxyQl6OxYjcKq91PYccqOi3fKC7VvBw7KfvugsA== X-Received: by 2002:a25:c011:: with SMTP id c17mr18572046ybf.291.1632586366402; Sat, 25 Sep 2021 09:12:46 -0700 (PDT) MIME-Version: 1.0 References: <20210925142733.24293-1-liumh1@shanghaitech.edu.cn> In-Reply-To: <20210925142733.24293-1-liumh1@shanghaitech.edu.cn> From: Eric Dumazet Date: Sat, 25 Sep 2021 09:12:35 -0700 Message-ID: Subject: Re: [PATCH -next] net/ipv4/tcp_metrics.c: remove superfluous header files from tcp_metrics.c To: Mianhan Liu Cc: "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , netdev , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 25, 2021 at 7:27 AM Mianhan Liu wrote: > > tcp_metrics.c hasn't use any macro or function declared in rcupdate.h > spinlock.h, module.h, cache.h, hash.h and vmalloc.h. Thus, these files > can be removed from tcp_metrics.c safely without affecting the compilation > of the net module. This seems pretty much relying on other includes. (eg #include brings many things already) We do not generally do this. > > Signed-off-by: Mianhan Liu > > --- > net/ipv4/tcp_metrics.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c > index 0588b004d..7b819530d 100644 > --- a/net/ipv4/tcp_metrics.c > +++ b/net/ipv4/tcp_metrics.c > @@ -1,15 +1,9 @@ > // SPDX-License-Identifier: GPL-2.0 > -#include We do use rcu stuff in this file. > -#include We do use spinlocks in tcp_metrics.c > #include > -#include > -#include > #include > #include > #include > -#include > #include > -#include Not sure why kvzalloc() is not in linux/vmalloc.h Honestly I do not even know why we spend time trying to reduce list of includes.