Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6179182rdb; Mon, 18 Sep 2023 06:33:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHCEvwD3JVKr76xaTKIAs1LzCnFU2asI8D8gMqwScbFfBjUzQcOsXOxz84AudDV7FlOhLOC X-Received: by 2002:a05:6a21:7802:b0:14c:4e31:97f3 with SMTP id be2-20020a056a21780200b0014c4e3197f3mr7762621pzc.59.1695044002788; Mon, 18 Sep 2023 06:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695044002; cv=none; d=google.com; s=arc-20160816; b=zfktwqGiVQDfzKuRo9WC/Er6LJNPfkBPVgtK2ZBp+eMO2RaogyscKmEJ3spC8vaPAb oGsJ/09FicmtJ5TmjSVJBxplBJZYjsp8zcgWpHzlWremkez42PShX1ua395h8dnM0jnC iY8Gkm6qFYWPYhSGRteVpDU6ozKoTlOGq7IPPFmCW9MM8q+xWyYJKjPw81PkMrLqv8jC /fwvoSQH411OpbQJ24dDPMLYgRXgCzJ3CNX2+WhrUsZJOkouqD8Z8n/nLVHAC4mxMFyP chWIgcUFXHuIG1IFcbpUDqHuhkgH1r9r+0h4Y8ffg3BKOO9KGaXWnKIx7fAMFxWT6niO R4Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dFHCFEEdDGwr95Mk9MW9Jydl8KrTr8hUluqU1860rsI=; fh=otNrXwY5BmXFsbPi2zEFEUeaRlW6tMZRCBjvz4GU1AI=; b=yfGOKioDccb3bvxPS+tI0u5PUhD+ovBYvjFqgcfLCUBPtmdQzmuV8BTAG9TWRvedFr zqjsOofNsgUIVFced9rXcPYI7eIU/rqwyirftFxA92Xr/qqKYFIWQUdS0VC0UUlZdxdT z2BjnB/xMOV0ofM8N0w83+a6a6EBm3vhqDaFjJwmtavh3K89k5+i+ZQAnW+cur2uKBkA 8WaFyOfS0Pn7vNyQcT0eJ5C1dqFxeq/OrSpwqiaBd1QMJQgSA4lkMnWoJjih0WfBOkho HVrRaFbie8/7KGa3M6/3XuPT5aM2qA4Cf0jBc0Zu6TUgP5NAPNngj4WFvuo+JTnN6UoL 2HqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="lWuFJt/W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id c16-20020a656190000000b00573fc6de956si7956936pgv.223.2023.09.18.06.33.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 06:33:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="lWuFJt/W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 00982807F4EE; Mon, 18 Sep 2023 01:26:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238662AbjIRIZk (ORCPT + 99 others); Mon, 18 Sep 2023 04:25:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240661AbjIRIZP (ORCPT ); Mon, 18 Sep 2023 04:25:15 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C641D1A4 for ; Mon, 18 Sep 2023 01:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695025420; x=1726561420; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=LSr4AFp7VQS9eCOKjiyauP1ikNwrfoAhtarijUPvqlU=; b=lWuFJt/WweiS/irdhX20vgsXxKR8qFvaDG/EjARyNMbv+4tfaiahoPVH VA8/CeM29Ot8XaKSBXBUzOIR14W9dmQPzC0Gt2ZQ11655NuqKya18wLBl BPPfF0ZKby7IDmOFalkW8VHaoJM9lV2q2JlHJSaUOSU9yHCv5z37bWvx0 Hu/yO2m6FT03CsPq6RZHqfih9BpktBU9G9mib3Mu0IH8Wq4t+rHDPTCRs eQksNPfxXNgXtWiX1Gyyzme/bhdeCk6P/HssWpxWmO4OvoZn/j0xE7Upd a8JBbzUgTD4XD4qk9TgKfCB4W15wwcL60yq3iZzW+R3D4tx7yIwbfU16K g==; X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="382341051" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="382341051" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 01:23:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="860971603" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="860971603" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 01:23:38 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1qi9Xb-0000000GMuR-2iAg; Mon, 18 Sep 2023 11:23:35 +0300 Date: Mon, 18 Sep 2023 11:23:35 +0300 From: Andy Shevchenko To: Huacai Chen , Guo Ren Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, WANG Xuerui Subject: Re: [PATCH v1 1/2] LoongArch: Add missing headers Message-ID: References: <20230914103445.511285-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 18 Sep 2023 01:26:19 -0700 (PDT) On Mon, Sep 18, 2023 at 04:05:50PM +0800, Huacai Chen wrote: > On Mon, Sep 18, 2023 at 2:49 PM Andy Shevchenko > wrote: > > On Sat, Sep 16, 2023 at 08:05:52PM +0800, Huacai Chen wrote: > > > On Sat, Sep 16, 2023 at 6:27 PM Andy Shevchenko > > > wrote: > > > > On Fri, Sep 15, 2023 at 08:36:24AM +0800, Huacai Chen wrote: > > > > > On Fri, Sep 15, 2023 at 2:53 AM 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 'missing' > > > > > 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, we 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 your 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_ using 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@loongson.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? -- With Best Regards, Andy Shevchenko