From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 057FAC48BE5 for ; Tue, 15 Jun 2021 18:50:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8B18F6128B for ; Tue, 15 Jun 2021 18:50:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B18F6128B Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1ED526B0070; Tue, 15 Jun 2021 14:50:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1C4C66B0071; Tue, 15 Jun 2021 14:50:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03DBC6B0072; Tue, 15 Jun 2021 14:50:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id C331C6B0070 for ; Tue, 15 Jun 2021 14:50:53 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5AADB180AD806 for ; Tue, 15 Jun 2021 18:50:53 +0000 (UTC) X-FDA: 78256849986.35.5B7F618 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by imf30.hostedemail.com (Postfix) with ESMTP id D0852E000200 for ; Tue, 15 Jun 2021 18:50:46 +0000 (UTC) Received: by mail-lf1-f52.google.com with SMTP id m21so28571938lfg.13 for ; Tue, 15 Jun 2021 11:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Iubz5lzaW04IsVrDp95X3mdgjAzMibu4/D8e2h1KDTQ=; b=T9sPu37g3PQQXGW0XUIhqGrbRLtqtl/0/eJrZFjZpMPfgng7bG6vaNIWbcJwUM6Y5k PtVD24t3MZ0Z5plnGQJW59s+dgk36tX0Wl9ba+xrxvyxyf1baq++zda/b0DyD426IO5W 0bKkz7T9vxWQ5jonaS0NY0X+SPzn3jAaBCheOlbEnneYF993mVs2Tl5FSd4gm6tNAqhC 3GS52YVAGq/pgpKYYIx8drIYhQ0tdt8Orxy8SGRAkPgP+TaewCvif3TxNsAFt6Z0TaQl P5riKpQL4WcO/orVoj9SOd+qmiEIoL8YOIo7eEcBnKljMEE934xHLzeWm5hO1/pZF/0l vB8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Iubz5lzaW04IsVrDp95X3mdgjAzMibu4/D8e2h1KDTQ=; b=m4H6m39L+aQ21GZ7Es1QSYNb8fTT7YM5JgWdgSW/QdD1Oj/o4Rux66TNiQXYchSZei Y82oua+PcqpS3VqoUKodU5I7Ekpi3sexz1bDrcU2ZxHB6LpzYIRQweovfxwFdsGyizH6 fFIE1KdlyTXQTTBQ8NbHCqLPS/qJwPRt3WhhF/sAta7BYxZolpAvxI8apxsOR2jXkZE4 8u9uAV71jGXo/XlOn25tuEhxetH4+R/NSbc8kYrn0uF21mk+EF4fa1cu14ErZhEXJmyL aqtsU+PkPkbb0uZABqbK7gDgXpHgiiHLQCBLtf0qFPR9ViJ5S/4Htc+tzf+Ed3L+Dpcg E5Ig== X-Gm-Message-State: AOAM531UEaDaJFynB6EHH+9sfVud96/Om5Gp5bCPY3tDb/B4tRtHe8Mv 9S9rGVjL0NftRfGtdyO7oPhPBHIu5d4GzU7dvw01hQ== X-Google-Smtp-Source: ABdhPJxXp/No4FbnkV16ct1oyhejT7ndlkRBBh1Ko0yO35InBWn+aGLBNEF675Ga+LqZI3dPXvORpT194GnP7nqnnTQ= X-Received: by 2002:a05:6512:51c:: with SMTP id o28mr578440lfb.297.1623783051165; Tue, 15 Jun 2021 11:50:51 -0700 (PDT) MIME-Version: 1.0 References: <202106152328.Mh5S48hE-lkp@intel.com> In-Reply-To: From: Nick Desaulniers Date: Tue, 15 Jun 2021 11:50:40 -0700 Message-ID: Subject: Re: [linux-next:master 9529/10007] mm/hugetlb.c:1591:9: warning: no previous prototype for function 'hugetlb_basepage_index' To: Nathan Chancellor Cc: Matthew Wilcox , kernel test robot , Hugh Dickins , kbuild-all@lists.01.org, clang-built-linux , Linux Memory Management List , Andrew Morton Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=T9sPu37g; spf=pass (imf30.hostedemail.com: domain of ndesaulniers@google.com designates 209.85.167.52 as permitted sender) smtp.mailfrom=ndesaulniers@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D0852E000200 X-Stat-Signature: zaah5oggocwiyuzfz7rs7zidipas41ix X-HE-Tag: 1623783046-656595 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 15, 2021 at 11:32 AM Nathan Chancellor wrote: > > On Tue, Jun 15, 2021 at 05:03:40PM +0100, Matthew Wilcox wrote: > > On Tue, Jun 15, 2021 at 11:58:36PM +0800, kernel test robot wrote: > > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 > > > > > > If you fix the issue, kindly add following tag as appropriate > > > Reported-by: kernel test robot > > > > > > All warnings (new ones prefixed by >>): > > > > > > >> mm/hugetlb.c:1591:9: warning: no previous prototype for function 'hugetlb_basepage_index' [-Wmissing-prototypes] > > > pgoff_t hugetlb_basepage_index(struct page *page) > > > > So clang requires the prototype to still be in scope, while gcc doesn't. > > Does one of our clangers want to file a bug about that? > > I see the exact same warning with GCC 11.1.0: > > $ curl -LSs https://lore.kernel.org/linux-mm/202106152328.Mh5S48hE-lkp@intel.com/2-a.bin | gzip -d > .config > > $ make -skj"$(nproc)" ARCH=arm64 CROSS_COMPILE=aarch64-linux- W=1 olddefconfig mm/hugetlb.c > mm/hugetlb.c:1591:9: warning: no previous prototype for 'hugetlb_basepage_index' [-Wmissing-prototypes] > 1591 | pgoff_t hugetlb_basepage_index(struct page *page) > | ^~~~~~~~~~~~~~~~~~~~~~ Since this is a commonly recurring warning for W=1 builds, then this function either should be declared as having static linkage if its uses are local to the same file, or a prototype should be declared in a header so that callers and callee agree on function signature. -- Thanks, ~Nick Desaulniers