Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Eric Curtin" <ericcurtin17@gmail.com>
Cc: "Eric Curtin" <eric.curtin@docker.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org
Subject: Re: [RFC PATCH v2 02/13] mtd: mtdswap: Initialise mtdswap_ops with a page size variable
Date: Thu, 03 Dec 2026 03:17:42 +0000	[thread overview]
Message-ID: <sashiko-outbox-247074@kernel.org> (raw)
In-Reply-To: <20261202031647.1690622-3-ericcurtin17@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] mtd: mtdswap: build failure due to undefined
  DEFINE_GLOBAL_PAGE_SIZE_VAR()
--

commit b178596c8ff7600bf3ad7327fc98ef1f16353468
Author: Eric Curtin <eric.curtin@docker.com>

mtd: mtdswap: Initialise mtdswap_ops with a page size variable

This commit wraps the mtdswap_ops definition in DEFINE_GLOBAL_PAGE_SIZE_VAR()
so that its .blksize field can be initialized when PAGE_SIZE is not a
compile-time constant.

> diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
> index 92e38ece89317..8d3220a9c9598 100644
> --- a/drivers/mtd/mtdswap.c
> +++ b/drivers/mtd/mtdswap.c
> @@ -1472,7 +1472,7 @@ static void mtdswap_remove_dev(struct mtd_blktrans_dev *dev)
>  	kfree(d);
>  }
>  
> -static struct mtd_blktrans_ops mtdswap_ops = {
> +static DEFINE_GLOBAL_PAGE_SIZE_VAR(struct mtd_blktrans_ops, mtdswap_ops, {
>  	.name		= "mtdswap",
>  	.major		= 0,
>  	.part_bits	= 0,
> @@ -1485,7 +1485,7 @@ static struct mtd_blktrans_ops mtdswap_ops = {
>  	.add_mtd	= mtdswap_add_mtd,
>  	.remove_dev	= mtdswap_remove_dev,
>  	.owner		= THIS_MODULE,
> -};
> +});
>  
>  module_mtd_blktrans(mtdswap_ops);

[Severity: High]
Does this break the build when CONFIG_MTD_SWAP is enabled?
DEFINE_GLOBAL_PAGE_SIZE_VAR() is not defined anywhere in the kernel tree, so
compiling drivers/mtd/mtdswap.c fails and leaves mtdswap_ops undeclared for
module_mtd_blktrans(mtdswap_ops).

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202031647.1690622-1-ericcurtin17@gmail.com?part=2

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2026-12-03  3:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  3:16 [RFC PATCH v2 00/13] block/storage: Prepare for boot-time page size selection on arm64 Eric Curtin
2026-12-02  3:16 ` [RFC PATCH v2 02/13] mtd: mtdswap: Initialise mtdswap_ops with a page size variable Eric Curtin
2026-12-02 11:25   ` Miquel Raynal
2026-12-03  3:17   ` sashiko-bot [this message]
2026-12-02  3:16 ` [RFC PATCH v2 13/13] mm: Use PAGE_SIZE_MIN/MAX where a compile-time constant is required Eric Curtin
2026-12-03  3:17   ` sashiko-bot

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=sashiko-outbox-247074@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eric.curtin@docker.com \
    --cc=ericcurtin17@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vigneshr@ti.com \
    /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