Patchwork [v1,5/6] xilinx: fix names of ethernet and dma links.

login
register
mail settings
Submitter Peter A. G. Crosthwaite
Date Sept. 17, 2012, 8:47 a.m.
Message ID <fcd4d4905dbd503f730625bde50c6ed3637a080b.1347871393.git.peter.crosthwaite@petalogix.com>
Download mbox | patch
Permalink /patch/184321/
State New
Headers show

Comments

Peter A. G. Crosthwaite - Sept. 17, 2012, 8:47 a.m.
These names were incorrect. Fixed to match to actual link names

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
---
 hw/xilinx.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Andreas Färber - Sept. 17, 2012, 3:13 p.m.
Hi,

Am 17.09.2012 10:47, schrieb Peter A. G. Crosthwaite:
> These names were incorrect. Fixed to match to actual link names
> 
> Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
> ---
>  hw/xilinx.h |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/xilinx.h b/hw/xilinx.h
> index 4d29265..6449bd4 100644
> --- a/hw/xilinx.h
> +++ b/hw/xilinx.h
> @@ -63,7 +63,8 @@ xilinx_axiethernet_create(NICInfo *nd, StreamSlave *peer,
>      qdev_set_nic_properties(dev, nd);
>      qdev_prop_set_uint32(dev, "rxmem", rxmem);
>      qdev_prop_set_uint32(dev, "txmem", txmem);
> -    object_property_set_link(OBJECT(dev), OBJECT(peer), "tx_dev", &errp);
> +    object_property_set_link(OBJECT(dev), OBJECT(peer), "axistream-connected",
> +                                &errp);
>      assert_no_error(errp);
>      qdev_init_nofail(dev);
>      sysbus_mmio_map(sysbus_from_qdev(dev), 0, base);
> @@ -80,7 +81,8 @@ xilinx_axiethernetdma_init(DeviceState *dev, StreamSlave *peer,
>      Error *errp = NULL;
>  
>      qdev_prop_set_uint32(dev, "freqhz", freqhz);
> -    object_property_set_link(OBJECT(dev), OBJECT(peer), "tx_dev", &errp);
> +    object_property_set_link(OBJECT(dev), OBJECT(peer), "axistream-connected",
> +                                &errp);
>      assert_no_error(errp);
>      qdev_init_nofail(dev);
>  

Indentation of &errp looks odd despite no tabs - intentional?

Andreas
Peter A. G. Crosthwaite - Sept. 17, 2012, 11:36 p.m.
On Tue, Sep 18, 2012 at 1:13 AM, Andreas Färber <afaerber@suse.de> wrote:
> Hi,
>
> Am 17.09.2012 10:47, schrieb Peter A. G. Crosthwaite:
>> These names were incorrect. Fixed to match to actual link names
>>
>> Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
>> ---
>>  hw/xilinx.h |    6 ++++--
>>  1 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/xilinx.h b/hw/xilinx.h
>> index 4d29265..6449bd4 100644
>> --- a/hw/xilinx.h
>> +++ b/hw/xilinx.h
>> @@ -63,7 +63,8 @@ xilinx_axiethernet_create(NICInfo *nd, StreamSlave *peer,
>>      qdev_set_nic_properties(dev, nd);
>>      qdev_prop_set_uint32(dev, "rxmem", rxmem);
>>      qdev_prop_set_uint32(dev, "txmem", txmem);
>> -    object_property_set_link(OBJECT(dev), OBJECT(peer), "tx_dev", &errp);
>> +    object_property_set_link(OBJECT(dev), OBJECT(peer), "axistream-connected",
>> +                                &errp);
>>      assert_no_error(errp);
>>      qdev_init_nofail(dev);
>>      sysbus_mmio_map(sysbus_from_qdev(dev), 0, base);
>> @@ -80,7 +81,8 @@ xilinx_axiethernetdma_init(DeviceState *dev, StreamSlave *peer,
>>      Error *errp = NULL;
>>
>>      qdev_prop_set_uint32(dev, "freqhz", freqhz);
>> -    object_property_set_link(OBJECT(dev), OBJECT(peer), "tx_dev", &errp);
>> +    object_property_set_link(OBJECT(dev), OBJECT(peer), "axistream-connected",
>> +                                &errp);
>>      assert_no_error(errp);
>>      qdev_init_nofail(dev);
>>
>
> Indentation of &errp looks odd despite no tabs - intentional?
>

I have indented to the first multiple of 4 spaces after the function
opening brace. Is there a prescribed way? Can it be added to
CODING_STYLE and checkpatch if there is a particular recommended way?

Regards,
Peter


> Andreas
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Andreas Färber - Sept. 18, 2012, 3:02 p.m.
Am 18.09.2012 01:36, schrieb Peter Crosthwaite:
> On Tue, Sep 18, 2012 at 1:13 AM, Andreas Färber <afaerber@suse.de> wrote:
>> Am 17.09.2012 10:47, schrieb Peter A. G. Crosthwaite:
>>> @@ -80,7 +81,8 @@ xilinx_axiethernetdma_init(DeviceState *dev, StreamSlave *peer,
>>>      Error *errp = NULL;
>>>
>>>      qdev_prop_set_uint32(dev, "freqhz", freqhz);
>>> -    object_property_set_link(OBJECT(dev), OBJECT(peer), "tx_dev", &errp);
>>> +    object_property_set_link(OBJECT(dev), OBJECT(peer), "axistream-connected",
>>> +                                &errp);
>>>      assert_no_error(errp);
>>>      qdev_init_nofail(dev);
>>>
>>
>> Indentation of &errp looks odd despite no tabs - intentional?
>>
> 
> I have indented to the first multiple of 4 spaces after the function
> opening brace. Is there a prescribed way? Can it be added to
> CODING_STYLE and checkpatch if there is a particular recommended way?

The usual convention is to align with the opening brace (i.e., 3 spaces
less), or if the function name or string argument is too long I believe
one 4-spaces indent from the block.

Cheers,
Andreas

Patch

diff --git a/hw/xilinx.h b/hw/xilinx.h
index 4d29265..6449bd4 100644
--- a/hw/xilinx.h
+++ b/hw/xilinx.h
@@ -63,7 +63,8 @@  xilinx_axiethernet_create(NICInfo *nd, StreamSlave *peer,
     qdev_set_nic_properties(dev, nd);
     qdev_prop_set_uint32(dev, "rxmem", rxmem);
     qdev_prop_set_uint32(dev, "txmem", txmem);
-    object_property_set_link(OBJECT(dev), OBJECT(peer), "tx_dev", &errp);
+    object_property_set_link(OBJECT(dev), OBJECT(peer), "axistream-connected",
+                                &errp);
     assert_no_error(errp);
     qdev_init_nofail(dev);
     sysbus_mmio_map(sysbus_from_qdev(dev), 0, base);
@@ -80,7 +81,8 @@  xilinx_axiethernetdma_init(DeviceState *dev, StreamSlave *peer,
     Error *errp = NULL;
 
     qdev_prop_set_uint32(dev, "freqhz", freqhz);
-    object_property_set_link(OBJECT(dev), OBJECT(peer), "tx_dev", &errp);
+    object_property_set_link(OBJECT(dev), OBJECT(peer), "axistream-connected",
+                                &errp);
     assert_no_error(errp);
     qdev_init_nofail(dev);