From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) (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 5F6365225 for ; Mon, 18 Sep 2023 06:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695019795; x=1726555795; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=s13Nvbs3mBAq9NYXqy3wsR4au6DsVgO9kA2QvCPDpFQ=; b=VH1wxZgjhn0tReHqGYCT33u7r8ZfIRWmFvJPq4+m/dIe8UgfA52UzJ4t +p5bHyrZNxmnZv6txyLCjlWOrchjEKidv69myaRKJdLPyVyYKKB6NVfCD CPEBV+Hbz5B3ZAyB7fta2FNeki0GG8NQ2vhjBpxRaKIKQQOGOXdTJvVHQ 49tUBPHq6pRCF7/OUkaNoE0A03a6FPf+255EzqM6nMtwS8cYiiuhdhryP mF72WN9Ihq+f2Qwp+fOQJjlHtt7c51j1gAqGfpsRzc24d36ELlVGq+NU9 JJvyog8NcVtwazswY835JmSJz32grbTZ3MYTiv/ASH2/w/cnKD6+79V5L g==; X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="382322554" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="382322554" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2023 23:49:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="815900624" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="815900624" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga004.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Sep 2023 23:49:52 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC0) (envelope-from ) id 1qi84s-0000000DKWC-0L9V; Mon, 18 Sep 2023 09:49:50 +0300 Date: Mon, 18 Sep 2023 09:49:49 +0300 From: Andy Shevchenko To: Huacai Chen 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> Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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. -- With Best Regards, Andy Shevchenko