Skip to contentSkip to conversation

mtd: spi-nor: Indent SF: just like other boot time messages

PATCH Superseded Marek Vasut 5 participants 10 messages Jun 11 – Oct 26 Memory technology devices (MTD)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: spi-nor: Indent SF: just like other boot time messages

From: Alexander Koch <[email protected]>

Indent SF: just like other boot time messages. Change the original indent:

"

DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF: Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB

"

to the fixed indent:

"

DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
    ^^^

"

No functional change.

---
Cc: Alexander Koch <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Flaviu Nistor <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Takahiro Kuwano <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Tudor Ambarus <[email protected]>
Cc: Vignesh R <[email protected]>
Cc: [email protected]

---
 drivers/mtd/spi/spi-nor-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi/spi-nor-core.c +1 -1
index 937d79af64e..c73f2c7c3f8 100644
@@ -4758,7 +4758,7 @@ int spi_nor_scan(struct spi_nor *nor)
 	nor->sector_size = mtd->erasesize;
 
 #ifndef CONFIG_XPL_BUILD
-	printf("SF: Detected %s with page size ", nor->name);
+	printf("SF:    Detected %s with page size ", nor->name);
 	print_size(nor->page_size, ", erase size ");
 	print_size(nor->erase_size, ", total ");
 	print_size(nor->size, "");
Signature · 1 line
2.53.0
#1 lore raw
Quoted 23 lines · Marek Vasut

From: Alexander Koch <[email protected]>

Indent SF: just like other boot time messages. Change the original indent:

"

DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF: Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB

"

to the fixed indent:

"

DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
    ^^^

"

No functional change.

Quoted 11 lines

---
Cc: Alexander Koch <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Flaviu Nistor <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Takahiro Kuwano <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Tudor Ambarus <[email protected]>
Cc: Vignesh R <[email protected]>
Cc: [email protected]
---

Sorry for the delay on this patch. It breaks the tests which expect the current spacing:
https://git.u-boot-project.org/u-boot/u-boot/-/jobs/124896#L292

Signature · 1 line
Tom
#2 lore raw

On 10/24/26 4:23 PM, Tom Rini wrote:

Hello Tom,

Quoted 35 lines
Quoted 23 lines

From: Alexander Koch <[email protected]>

Indent SF: just like other boot time messages. Change the original indent:

"

DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF: Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB

"

to the fixed indent:

"

DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
     ^^^

"

No functional change.

Quoted 11 lines

---
Cc: Alexander Koch <[email protected]>
Cc: David Lechner <[email protected]>
Cc: Flaviu Nistor <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Takahiro Kuwano <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Tudor Ambarus <[email protected]>
Cc: Vignesh R <[email protected]>
Cc: [email protected]
---

Quoted 3 lines

Sorry for the delay on this patch. It breaks the tests which expect the current spacing:
https://git.u-boot-project.org/u-boot/u-boot/-/jobs/124896#L292

I've sent V2 now with that fixed.

#3 lore raw
In reply to Marek Vasut
Quoted 7 lines

to the fixed indent:

"

DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
    ^^^

I'm probably not the targeted audience, but FWIW, I find the meaning of "SF" non-obvious, so maybe instead of adding spaces, we could use those 3 extra characters to come up with a slightly more self-explanatory abbreviation?

=== Stefan

#4 lore raw
Quoted 8 lines · Stefan Monnier
Quoted 7 lines

to the fixed indent:

"

DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
     ^^^
Quoted 4 lines

I'm probably not the targeted audience, but FWIW, I find the meaning of "SF" non-obvious, so maybe instead of adding spaces, we could use those 3 extra characters to come up with a slightly more self-explanatory abbreviation?

SF is SPI Flash , it is used all over the code base.

#5 lore raw
Quoted 10 lines · Marek Vasut
Quoted 9 lines · Stefan Monnier
Quoted 8 lines

to the fixed indent:

"
DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate
SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
     ^^^

Quoted 5 lines
Quoted 4 lines

I'm probably not the targeted audience, but FWIW, I find the meaning of "SF" non-obvious, so maybe instead of adding spaces, we could use those 3 extra characters to come up with a slightly more self-explanatory abbreviation?

SF is SPI Flash , it is used all over the code base.

I also find the meaning of "SF" non-obvious, and nothing better comes to mind to abbreviate it. You cannot get to "sf" command from "spi flash" or "flash" commands. If the probe message would say "SPI [NOR|NAND] Flash detected ...." or "SPI: [NOR|NAND] Flash detected ..." it would have the context needed, else I have to look up a part number or make a guess what that is about, remembering the first time I was confused about this. It could be easier, but I don't know if that's better.

The indent change looks okay to me, a few bytes' increase, if there is no \t tabstop to reduce byte count and get the same effect.

-E

#6 lore raw
Quoted 11 lines · E Shattow [2026-10-25 06:29:43] wrote:
Quoted 10 lines · Marek Vasut
Quoted 9 lines · Stefan Monnier
Quoted 8 lines

to the fixed indent:

"
DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
     ^^^

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

I'm probably not the targeted audience, but FWIW, I find the meaning of "SF" non-obvious, so maybe instead of adding spaces, we could use those 3 extra characters to come up with a slightly more self-explanatory abbreviation?

SF is SPI Flash , it is used all over the code base.

Yes, that's indeed how I figured what it meant, but it would be better if users could figure that out without having to consult the source code.

Quoted 4 lines

I also find the meaning of "SF" non-obvious, and nothing better comes to mind to abbreviate it. You cannot get to "sf" command from "spi flash" or "flash" commands. If the probe message would say "SPI [NOR|NAND] Flash detected ...." or "SPI: [NOR|NAND] Flash detected ..." it would

How 'bout

SPI: 16MB flash (w25q128jw) with page size 256 Bytes, erase size 4 KiB

=== Stefan

#7 lore raw

Hi Stefan,

Quoted 27 lines · Stefan Monnier
Quoted 11 lines · E Shattow [2026-10-25 06:29:43] wrote:
Quoted 10 lines · Marek Vasut
Quoted 9 lines · Stefan Monnier
Quoted 8 lines

to the fixed indent:

"
DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
     ^^^

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

I'm probably not the targeted audience, but FWIW, I find the meaning of "SF" non-obvious, so maybe instead of adding spaces, we could use those 3 extra characters to come up with a slightly more self-explanatory abbreviation?

SF is SPI Flash , it is used all over the code base.

Yes, that's indeed how I figured what it meant, but it would be better if users could figure that out without having to consult the source code.

Quoted 4 lines

I also find the meaning of "SF" non-obvious, and nothing better comes to mind to abbreviate it. You cannot get to "sf" command from "spi flash" or "flash" commands. If the probe message would say "SPI [NOR|NAND] Flash detected ...." or "SPI: [NOR|NAND] Flash detected ..." it would

Quoted 7 lines

How 'bout

SPI: 16MB flash (w25q128jw) with page size 256 Bytes, erase size 4 KiB

=== Stefan

If we can spare the bytes then "SF: SPI Flash 16MB w25q128jw with page size 256 Bytes, erase size" answers the context concern for me. The name of the config is SPI_FLASH so doing anything in a different order or to be clever is not as good to my eye.

'sf' command is only ever used for NOR? Never NAND?

Also don't take this as changes requested from me, I'd just as soon leave it alone. I'm acknowledging that it's awkward and if you want to make it better I'll give an opinion on it, but that's it. ;)

-E

maintainer
#8 lore raw
In reply to Stefan Monnier
Quoted 13 lines · Stefan Monnier
Quoted 11 lines · E Shattow [2026-10-25 06:29:43] wrote:
Quoted 10 lines · Marek Vasut
Quoted 9 lines · Stefan Monnier
Quoted 8 lines

to the fixed indent:

"
DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
     ^^^

Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

I'm probably not the targeted audience, but FWIW, I find the meaning of "SF" non-obvious, so maybe instead of adding spaces, we could use those 3 extra characters to come up with a slightly more self-explanatory abbreviation?

SF is SPI Flash , it is used all over the code base.

Yes, that's indeed how I figured what it meant, but it would be better if users could figure that out without having to consult the source code.

Quoted 4 lines

I also find the meaning of "SF" non-obvious, and nothing better comes to mind to abbreviate it. You cannot get to "sf" command from "spi flash" or "flash" commands. If the probe message would say "SPI [NOR|NAND] Flash detected ...." or "SPI: [NOR|NAND] Flash detected ..." it would

Except sf is only about SPI NORs, not SPI NANDs. The tool has been here for ages, it is light, but very limited (single chip, spi nor only). People may use the mtd tool instead, which is much heavier (requires the mtd layer which is optional) but flash/bus agnostic. All this to say, I don't know how to make a better shortcut for it, and yes this acronym is already sparkled all over the place.

SPINOR:Detected

would fit, but no more space ;)

#9 lore raw
Quoted 36 lines · Miquel Raynal
Quoted 13 lines · Stefan Monnier
Quoted 11 lines · E Shattow [2026-10-25 06:29:43] wrote:
Quoted 10 lines · Marek Vasut
Quoted 9 lines · Stefan Monnier
Quoted 8 lines

to the fixed indent:

"
DRAM:  3.5 GiB
Core:  310 devices, 34 uclasses, devicetree: separate SF:    Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
     ^^^

Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

I'm probably not the targeted audience, but FWIW, I find the meaning of "SF" non-obvious, so maybe instead of adding spaces, we could use those 3 extra characters to come up with a slightly more self-explanatory abbreviation?

SF is SPI Flash , it is used all over the code base.

Yes, that's indeed how I figured what it meant, but it would be better if users could figure that out without having to consult the source code.

Quoted 4 lines

I also find the meaning of "SF" non-obvious, and nothing better comes to mind to abbreviate it. You cannot get to "sf" command from "spi flash" or "flash" commands. If the probe message would say "SPI [NOR|NAND] Flash detected ...." or "SPI: [NOR|NAND] Flash detected ..." it would

Except sf is only about SPI NORs, not SPI NANDs. The tool has been here for ages, it is light, but very limited (single chip, spi nor only). People may use the mtd tool instead, which is much heavier (requires the mtd layer which is optional) but flash/bus agnostic. All this to say, I don't know how to make a better shortcut for it, and yes this acronym is already sparkled all over the place.

Quoted 4 lines

SPINOR:Detected

would fit, but no more space ;)

The word choice of "Detected" is informative, but not very useful when missing the contextual clue of "what is 'S' in 'SF:' ?"

SF: Detected w25q128jw with page size 256 Bytes, erase size 4 KiB, total 16 MiB

SF: SPI flash w25q128jw page size 256 Bytes, erase size 4 KiB, total
16 MiB
SF: w25q128jw SPI flash page size 256 Bytes, erase size 4 KiB, total
16 MiB

SF:    SPI NOR w25q128jw page size 256 Bytes, erase size 4 KiB, total 16 MiB
SF:    SPI NAND w25q128jw page size 256 Bytes, erase size 4 KiB, total

16 MiB

SF:    w25q128jw SPI NOR page size 256 Bytes, erase size 4 KiB, total 16 MiB
SF:    w25q128jw SPI NAND page size 256 Bytes, erase size 4 KiB, total

16 MiB

SF:    w25q128jw page size 256 Bytes, erase size 4 KiB, total 16 MiB SPI NOR
SF:    w25q128jw page size 256 Bytes, erase size 4 KiB, total 16 MiB SPI

NAND

Save a byte and add the context along with the indent you are suggesting. Leave headroom for dropping "flash" and substituted with [NOR|NAND] if the command does grow to beyond a single type. Guessing that "F" in "SF" means something is easier if we are shown what the meaning of "S" in "SF" is.

-E