linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Make some folio and page function arguments const and use bool
Date: Thu, 10 Nov 2022 20:03:58 +0000	[thread overview]
Message-ID: <Y21ZLhbRDv1TKMR6@casper.infradead.org> (raw)
In-Reply-To: <166810136860.3462948.16794726061248137027.stgit@warthog.procyon.org.uk>

On Thu, Nov 10, 2022 at 05:29:28PM +0000, David Howells wrote:
> Mark the folio* argument to some of the folio accessor functions as a const
> pointer and similarly make some page* arguments to some page functions
> const.

I think the build bots are going to whinge.

#ifdef CONFIG_DEBUG_VM_PGFLAGS
#define VM_BUG_ON_PGFLAGS(cond, page) VM_BUG_ON_PAGE(cond, page)

#define VM_BUG_ON_PAGE(cond, page)                                      \
        do {                                                            \
                if (unlikely(cond)) {                                   \
                        dump_page(page, "VM_BUG_ON_PAGE(" __stringify(cond)")");

void dump_page(struct page *page, const char *reason);

I've looked at making dump_page() take a const struct page * in the past,
but it's a lot of work.

Do you really need this or is this a Friday afternoon project?

  reply	other threads:[~2022-11-10 20:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 17:29 [PATCH] mm: Make some folio and page function arguments const and use bool David Howells
2022-11-10 20:03 ` Matthew Wilcox [this message]
2022-11-10 22:21 ` kernel test robot
2022-11-11 20:05 ` kernel test robot

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=Y21ZLhbRDv1TKMR6@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).