diff mbox

Broken parsing of UTF-8 chars

Message ID CACna6rzFj3rs_9Dno+32eD2V2ngyXQNSEQVzNSyWc=CSaHd=Tg@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Rafał Miłecki Jan. 19, 2015, 3:40 p.m. UTC
Hi,

my name includes some out-of-ASCII chars and it seems patchwork can't
really handle them. It seems to happen no matter if I send something
using git send-email or Gmail web interface.

I've collected few examples:

1) [Gmail] My ACK to some b43legacy patch (5575891.txt):
https://patchwork.kernel.org/patch/5575891/
My name from "From" header was malformed into Rafał Miłecki
My name from content (Acked-by) was malformed into Rafa? Mi?ecki

2) [Gmail] My ACK to some bcma patch (5545021.txt):
https://patchwork.kernel.org/patch/5545021/
Same as above.

3) [git] bcma: clean bus initialization code (5650221.txt)
https://patchwork.kernel.org/patch/5650221/

4) [git] bcma: use standard bus scanning during early register (5655171.txt)
https://patchwork.kernel.org/patch/5655171/

It causes real problems for me, because maintainers usually download
patches as mbox-es and applies them. It results in my name being
malformed in git repository:
https://git.kernel.org/cgit/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=d0c102f70aec07eaeb23de30892f425e4c5f6045
https://git.kernel.org/cgit/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=d0f66df5392aaf771c647436e32849e3a4c4e3ff

Could you fix this, please?

Comments

Rafał Miłecki Jan. 20, 2015, 9:24 a.m. UTC | #1
On 19 January 2015 at 16:40, Rafał Miłecki <zajec5@gmail.com> wrote:
> my name includes some out-of-ASCII chars and it seems patchwork can't
> really handle them. It seems to happen no matter if I send something
> using git send-email or Gmail web interface.
>
> I've collected few examples:
>
> 1) [Gmail] My ACK to some b43legacy patch (5575891.txt):
> https://patchwork.kernel.org/patch/5575891/
> My name from "From" header was malformed into Rafał Miłecki
> My name from content (Acked-by) was malformed into Rafa? Mi?ecki
>
> 2) [Gmail] My ACK to some bcma patch (5545021.txt):
> https://patchwork.kernel.org/patch/5545021/
> Same as above.
>
> 3) [git] bcma: clean bus initialization code (5650221.txt)
> https://patchwork.kernel.org/patch/5650221/
>
> 4) [git] bcma: use standard bus scanning during early register (5655171.txt)
> https://patchwork.kernel.org/patch/5655171/
>
> It causes real problems for me, because maintainers usually download
> patches as mbox-es and applies them. It results in my name being
> malformed in git repository:
> https://git.kernel.org/cgit/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=d0c102f70aec07eaeb23de30892f425e4c5f6045
> https://git.kernel.org/cgit/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=d0f66df5392aaf771c647436e32849e3a4c4e3ff
>
> Could you fix this, please?

I kept digging and noticed something interesting. Pretty obvious,
but... all above URLs link to the patchwork.kernel.org.

Now, if you take a look at different patchworks it looks... OK!

1) patchwork.linux-mips.org
http://patchwork.linux-mips.org/patch/8661/
http://patchwork.linux-mips.org/patch/8662/

2) patchwork.ozlabs.org
http://patchwork.ozlabs.org/patch/426296/
http://patchwork.ozlabs.org/patch/429792/

In all above patches my name isn't malformed.


Do you have any idea what does it mean? Is patchwork.kernel.org using
some old version of patchwork, or is its configuration broken?
Kalle Valo Jan. 20, 2015, 9:36 a.m. UTC | #2
Rafał Miłecki <zajec5@gmail.com> writes:

> I kept digging and noticed something interesting. Pretty obvious,
> but... all above URLs link to the patchwork.kernel.org.
>
> Now, if you take a look at different patchworks it looks... OK!
>
> 1) patchwork.linux-mips.org
> http://patchwork.linux-mips.org/patch/8661/
> http://patchwork.linux-mips.org/patch/8662/
>
> 2) patchwork.ozlabs.org
> http://patchwork.ozlabs.org/patch/426296/
> http://patchwork.ozlabs.org/patch/429792/
>
> In all above patches my name isn't malformed.
>
> Do you have any idea what does it mean? Is patchwork.kernel.org using
> some old version of patchwork, or is its configuration broken?

I think patchwork.kernel.org is some older version, for example
kernel.org doesn't have "A/R/T" column like ozlabs has. See:

http://patchwork.ozlabs.org/project/openwrt/list/

vs

https://patchwork.kernel.org/project/linux-wireless/list/

I'll ask kernel.org admins if they could update patchwork.kernel.org.
Rafał Miłecki Jan. 20, 2015, 9:43 a.m. UTC | #3
On 20 January 2015 at 10:36, Kalle Valo <kvalo@codeaurora.org> wrote:
> Rafał Miłecki <zajec5@gmail.com> writes:
>
>> I kept digging and noticed something interesting. Pretty obvious,
>> but... all above URLs link to the patchwork.kernel.org.
>>
>> Now, if you take a look at different patchworks it looks... OK!
>>
>> 1) patchwork.linux-mips.org
>> http://patchwork.linux-mips.org/patch/8661/
>> http://patchwork.linux-mips.org/patch/8662/
>>
>> 2) patchwork.ozlabs.org
>> http://patchwork.ozlabs.org/patch/426296/
>> http://patchwork.ozlabs.org/patch/429792/
>>
>> In all above patches my name isn't malformed.
>>
>> Do you have any idea what does it mean? Is patchwork.kernel.org using
>> some old version of patchwork, or is its configuration broken?
>
> I think patchwork.kernel.org is some older version, for example
> kernel.org doesn't have "A/R/T" column like ozlabs has. See:
>
> http://patchwork.ozlabs.org/project/openwrt/list/
>
> vs
>
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> I'll ask kernel.org admins if they could update patchwork.kernel.org.

I've sent 6 minutes ago request to the kernel.org helpdesk:
[Kernel.org Helpdesk #8957] AutoReply: patchwork: broken encoding of
non-ASCII chars
diff mbox

Patch

diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index 314ae40..59422b5 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -25,6 +25,7 @@  struct bcma_bus;
 bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value,
 		     int timeout);
 void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core);
+void bcma_init_bus(struct bcma_bus *bus);
 int bcma_bus_register(struct bcma_bus *bus);
 void bcma_bus_unregister(struct bcma_bus *bus);
 int __init bcma_bus_early_register(struct bcma_bus *bus,
@@ -36,11 +37,11 @@  int bcma_bus_resume(struct bcma_bus *bus);
 #endif
 
 /* scan.c */
+void bcma_detect_chip(struct bcma_bus *bus);
 int bcma_bus_scan(struct bcma_bus *bus);
 int __init bcma_bus_scan_early(struct bcma_bus *bus,
 			       struct bcma_device_id *match,
 			       struct bcma_device *core);
-void bcma_init_bus(struct bcma_bus *bus);
 
 /* sprom.c */
 int bcma_sprom_get(struct bcma_bus *bus);
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 534e133..c166d44 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -268,6 +268,18 @@  void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
 	}
 }
 
+void bcma_init_bus(struct bcma_bus *bus)
+{
+	mutex_lock(&bcma_buses_mutex);
+	bus->num = bcma_bus_next_num++;
+	mutex_unlock(&bcma_buses_mutex);
+
+	INIT_LIST_HEAD(&bus->cores);
+	bus->nr_cores = 0;
+
+	bcma_detect_chip(bus);
+}
+
 static void bcma_register_core(struct bcma_bus *bus, struct bcma_device *core)
 {
 	int err;
@@ -369,10 +381,6 @@  int bcma_bus_register(struct bcma_bus *bus)
 	int err;
 	struct bcma_device *core;
 
-	mutex_lock(&bcma_buses_mutex);
-	bus->num = bcma_bus_next_num++;
-	mutex_unlock(&bcma_buses_mutex);
-
 	/* Scan for devices (cores) */
 	err = bcma_bus_scan(bus);
 	if (err) {
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index 9175207..5328ee5 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -435,15 +435,12 @@  static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
 	return 0;
 }
 
-void bcma_init_bus(struct bcma_bus *bus)
+void bcma_detect_chip(struct bcma_bus *bus)
 {
 	s32 tmp;
 	struct bcma_chipinfo *chipinfo = &(bus->chipinfo);
 	char chip_id[8];
 
-	INIT_LIST_HEAD(&bus->cores);
-	bus->nr_cores = 0;
-
 	bcma_scan_switch_core(bus, BCMA_ADDR_BASE);
 
 	tmp = bcma_scan_read32(bus, 0, BCMA_CC_ID);