* [PATCH 0/1] mtd: mtdpart: Fix cosmetic print
@ 2022-08-25 6:04 Adrian Zaharia
2022-08-25 6:04 ` [PATCH 1/1] " Adrian Zaharia
2022-09-13 5:25 ` [PATCH 0/1] " Rafał Miłecki
0 siblings, 2 replies; 5+ messages in thread
From: Adrian Zaharia @ 2022-08-25 6:04 UTC (permalink / raw)
To: linux-mtd
Cc: miquel.raynal, richard, vigneshr, jani.nurminen, adrian.zaharia,
linux-kernel, stable
The print of the MTD partitions during boot are off-by-one for the size.
This patch fixes this issue and shows the real last offset.
Jani Nurminen (1):
mtd: mtdpart: Fix cosmetic print
drivers/mtd/mtdpart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: 072e51356cd5a4a1c12c1020bc054c99b98333df
--
2.37.2
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] mtd: mtdpart: Fix cosmetic print
2022-08-25 6:04 [PATCH 0/1] mtd: mtdpart: Fix cosmetic print Adrian Zaharia
@ 2022-08-25 6:04 ` Adrian Zaharia
2022-09-13 7:37 ` Rafał Miłecki
2022-09-13 5:25 ` [PATCH 0/1] " Rafał Miłecki
1 sibling, 1 reply; 5+ messages in thread
From: Adrian Zaharia @ 2022-08-25 6:04 UTC (permalink / raw)
To: linux-mtd
Cc: miquel.raynal, richard, vigneshr, jani.nurminen, adrian.zaharia,
linux-kernel, stable
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/
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] mtd: mtdpart: Fix cosmetic print
2022-08-25 6:04 [PATCH 0/1] mtd: mtdpart: Fix cosmetic print Adrian Zaharia
2022-08-25 6:04 ` [PATCH 1/1] " Adrian Zaharia
@ 2022-09-13 5:25 ` Rafał Miłecki
1 sibling, 0 replies; 5+ messages in thread
From: Rafał Miłecki @ 2022-09-13 5:25 UTC (permalink / raw)
To: Adrian Zaharia, linux-mtd
Cc: miquel.raynal, richard, vigneshr, jani.nurminen, linux-kernel, stable
Hi,
On 25.08.2022 08:04, Adrian Zaharia wrote:
> The print of the MTD partitions during boot are off-by-one for the size.
> This patch fixes this issue and shows the real last offset.
>
> Jani Nurminen (1):
> mtd: mtdpart: Fix cosmetic print
>
> drivers/mtd/mtdpart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> base-commit: 072e51356cd5a4a1c12c1020bc054c99b98333df
this cover latter (0/1) is rather useless. Doesn't say anything more
than actual (and the only) patch 1/1.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] mtd: mtdpart: Fix cosmetic print
2022-08-25 6:04 ` [PATCH 1/1] " Adrian Zaharia
@ 2022-09-13 7:37 ` Rafał Miłecki
2022-09-19 15:57 ` Miquel Raynal
0 siblings, 1 reply; 5+ messages in thread
From: Rafał Miłecki @ 2022-09-13 7:37 UTC (permalink / raw)
To: Adrian Zaharia, linux-mtd
Cc: miquel.raynal, richard, vigneshr, jani.nurminen, linux-kernel, stable
On 25.08.2022 08:04, Adrian Zaharia wrote:
> 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.
I see that PCI subsystem and printk() + %pR do that. Probably more. I
guess it makes sense but I'm also wondering if/how confusing is that
change going to be for users. We did printing like that for probably
dozens of years.
> Fixes: 3d6f657ced2b ("mtd: mtdpart: Fix cosmetic print")
I can't find that hash / commit anywhere. Are you sure it exists?
> 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 */
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] mtd: mtdpart: Fix cosmetic print
2022-09-13 7:37 ` Rafał Miłecki
@ 2022-09-19 15:57 ` Miquel Raynal
0 siblings, 0 replies; 5+ messages in thread
From: Miquel Raynal @ 2022-09-19 15:57 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Adrian Zaharia, linux-mtd, richard, vigneshr, jani.nurminen,
linux-kernel, stable
Hello,
zajec5@gmail.com wrote on Tue, 13 Sep 2022 09:37:21 +0200:
> On 25.08.2022 08:04, Adrian Zaharia wrote:
> > 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.
>
> I see that PCI subsystem and printk() + %pR do that. Probably more. I
> guess it makes sense but I'm also wondering if/how confusing is that
> change going to be for users. We did printing like that for probably
> dozens of years.
Agreed, I would rather not mess with this output which might be
considered part of the ABI, I am sure there are plenty of scripts out
there which do silly things with those lines :-)
>
>
> > Fixes: 3d6f657ced2b ("mtd: mtdpart: Fix cosmetic print")
>
> I can't find that hash / commit anywhere. Are you sure it exists?
>
>
> > 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 */
>
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-19 15:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 6:04 [PATCH 0/1] mtd: mtdpart: Fix cosmetic print Adrian Zaharia
2022-08-25 6:04 ` [PATCH 1/1] " Adrian Zaharia
2022-09-13 7:37 ` Rafał Miłecki
2022-09-19 15:57 ` Miquel Raynal
2022-09-13 5:25 ` [PATCH 0/1] " Rafał Miłecki
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).