Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6025879rdb; Mon, 18 Sep 2023 01:24:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHzIiOf7ONxirvPlZMgmENBAkioWUN8agWo+LqGGE7JSStZrBAO02R6igx0kwYajdx76eup X-Received: by 2002:a17:902:e9d1:b0:1c4:375c:110a with SMTP id 17-20020a170902e9d100b001c4375c110amr8212364plk.19.1695025483074; Mon, 18 Sep 2023 01:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695025483; cv=none; d=google.com; s=arc-20160816; b=Y2nfRIA/rY5CJeOpudi52SIziv9jWVdQaItz088RqDUUGR8FDszzF6b3tSWcnHi/w0 WeuRJP0+n/VdpTg2NV9NfprHPFGp9F3KSRVGb1rNtanuKFXBLknYU2Wov7T1uPLLmRYF uwLGri3puX3MDBf88mJW/jKzKeA9ra+b1VTGRGnNJW4iWlpHtlNugtKRBFqzzet2B/Xb v0R9w1+B9i3Yaf4lLEmdsEg2KqQ4oXdQTODMmrqLdjbwfzVqF7PCdzjX3NYqufsU6B6R FHdqzWYG9kW0E6+9PvMY6+QpKNjG6ESRZnz4TtCPVBX8aFmRszyV+D441QRYpdoLyDfy rQiQ== 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=AxhP1qUZ6L8D85WygjwNWOG3OogI8UwnrtK6B11kuho=; fh=B5++4cMppFE2yG4hsL7dvFab9ytNWwYSrHNRaMWIu5Y=; b=0HiL+iBheOTu6b97kFaCVd9KePZePeooq8tvA2dAboO9t0NFO616tDAsyMc+3ps+Is 1avuPRPiRZ/AtrhGfKnZIPu1K3zVrniM74+0yq2BXaV/0gZ6WYCHz0u0MMBse/f3q0Ox 0U8bGsZvfFQwe6eKDQD/RPFba1k3/ML0TA/3VYHlojT5+EsWFKkt6mlBUx/aMCvkaP4I AcBKT8vX/Tu1BYqXV3amm/N7PW6vkI0RAfml2EmVT1Kjim9IbzirwJNK7FZMRS5psCNq Wvh/auOgOJdk4goAz31IGFfcWqL9msC/Fj4IlQAPw5iw5tVr+VXpgKVuyaHmQN7NRItp IwTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ev0bMudm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id la4-20020a170902fa0400b001bf1d1d99ddsi7457257plb.295.2023.09.18.01.24.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 01:24:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ev0bMudm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 689AB8078C8B; Mon, 18 Sep 2023 01:09:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240288AbjIRIIl (ORCPT + 99 others); Mon, 18 Sep 2023 04:08:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240642AbjIRIIY (ORCPT ); Mon, 18 Sep 2023 04:08:24 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B5341AD for ; Mon, 18 Sep 2023 01:06:04 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35444C433CA for ; Mon, 18 Sep 2023 08:06:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695024364; bh=AxhP1qUZ6L8D85WygjwNWOG3OogI8UwnrtK6B11kuho=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ev0bMudmfGo1Sm5fm2k7W1Pz9Sc41I8Oxj/tg9dQLDH7oPS5/rQ4HI9q/QIHbNO0s 5q++zG0X6c9MOEeie/uiQpP/r6N0nV2eeKlsyR88/4DbBWPEg8hy9+ca71B63dtff3 S1tl/9Y+iLS4JX3qBNFzoYwRPiphVu5Hy/ASiA9RCueATCjs7QCE0tqiViSpGk2/O6 jBsKHDSKJzTADQcKxVowR/d885gHV2qWq+xWHNgwMkNDDrvn4HzEFJcz6WbxHCul8n QWZD2liOEkKooGwXIMDWixVcWy9baVErtS12qGXdgk4cJ4wy5YIiZeu5uhUPXAKnWg rzlrDp51xZBpA== Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-52c88a03f99so4795204a12.2 for ; Mon, 18 Sep 2023 01:06:04 -0700 (PDT) X-Gm-Message-State: AOJu0YwpcpbUCG4KZn8gahbGzLgbvtCGbLvr+sypzFlLmAsQRqR78Lbt 1RlncLcr5bJP6NDBOaLCQcTdA3g++PbPWSULtwo= X-Received: by 2002:a05:6402:14c4:b0:530:4fc4:50f8 with SMTP id f4-20020a05640214c400b005304fc450f8mr6228588edx.29.1695024362563; Mon, 18 Sep 2023 01:06:02 -0700 (PDT) MIME-Version: 1.0 References: <20230914103445.511285-1-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Huacai Chen Date: Mon, 18 Sep 2023 16:05:50 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/2] LoongArch: Add missing headers To: Andy Shevchenko Cc: 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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 18 Sep 2023 01:09:19 -0700 (PDT) Hi, Andy, 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 belo= w? > > > > > > 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 lin= ker. > > > > > > > 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 ha= ve not > to imply any other inclusions done by others, unless it's kinda same fami= ly of > headers (like types.h always includes compiler_types.h). Since in your ca= se > 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@loongs= on.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. Huacai > > > -- > With Best Regards, > Andy Shevchenko > > >