Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp344576rdb; Mon, 18 Sep 2023 17:58:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYxUMQsGAtnazxSXU99BpNtgYqly/CA5jcIklu8UhZ+YC/XcfF1gzbHOQ871qPAanyHKXK X-Received: by 2002:a05:6a20:8420:b0:132:2f7d:29ca with SMTP id c32-20020a056a20842000b001322f7d29camr13640530pzd.24.1695085139562; Mon, 18 Sep 2023 17:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695085139; cv=none; d=google.com; s=arc-20160816; b=0eXEk1Qj04BZoOimgBfgRIZIqn72MiQJZoKlEBmmQmyjEFdnZQSET1lARb1ngDH6r6 7JYtsdi1tZ56vk3oM4/rtINTfLAatDeo9QxM+nnw6kH2Dx2HERwz2VrWZuEP+Suhf041 lxQl9DUDBebdicXiSZth35WDRZe5bccgfEMf3UCeE71NasfIapa10vBRsn8xaFdSpEh2 VUrBcEbNr9LM4D2M/50sbwLNs3JkNCgFNZysuCn3g5YCH3bDeGYfHOAiDSL7X2VQehaR qEuHnOYLBOh13GP2vVsQcmzgVy/As5AbiJ/TNpaDRpAA2tkbLO8M5h1JFa/+kkTlcXBN qG4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nE5P8ufygqbIo8jvx/OEDKHbyHstgT6k4TktwRlOAZQ=; fh=leRT975CrXcwr4EEhnL2oumvGZCSan1l7rZ6ZwU/J9A=; b=AG+87JH0cELFPNCQTpeVBc1Y+gOdsFlOWnH0oA4VxJE8R2e9m24OhzPyHzCRVKoLga 8HiMdlGJndupPgwiBEXCBCfQkx9aKJ2EsyKKzNUtl2Irv9OO7KYtcE3E+mbnTLDIpBVa lrOqqt5IMqAmsh95NeTAGxiBumn1mT+bW+eGwVuraVo1ElIQ8rGP5y3nPAIC96THBOid wIdRPJemAWT/RtV9CWndbiNW0RDEwvOM7805g5K9q2Mk86UBrkAZMs3r4V2aQWHX89cJ /XBTUGwNiljA/mMOZAiotEJvtUWbszXEKfVD+vPvVMhTo37o+L0sk2e6/zG4k9LVoX3J VtKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uh1a3Vz0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id fa28-20020a056a002d1c00b0068fbdfa7379si8984700pfb.311.2023.09.18.17.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 17:58:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uh1a3Vz0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C586E8026B44; Mon, 18 Sep 2023 17:58:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbjISA4r (ORCPT + 99 others); Mon, 18 Sep 2023 20:56:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjISA4q (ORCPT ); Mon, 18 Sep 2023 20:56:46 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B38A10B for ; Mon, 18 Sep 2023 17:56:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BABA6C433C9 for ; Tue, 19 Sep 2023 00:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695084997; bh=nE5P8ufygqbIo8jvx/OEDKHbyHstgT6k4TktwRlOAZQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uh1a3Vz09m4eYrMIBw5dUOcOT2b2nusN7GZYwcgx1Mmv+zw6mVGHih5CQqSUTS0mT nAkFPLu8HTIU3+IQy64cG+rMer2TB5Yzch/I/AianECJ1pw/bqEa2OFlIFTInhqrzD FSo6mYvUq3Lvt4UpzvZcY0Ii4viZe2VCCuckp7++V9THu/0w3A2M5mfWq6SC/4tGDM cTOiS4n1VchWOrv9mUh71LDaXgC8H1dw7MRS7Gxlo7ZhL11jB1LiTpmfVgEDz5g7YJ JSMEylwzA/dflCP6Vuf+nNo0YlwxBtaOnFRk+1SVedRkRyHcOxqtAiyQflfzKFKt2X SOj6DhAplnHzw== Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-9a64619d8fbso673104766b.0 for ; Mon, 18 Sep 2023 17:56:37 -0700 (PDT) X-Gm-Message-State: AOJu0Yz3tcaVztl0ojFHyrrZjf4nXgkm91/82SFQvTYbQyTio8aiQfJ1 7aVjEuTiBXfmV0jxati23X1SCejMRIJkh4PMUnA= X-Received: by 2002:a17:906:2921:b0:992:7295:61c9 with SMTP id v1-20020a170906292100b00992729561c9mr8693317ejd.69.1695084996069; Mon, 18 Sep 2023 17:56:36 -0700 (PDT) MIME-Version: 1.0 References: <20230914103445.511285-1-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Guo Ren Date: Tue, 19 Sep 2023 08:56:24 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/2] LoongArch: Add missing headers To: Andy Shevchenko Cc: Huacai Chen , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, WANG Xuerui Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 18 Sep 2023 17:58:13 -0700 (PDT) On Mon, Sep 18, 2023 at 4:23=E2=80=AFPM Andy Shevchenko wrote: > > On Mon, Sep 18, 2023 at 04:05:50PM +0800, Huacai Chen wrote: > > On Mon, Sep 18, 2023 at 2:49=E2=80=AFPM Andy Shevchenko > > wrote: > > > On Sat, Sep 16, 2023 at 08:05:52PM +0800, Huacai Chen wrote: > > > > On Sat, Sep 16, 2023 at 6:27=E2=80=AFPM Andy Shevchenko > > > > wrote: > > > > > On Fri, Sep 15, 2023 at 08:36:24AM +0800, Huacai Chen wrote: > > > > > > On Fri, Sep 15, 2023 at 2:53=E2=80=AFAM Andy Shevchenko > > > > > > wrote: > > > > > > > On Thu, Sep 14, 2023 at 11:25:22PM +0800, Huacai Chen wrote: > > > > > > > > > > > > > Thank you for your patch, can this patch solve the problem = below? > > > > > > > > https://lore.kernel.org/oe-kbuild-all/202309072237.9zxMv4MZ= -lkp@intel.com/T/#u > > > > > > > > > > > > > > Nope, this just adds missing includes. > > > > > > > No functional change, so warnings will still be there. > > > > > > But I think a patch should solve a problem. > > > > > > > > > > No, that problem is static analyser concern, not the compiler nor= linker. > > > > > > > > > > > If we don't get a build > > > > > > error or warning without this patch, does that mean the 'missin= g' > > > > > > headers are actually included indirectly? > > > > > > > > > > I might be missing something, but I do not see any build error in= the above message. > > > > Hmm, then I think I will take the second patch only. > > > > > > Thanks, but can you shed a light why? > > > > > > The rule of thumb is to include the headers we are direct users of, w= e have not > > > to imply any other inclusions done by others, unless it's kinda same = family of > > > headers (like types.h always includes compiler_types.h). Since in you= r case > > > the const.h is included the other two are missing and it's even worse= , as I > > > understand you rely on the specific headers to be included _before_ u= sing this > > > one in the users. > > I agree with you more or less, but I doubt there is another rule: no > > break, no fix. Please see: > > > > https://lore.kernel.org/loongarch/20221024070105.306280-1-chenhuacai@lo= ongson.cn/T/#t > > > > Obviously static_key is used in page-flags.h and it really causes > > build errors once before, but at last I removed the inclusion of > > static_key.h to get that series merged. > > This is strange requirement to be honest. Doing like this is to move your > responsibility and understanding of the code to be a burden of the person= who > volunteers cleaning up the header mess we have in the Linux kernel source= tree. > > Since I'm the one who tries to fix some mess (in particular kernel.h), I = am > pretty much know what I am talking about from the experience. > > Cc'ing Guo. Guo, can you shed a light on the rationale of your comment in > the above mentioned thread? diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 5c02720c53a5..9cdef3944a75 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -9,6 +9,7 @@ #include #include #include +#include #ifndef __GENERATING_BOUNDS_H #include #include My meaning is riscv needn't include the above header file to support HVO, and I just tested the above modification with riscv, all passed, so go ahead. > > -- > With Best Regards, > Andy Shevchenko > > --=20 Best Regards Guo Ren