All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org
Subject: Re: [PATCH] mm/gfp: Add kernel-doc for gfp_t
Date: Mon, 15 Feb 2021 23:07:08 +0200	[thread overview]
Message-ID: <20210215210708.GT299309@linux.ibm.com> (raw)
In-Reply-To: <20210215204909.3824509-1-willy@infradead.org>

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) <willy@infradead.org>

Acked-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
>  Documentation/core-api/mm-api.rst |  7 ++-----
>  include/linux/gfp.h               | 11 +++++++++++
>  2 files changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst
> index 2adffb3f7914..201b5423303b 100644
> --- a/Documentation/core-api/mm-api.rst
> +++ b/Documentation/core-api/mm-api.rst
> @@ -19,11 +19,8 @@ User Space Memory Access
>  Memory Allocation Controls
>  ==========================
>  
> -Functions which need to allocate memory often use GFP flags to express
> -how that memory should be allocated. The GFP acronym stands for "get
> -free pages", the underlying memory allocation function. Not every GFP
> -flag is allowed to every function which may allocate memory. Most
> -users will want to use a plain ``GFP_KERNEL``.
> +.. kernel-doc:: include/linux/gfp.h
> +   :internal:
>  
>  .. kernel-doc:: include/linux/gfp.h
>     :doc: Page mobility and placement hints
> diff --git a/include/linux/gfp.h b/include/linux/gfp.h
> index 52cd415b436c..ecd1b5d27936 100644
> --- a/include/linux/gfp.h
> +++ b/include/linux/gfp.h
> @@ -8,6 +8,17 @@
>  #include <linux/linkage.h>
>  #include <linux/topology.h>
>  
> +/**
> + * typedef gfp_t - Memory allocation flags.
> + *
> + * GFP flags are commonly used throughout Linux to indicate how memory
> + * should be allocated.  The GFP acronym stands for "get free pages",
> + * the underlying memory allocation function.  Not every GFP flag is
> + * supported by every function which may allocate memory.  Most users
> + * will want to use a plain ``GFP_KERNEL``.
> + */
> +typedef unsigned int __bitwise gfp_t;	// repeated here for kernel-doc
> +
>  struct vm_area_struct;
>  
>  /*
> -- 
> 2.29.2
> 

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2021-02-15 21:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 20:49 [PATCH] mm/gfp: Add kernel-doc for gfp_t Matthew Wilcox (Oracle)
2021-02-15 21:07 ` Mike Rapoport [this message]
2021-02-19 19:55 ` Nathan Chancellor
2021-02-19 20:54   ` Matthew Wilcox
2021-02-19 21:45     ` Nick Desaulniers
2021-02-19 22:15       ` Miguel Ojeda
2021-02-19 22:49         ` Nick Desaulniers
2021-02-20  9:43           ` Miguel Ojeda
2021-02-22 17:04     ` Nick Desaulniers
2021-02-22 17:16       ` Matthew Wilcox
2021-02-22 17:34         ` Nick Desaulniers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210215210708.GT299309@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.