public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Adrian Zaharia <Adrian.Zaharia@windriver.com>
To: <linux-mtd@lists.infradead.org>
Cc: <miquel.raynal@bootlin.com>, <richard@nod.at>, <vigneshr@ti.com>,
	<jani.nurminen@windriver.com>, <adrian.zaharia@windriver.com>,
	<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: [PATCH 1/1] mtd: mtdpart: Fix cosmetic print
Date: Thu, 25 Aug 2022 09:04:07 +0300	[thread overview]
Message-ID: <20220825060407.335475-2-Adrian.Zaharia@windriver.com> (raw)
In-Reply-To: <20220825060407.335475-1-Adrian.Zaharia@windriver.com>

From: Jani Nurminen <jani.nurminen@windriver.com>

The print of the MTD partitions during boot are off-by-one for the size.
Fix this and show the real last offset.

Fixes: 3d6f657ced2b ("mtd: mtdpart: Fix cosmetic print")
Signed-off-by: Jani Nurminen <jani.nurminen@windriver.com>
Signed-off-by: Adrian Zaharia <Adrian.Zaharia@windriver.com>
---
 drivers/mtd/mtdpart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index d442fa94c872..fab10e6d4171 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -118,7 +118,7 @@ static struct mtd_info *allocate_partition(struct mtd_info *parent,
 		child->part.size = parent_size - child->part.offset;
 
 	printk(KERN_NOTICE "0x%012llx-0x%012llx : \"%s\"\n",
-	       child->part.offset, child->part.offset + child->part.size,
+	       child->part.offset, child->part.offset + child->part.size - 1,
 	       child->name);
 
 	/* let's do some sanity checks */
-- 
2.37.2


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

  reply	other threads:[~2022-08-25  6:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25  6:04 [PATCH 0/1] mtd: mtdpart: Fix cosmetic print Adrian Zaharia
2022-08-25  6:04 ` Adrian Zaharia [this message]
2022-09-13  7:37   ` [PATCH 1/1] " Rafał Miłecki
2022-09-19 15:57     ` Miquel Raynal
2022-09-13  5:25 ` [PATCH 0/1] " Rafał Miłecki

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=20220825060407.335475-2-Adrian.Zaharia@windriver.com \
    --to=adrian.zaharia@windriver.com \
    --cc=jani.nurminen@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=stable@vger.kernel.org \
    --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