diff mbox

[OpenWrt-Devel,v4,1/4,CC] ramips: Fix whitespace in the rt3052 switch driver.

Message ID owrt-patch-20160101-v4-cc-1@vittgam.net
State Accepted
Headers show

Commit Message

Vittorio Gambaletta Dec. 31, 2015, 11 p.m. UTC
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
---

Comments

John Crispin Jan. 3, 2016, 2:53 p.m. UTC | #1
Hi,

the patch/series does not apply to CC

	John

On 01/01/2016 00:00, Vittorio G (VittGam) wrote:
> Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
> ---
> 
> --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
> +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
> @@ -1417,19 +1417,19 @@ static int esw_probe(struct platform_device *pdev)
>  	}
>  
> 	port_map = of_get_property(np, "ralink,portmap", NULL);
> -        if (port_map)
> +	if (port_map)
> 		esw->port_map = be32_to_cpu(*port_map);
>  
>  	reg_init = of_get_property(np, "ralink,fct2", NULL);
> -        if (reg_init)
> +	if (reg_init)
>  		esw->reg_initval_fct2 = be32_to_cpu(*reg_init);
>  
>  	reg_init = of_get_property(np, "ralink,fpa2", NULL);
> -        if (reg_init)
> +	if (reg_init)
>  		esw->reg_initval_fpa2 = be32_to_cpu(*reg_init);
>  
>  	reg_init = of_get_property(np, "ralink,led_polarity", NULL);
> -        if (reg_init)
> +	if (reg_init)
>  		esw->reg_led_polarity = be32_to_cpu(*reg_init);
>  
>  	swdev = &esw->swdev;
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
Vittorio Gambaletta Jan. 3, 2016, 5:30 p.m. UTC | #2
Hi John,

It does here...

openwrt@asd:~$ git clone https://github.com/openwrt/openwrt openwrt-cc
Cloning into 'openwrt-cc'...
remote: Counting objects: 338616, done.
remote: Compressing objects: 100% (130/130), done.
remote: Total 338616 (delta 61), reused 0 (delta 0), pack-reused 338484
Receiving objects: 100% (338616/338616), 120.31 MiB | 26.38 MiB/s, done.
Resolving deltas: 100% (229507/229507), done.
openwrt@asd:~$ cd openwrt-cc/
openwrt@asd:~/openwrt-cc$ git checkout chaos_calmer
Branch chaos_calmer set up to track remote branch chaos_calmer from origin.
Switched to a new branch 'chaos_calmer'
openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-1.patch
patching file target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-2.patch
patching file target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-3.patch
patching file target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-4.patch
patching file target/linux/ramips/dts/HT-TM02.dts
openwrt@asd:~/openwrt-cc$

Cheers,
Vittorio

On 03/01/2016 15:53:56 CET, John Crispin wrote:
> Hi,
>
> the patch/series does not apply to CC
>
> 	John
>
> On 01/01/2016 00:00, Vittorio G (VittGam) wrote:
>> Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
>> ---
>>
>> --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>> +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>> @@ -1417,19 +1417,19 @@ static int esw_probe(struct platform_device *pdev)
>>  	}
>>
>> 	port_map = of_get_property(np, "ralink,portmap", NULL);
>> -        if (port_map)
>> +	if (port_map)
>> 		esw->port_map = be32_to_cpu(*port_map);
>>
>>  	reg_init = of_get_property(np, "ralink,fct2", NULL);
>> -        if (reg_init)
>> +	if (reg_init)
>>  		esw->reg_initval_fct2 = be32_to_cpu(*reg_init);
>>
>>  	reg_init = of_get_property(np, "ralink,fpa2", NULL);
>> -        if (reg_init)
>> +	if (reg_init)
>>  		esw->reg_initval_fpa2 = be32_to_cpu(*reg_init);
>>
>>  	reg_init = of_get_property(np, "ralink,led_polarity", NULL);
>> -        if (reg_init)
>> +	if (reg_init)
>>  		esw->reg_led_polarity = be32_to_cpu(*reg_init);
>>
>>  	swdev = &esw->swdev;
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
John Crispin Jan. 3, 2016, 5:37 p.m. UTC | #3
Hi,


blogic@debian:/openwrt/CC$ patchwork 561992
Applying: ramips: Fix whitespace in the rt3052 switch driver.
fatal: corrupt patch at line 6
Patch failed at 0001 ramips: Fix whitespace in the rt3052 switch driver.
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

if you look at line 6 and 22 of the patch you will see that the leading
space is missing. how did you generate these patches ?

	John

On 03/01/2016 18:30, Vittorio G (VittGam) wrote:
> Hi John,
> 
> It does here...
> 
> openwrt@asd:~$ git clone https://github.com/openwrt/openwrt openwrt-cc
> Cloning into 'openwrt-cc'...
> remote: Counting objects: 338616, done.
> remote: Compressing objects: 100% (130/130), done.
> remote: Total 338616 (delta 61), reused 0 (delta 0), pack-reused 338484
> Receiving objects: 100% (338616/338616), 120.31 MiB | 26.38 MiB/s, done.
> Resolving deltas: 100% (229507/229507), done.
> openwrt@asd:~$ cd openwrt-cc/
> openwrt@asd:~/openwrt-cc$ git checkout chaos_calmer
> Branch chaos_calmer set up to track remote branch chaos_calmer from origin.
> Switched to a new branch 'chaos_calmer'
> openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-1.patch
> patching file
> target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
> openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-2.patch
> patching file
> target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
> openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-3.patch
> patching file
> target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
> openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-4.patch
> patching file target/linux/ramips/dts/HT-TM02.dts
> openwrt@asd:~/openwrt-cc$
> 
> Cheers,
> Vittorio
> 
> On 03/01/2016 15:53:56 CET, John Crispin wrote:
>> Hi,
>>
>> the patch/series does not apply to CC
>>
>>     John
>>
>> On 01/01/2016 00:00, Vittorio G (VittGam) wrote:
>>> Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
>>> ---
>>>
>>> --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>>> +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>>> @@ -1417,19 +1417,19 @@ static int esw_probe(struct platform_device
>>> *pdev)
>>>      }
>>>
>>>     port_map = of_get_property(np, "ralink,portmap", NULL);
>>> -        if (port_map)
>>> +    if (port_map)
>>>         esw->port_map = be32_to_cpu(*port_map);
>>>
>>>      reg_init = of_get_property(np, "ralink,fct2", NULL);
>>> -        if (reg_init)
>>> +    if (reg_init)
>>>          esw->reg_initval_fct2 = be32_to_cpu(*reg_init);
>>>
>>>      reg_init = of_get_property(np, "ralink,fpa2", NULL);
>>> -        if (reg_init)
>>> +    if (reg_init)
>>>          esw->reg_initval_fpa2 = be32_to_cpu(*reg_init);
>>>
>>>      reg_init = of_get_property(np, "ralink,led_polarity", NULL);
>>> -        if (reg_init)
>>> +    if (reg_init)
>>>          esw->reg_led_polarity = be32_to_cpu(*reg_init);
>>>
>>>      swdev = &esw->swdev;
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Vittorio Gambaletta Jan. 3, 2016, 5:55 p.m. UTC | #4
On 03/01/2016 18:37:03 CET, John Crispin wrote:
> blogic@debian:/openwrt/CC$ patchwork 561992
> Applying: ramips: Fix whitespace in the rt3052 switch driver.
> fatal: corrupt patch at line 6
> Patch failed at 0001 ramips: Fix whitespace in the rt3052 switch driver.
> When you have resolved this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".

In fact that is stricter, patch doesn't fail...

By the way, is `patchwork` a shell alias? It seems interesting. ;)

> if you look at line 6 and 22 of the patch you will see that the leading
> space is missing. how did you generate these patches ?

Ehm. This particular patch has a long history, I can't remember anymore.
And in fact this v4-cc-1 is the only one that's bad.

For the more recent patches I used quilt.

Cheers,
Vittorio


> On 03/01/2016 18:30, Vittorio G (VittGam) wrote:
>> Hi John,
>>
>> It does here...
>>
>> openwrt@asd:~$ git clone https://github.com/openwrt/openwrt openwrt-cc
>> Cloning into 'openwrt-cc'...
>> remote: Counting objects: 338616, done.
>> remote: Compressing objects: 100% (130/130), done.
>> remote: Total 338616 (delta 61), reused 0 (delta 0), pack-reused 338484
>> Receiving objects: 100% (338616/338616), 120.31 MiB | 26.38 MiB/s, done.
>> Resolving deltas: 100% (229507/229507), done.
>> openwrt@asd:~$ cd openwrt-cc/
>> openwrt@asd:~/openwrt-cc$ git checkout chaos_calmer
>> Branch chaos_calmer set up to track remote branch chaos_calmer from origin.
>> Switched to a new branch 'chaos_calmer'
>> openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-1.patch
>> patching file
>> target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>> openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-2.patch
>> patching file
>> target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>> openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-3.patch
>> patching file
>> target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>> openwrt@asd:~/openwrt-cc$ patch -p1 < ../v4-cc-4.patch
>> patching file target/linux/ramips/dts/HT-TM02.dts
>> openwrt@asd:~/openwrt-cc$
>>
>> Cheers,
>> Vittorio
>>
>> On 03/01/2016 15:53:56 CET, John Crispin wrote:
>>> Hi,
>>>
>>> the patch/series does not apply to CC
>>>
>>>     John
>>>
>>> On 01/01/2016 00:00, Vittorio G (VittGam) wrote:
>>>> Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
>>>> ---
>>>>
>>>> --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>>>> +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
>>>> @@ -1417,19 +1417,19 @@ static int esw_probe(struct platform_device
>>>> *pdev)
>>>>      }
>>>>
>>>>     port_map = of_get_property(np, "ralink,portmap", NULL);
>>>> -        if (port_map)
>>>> +    if (port_map)
>>>>         esw->port_map = be32_to_cpu(*port_map);
>>>>
>>>>      reg_init = of_get_property(np, "ralink,fct2", NULL);
>>>> -        if (reg_init)
>>>> +    if (reg_init)
>>>>          esw->reg_initval_fct2 = be32_to_cpu(*reg_init);
>>>>
>>>>      reg_init = of_get_property(np, "ralink,fpa2", NULL);
>>>> -        if (reg_init)
>>>> +    if (reg_init)
>>>>          esw->reg_initval_fpa2 = be32_to_cpu(*reg_init);
>>>>
>>>>      reg_init = of_get_property(np, "ralink,led_polarity", NULL);
>>>> -        if (reg_init)
>>>> +    if (reg_init)
>>>>          esw->reg_led_polarity = be32_to_cpu(*reg_init);
>>>>
>>>>      swdev = &esw->swdev;
>>>> _______________________________________________
>>>> openwrt-devel mailing list
>>>> openwrt-devel@lists.openwrt.org
>>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>>
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
diff mbox

Patch

--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
@@ -1417,19 +1417,19 @@  static int esw_probe(struct platform_device *pdev)
 	}
 
	port_map = of_get_property(np, "ralink,portmap", NULL);
-        if (port_map)
+	if (port_map)
		esw->port_map = be32_to_cpu(*port_map);
 
 	reg_init = of_get_property(np, "ralink,fct2", NULL);
-        if (reg_init)
+	if (reg_init)
 		esw->reg_initval_fct2 = be32_to_cpu(*reg_init);
 
 	reg_init = of_get_property(np, "ralink,fpa2", NULL);
-        if (reg_init)
+	if (reg_init)
 		esw->reg_initval_fpa2 = be32_to_cpu(*reg_init);
 
 	reg_init = of_get_property(np, "ralink,led_polarity", NULL);
-        if (reg_init)
+	if (reg_init)
 		esw->reg_led_polarity = be32_to_cpu(*reg_init);
 
 	swdev = &esw->swdev;