Skip to contentSkip to conversation

PCI: eliminate abnormal characters when reads help information of "PCI_P2PDMA" under menuconfig

PATCH In review Liu Song 3 participants 6 messages Jul 20, 2022 – Oct 6, 2023 PCI

lore
Share & tools
lore

Liu Song

author
#0 lore raw

PATCH 1/1 PCI: eliminate abnormal characters when reads help information of "PCI_P2PDMA" under menuconfig

From: Liu Song <[email protected]>

Read the help information of PCI_P2PDMA through make menuconfig, "Enables" is partially displayed as garbled characters, so fix it.

---
 drivers/pci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +1 -1
index 133c732..8102b78 100644
@@ -166,7 +166,7 @@ config PCI_P2PDMA
 	depends on ZONE_DEVICE
 	select GENERIC_ALLOCATOR
 	help
-	  Enableѕ drivers to do PCI peer-to-peer transactions to and from
+	  Enables drivers to do PCI peer-to-peer transactions to and from
 	  BARs that are exposed in other devices that are the part of
 	  the hierarchy where peer-to-peer DMA is guaranteed by the PCI
 	  specification to work (ie. anything below a single PCI bridge).
Signature · 1 line
1.8.3.1
Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Liu Song

From: Liu Song <[email protected]>

Read the help information of PCI_P2PDMA through make menuconfig, "Enables" is partially displayed as garbled characters, so fix it.

Thanks.

Quoted 17 lines
---
 drivers/pci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +1 -1
index 133c732..8102b78 100644
@@ -166,7 +166,7 @@ config PCI_P2PDMA
 	depends on ZONE_DEVICE
 	select GENERIC_ALLOCATOR
 	help
-	  Enableѕ drivers to do PCI peer-to-peer transactions to and from
+	  Enables drivers to do PCI peer-to-peer transactions to and from
 	  BARs that are exposed in other devices that are the part of
 	  the hierarchy where peer-to-peer DMA is guaranteed by the PCI
 	  specification to work (ie. anything below a single PCI bridge).
Signature · 1 line
~Randy
#2 lore raw
In reply to Liu Song

[+cc Andy, Joe, possible checkpatch question]

Quoted 15 lines · Liu Song

From: Liu Song <[email protected]>

Read the help information of PCI_P2PDMA through make menuconfig, "Enables" is partially displayed as garbled characters, so fix it.

---
 drivers/pci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +0 -0
index 133c732..8102b78 100644

drivers/pci/Kconfig config PCI_P2PDMA · line 169

Quoted 5 lines
drivers/pci/Kconfig +1 -1
@@ -166,7 +166,7 @@ config PCI_P2PDMA
 	depends on ZONE_DEVICE
 	select GENERIC_ALLOCATOR
 	help
-	  Enableѕ drivers to do PCI peer-to-peer transactions to and from
+	  Enables drivers to do PCI peer-to-peer transactions to and from

I see this problem ("Enables" renders as "Enable ~U" because the "s" is actually UTF-8 D195, CYRILLIC SMALL LETTER DZE).

"file" found the following other Kconfig files that also contain UTF-8:

drivers/pci/Kconfig
D195 CYRILLIC SMALL LETTER DZE, which looks like "s" "Enables" renders as "Enable ~U"
net/netfilter/ipvs/Kconfig
C2A0 NO-BREAK SPACE
renders fine
drivers/mtd/nand/raw/Kconfig
MTD_NAND_CAFE C389 LATIN CAPITAL LETTER E WITH ACUTE "CAFÉ" renders as "CAF ~I"
drivers/mtd/spi-nor/Kconfig

    MTD_SPI_NOR_USE_4K_SECTORS
    "16 × 4 KiB" renders as "16  ~W 4 KiB"

drivers/net/can/usb/Kconfig
drivers/net/can/peak_canfd/Kconfig
drivers/gpu/drm/panel/Kconfig
drivers/platform/mellanox/Kconfig
kernel/time/Kconfig
crypto/Kconfig
arch/Kconfig

Some of these are clearly wrong (Cyrillic letter), some are unnecessary (non-breakable space), some are arguable ("CAFÉ" and "16 × 4 KiB" -- these take advantage of UTF-8 in useful ways).

Not being a charset guru, I dunno if the rendering problem means my terminal is set incorrectly or if they all need to be changed.

But I think we should address all of them at the same time. If we do need to avoid UTF-8 in Kconfig help, maybe checkpatch should look for it.

Quoted 6 lines
drivers/pci/Kconfig +0 -0
 	  BARs that are exposed in other devices that are the part of
 	  the hierarchy where peer-to-peer DMA is guaranteed by the PCI
 	  specification to work (ie. anything below a single PCI bridge).
Signature · 1 line
1.8.3.1
#3 lore raw
Quoted 54 lines · Bjorn Helgaas

[+cc Andy, Joe, possible checkpatch question]

Quoted 15 lines · Liu Song

From: Liu Song <[email protected]>

Read the help information of PCI_P2PDMA through make menuconfig, "Enables" is partially displayed as garbled characters, so fix it.

---
 drivers/pci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +0 -0
index 133c732..8102b78 100644

drivers/pci/Kconfig config PCI_P2PDMA · line 169

Quoted 5 lines
drivers/pci/Kconfig +1 -1
@@ -166,7 +166,7 @@ config PCI_P2PDMA
 	depends on ZONE_DEVICE
 	select GENERIC_ALLOCATOR
 	help
-	  Enableѕ drivers to do PCI peer-to-peer transactions to and from
+	  Enables drivers to do PCI peer-to-peer transactions to and from

I see this problem ("Enables" renders as "Enable ~U" because the "s" is actually UTF-8 D195, CYRILLIC SMALL LETTER DZE).

"file" found the following other Kconfig files that also contain UTF-8:

drivers/pci/Kconfig
D195 CYRILLIC SMALL LETTER DZE, which looks like "s" "Enables" renders as "Enable ~U"
net/netfilter/ipvs/Kconfig
C2A0 NO-BREAK SPACE
renders fine
drivers/mtd/nand/raw/Kconfig
MTD_NAND_CAFE C389 LATIN CAPITAL LETTER E WITH ACUTE "CAFÉ" renders as "CAF ~I"
drivers/mtd/spi-nor/Kconfig

    MTD_SPI_NOR_USE_4K_SECTORS
    "16 × 4 KiB" renders as "16  ~W 4 KiB"

drivers/net/can/usb/Kconfig
drivers/net/can/peak_canfd/Kconfig
drivers/gpu/drm/panel/Kconfig
drivers/platform/mellanox/Kconfig
kernel/time/Kconfig
crypto/Kconfig
arch/Kconfig

Some of these are clearly wrong (Cyrillic letter), some are unnecessary (non-breakable space), some are arguable ("CAFÉ" and "16 × 4 KiB" -- these take advantage of UTF-8 in useful ways).

Quoted 6 lines

Not being a charset guru, I dunno if the rendering problem means my terminal is set incorrectly or if they all need to be changed.

But I think we should address all of them at the same time. If we do need to avoid UTF-8 in Kconfig help, maybe checkpatch should look for it.

Any progress on this problem? I certainly agree that it should be fixed; I would just like to fix all the problems, not just the PCI one.

Bjorn

author
#4 lore raw
Quoted 57 lines · Bjorn Helgaas
Quoted 56 lines · Bjorn Helgaas

[+cc Andy, Joe, possible checkpatch question]

Quoted 15 lines · Liu Song

From: Liu Song <[email protected]>

Read the help information of PCI_P2PDMA through make menuconfig, "Enables" is partially displayed as garbled characters, so fix it.

---
  drivers/pci/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +0 -0
index 133c732..8102b78 100644

drivers/pci/Kconfig config PCI_P2PDMA · line 169

Quoted 5 lines
drivers/pci/Kconfig +1 -1
@@ -166,7 +166,7 @@ config PCI_P2PDMA
  	depends on ZONE_DEVICE
  	select GENERIC_ALLOCATOR
  	help
-	  Enableѕ drivers to do PCI peer-to-peer transactions to and from
+	  Enables drivers to do PCI peer-to-peer transactions to and from

I see this problem ("Enables" renders as "Enable ~U" because the "s" is actually UTF-8 D195, CYRILLIC SMALL LETTER DZE).

"file" found the following other Kconfig files that also contain UTF-8:

drivers/pci/Kconfig
D195 CYRILLIC SMALL LETTER DZE, which looks like "s" "Enables" renders as "Enable ~U"
net/netfilter/ipvs/Kconfig
C2A0 NO-BREAK SPACE
renders fine
drivers/mtd/nand/raw/Kconfig
MTD_NAND_CAFE C389 LATIN CAPITAL LETTER E WITH ACUTE "CAFÉ" renders as "CAF ~I"
drivers/mtd/spi-nor/Kconfig

     MTD_SPI_NOR_USE_4K_SECTORS
     "16 × 4 KiB" renders as "16  ~W 4 KiB"

drivers/net/can/usb/Kconfig
drivers/net/can/peak_canfd/Kconfig
drivers/gpu/drm/panel/Kconfig
drivers/platform/mellanox/Kconfig
kernel/time/Kconfig
crypto/Kconfig
arch/Kconfig

Some of these are clearly wrong (Cyrillic letter), some are unnecessary (non-breakable space), some are arguable ("CAFÉ" and "16 × 4 KiB" -- these take advantage of UTF-8 in useful ways).

Not being a charset guru, I dunno if the rendering problem means my terminal is set incorrectly or if they all need to be changed.

Quoted 8 lines
Quoted 3 lines

But I think we should address all of them at the same time. If we do need to avoid UTF-8 in Kconfig help, maybe checkpatch should look for it.

Any progress on this problem? I certainly agree that it should be fixed; I would just like to fix all the problems, not just the PCI one.

Bjorn

Totally agree, according to your suggestion, I will resubmit with all the revisions.

Thanks

#5 lore raw
In reply to Liu Song
Quoted 6 lines · Liu Song

From: Liu Song <[email protected]>

Read the help information of PCI_P2PDMA through make menuconfig, "Enables" is partially displayed as garbled characters, so fix it.

I think I derailed this by suggesting that we fix other Kconfig files at the same time, which ended up with a cross-subsystem patch that nobody picked up. My fault, sorry.

So I applied this now to pci/misc for v6.7, thank you!

Uwe just posted an identical patch, so I updated the commit log to mention his patch as well:

PCI: Replace unnecessary UTF-8 in Kconfig

The CONFIG_PCI_P2PDMA Kconfig help text contains a Cyrillic small "Dze" (ѕ). When menuconfig renders it, it looks like "Enable ~U drivers" instead of "Enables drivers".

Replace it by a plain "s" so the help text is displayed correctly by menuconfig.

Uwe Kleine-König <[email protected]> later posted the same patch at
https://lore.kernel.org/r/[email protected]

Quoted 20 lines
---
 drivers/pci/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/Kconfig +1 -1
index 133c732..8102b78 100644
@@ -166,7 +166,7 @@ config PCI_P2PDMA
 	depends on ZONE_DEVICE
 	select GENERIC_ALLOCATOR
 	help
-	  Enableѕ drivers to do PCI peer-to-peer transactions to and from
+	  Enables drivers to do PCI peer-to-peer transactions to and from
 	  BARs that are exposed in other devices that are the part of
 	  the hierarchy where peer-to-peer DMA is guaranteed by the PCI
 	  specification to work (ie. anything below a single PCI bridge).
Signature · 1 line
1.8.3.1