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=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham 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 7BF2AC433E0 for ; Fri, 19 Feb 2021 21:45:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0339B64E92 for ; Fri, 19 Feb 2021 21:45:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0339B64E92 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 4BB4E6B0005; Fri, 19 Feb 2021 16:45:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 46B676B006C; Fri, 19 Feb 2021 16:45:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 359C46B006E; Fri, 19 Feb 2021 16:45:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 185D66B0005 for ; Fri, 19 Feb 2021 16:45:56 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C11AA12C6 for ; Fri, 19 Feb 2021 21:45:55 +0000 (UTC) X-FDA: 77836350270.19.140D026 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by imf22.hostedemail.com (Postfix) with ESMTP id 500FFC000C52 for ; Fri, 19 Feb 2021 21:45:53 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id g1so23034196ljj.13 for ; Fri, 19 Feb 2021 13:45:55 -0800 (PST) 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=9Yj9b0cOoOte7DyX1XT2fxWFDmA/zf/aw4pjZ4LwenM=; b=apjvqwu8SLRyF8o16E/rXWsxY1mkpnoVwBoPusx4T4qatojke3H5xej1Uf1ZIC1/yd ARoVwJxoo5jYW3igl0BG2eyXyYalDuUK7EdiJ7POEd3Kj78SZKzbhxn1XqtEG733CzkJ YTEATE52AGViEdOeXmv20OT7tNxJ7RkgMAZWSnvLVyY101mydq6VJ7d/OVi8hX3oI/Uq yaIco3Qfb+DyWI9gkFs0cZhS3xhbLg/KRQhNbvIZaEyud0xJ0jiEct/Rk9Cd4+4uvDr5 ncWBaaeagszluVu0p9sgcs2Vr3ReohPi+SjME6DxwyYTYQXFIUGZgxac5UydoIfnV+b0 YsyQ== 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=9Yj9b0cOoOte7DyX1XT2fxWFDmA/zf/aw4pjZ4LwenM=; b=Deu9KlwYBtQokB4n74giakVmUALzwy8NUu7dWwR1juUTojWXuD8GMtdJPbLSaG6BRJ 0Kod3YsKjWE6QnWh1tDWeFZPVGBR+A4yremnzZ44lCmUCWdCkYl5ZEuNCvGaW2E1IzgV TJiGTNaP44kD8ZKZf+qrtZN7mK01yAf8RQkdga5pdUhCNS0C8g1o07aJ7d5EaODTw/IT fgrP9OXnMskXR1iuO7tLz7dgcsPddRrlsPcGs6e4XNkLLUZCUOZBOKwGEuOvsdJsiSul MLsVOlBT6BbeysE0EIpklFMKcr8GlDQRrWltp9CiGM4BUF7RJXFLMxw00grHeaooLkl7 9yDw== X-Gm-Message-State: AOAM532c2vq6O62hqRNiYN/zXWvq7VHvb9aqdnblbmEMvxPflTmz0yA2 ddqu6JE0ZhYaQtl641Ix3ARz7Pn7Qd6me68Xq5daXg== X-Google-Smtp-Source: ABdhPJyVthxg93LYFj+vsRPTZKCcw9isuTEi4Pi7iHCHYuNFuiFaw6LRglctOW7jP/7jBS+TsQy4NGYzHdMxuucV45o= X-Received: by 2002:a2e:2a83:: with SMTP id q125mr6849598ljq.244.1613771152618; Fri, 19 Feb 2021 13:45:52 -0800 (PST) MIME-Version: 1.0 References: <20210215204909.3824509-1-willy@infradead.org> <20210219195509.GA59987@24bbad8f3778> <20210219205403.GX2858050@casper.infradead.org> In-Reply-To: <20210219205403.GX2858050@casper.infradead.org> From: Nick Desaulniers Date: Fri, 19 Feb 2021 13:45:38 -0800 Message-ID: Subject: Re: [PATCH] mm/gfp: Add kernel-doc for gfp_t To: Matthew Wilcox , Nathan Chancellor Cc: Andrew Morton , Linux Memory Management List , Mike Rapoport , clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: 8en9izds94obkdwjsarpgptchqn1dcm9 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 500FFC000C52 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf22; identity=mailfrom; envelope-from=""; helo=mail-lj1-f175.google.com; client-ip=209.85.208.175 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1613771153-157115 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 Fri, Feb 19, 2021 at 12:55 PM Matthew Wilcox wrote: > > On Fri, Feb 19, 2021 at 12:55:09PM -0700, Nathan Chancellor wrote: > > On Mon, Feb 15, 2021 at 08:49:09PM +0000, Matthew Wilcox (Oracle) wrote: > > > The generated html will link to the definition of the gfp_t automatically > > > once we define it. Move the one-paragraph overview of GFP flags from the > > > documentation directory into gfp.h and pull gfp.h into the documentation. > > > > > > Signed-off-by: Matthew Wilcox (Oracle) > > > > This patch causes a clang warning in basically every file on linux-next > > now: > > > > include/linux/gfp.h:20:32: warning: redefinition of typedef 'gfp_t' is a C11 feature [-Wtypedef-redefinition] > > Seems like it's also a gnu89 feature. I'm not sure a lack of a warning is an intentional feature, and would bet that behavior is not documented. That said, I'm fine disabling this warning; there's a separate error for redefining a typedef to a different underlying type. That's what's useful IMO, this one really is not. This warning doesn't really provide any value to us in the kernel; I would guess the intent was to be helpful to code expected to be portable across different -std=*, but that's not the case for the Linux kernel. (It's also trivial to change this in Clang, but we'd have to disable this warning for older supported of clang anyways). diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index cee107096947..63529a43e797 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -2381,7 +2381,7 @@ void Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, } // Modules always permit redefinition of typedefs, as does C11. - if (getLangOpts().Modules || getLangOpts().C11) + if (getLangOpts().Modules || getLangOpts().C11 || getLangOpts().GNUMode) return; // If we have a redefinition of a typedef in C, emit a warning. This warning -- Thanks, ~Nick Desaulniers