* [PATCH net-next-2.6] bonding: fix return value of bonding_store_slaves_active()
@ 2011-01-25 18:53 Jiri Pirko
2011-01-25 19:22 ` Jay Vosburgh
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Pirko @ 2011-01-25 18:53 UTC (permalink / raw)
To: netdev; +Cc: netdev, fubar, davem
count is incorrectly returned even in case of fail. Return ret instead.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 8fd0174..f33155f 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
}
}
out:
- return count;
+ return ret;
}
static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
bonding_show_slaves_active, bonding_store_slaves_active);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next-2.6] bonding: fix return value of bonding_store_slaves_active()
2011-01-25 18:53 [PATCH net-next-2.6] bonding: fix return value of bonding_store_slaves_active() Jiri Pirko
@ 2011-01-25 19:22 ` Jay Vosburgh
2011-01-25 20:52 ` Jiri Pirko
2011-01-25 21:03 ` [PATCH net-next-2.6] bonding: fix return value of couple of store functions Jiri Pirko
0 siblings, 2 replies; 6+ messages in thread
From: Jay Vosburgh @ 2011-01-25 19:22 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem
Jiri Pirko <jpirko@redhat.com> wrote:
>count is incorrectly returned even in case of fail. Return ret instead.
>
>Signed-off-by: Jiri Pirko <jpirko@redhat.com>
It looks like bonding_store_carrier has the same problem, could
you fix it up too and resubmit?
-J
>diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>index 8fd0174..f33155f 100644
>--- a/drivers/net/bonding/bond_sysfs.c
>+++ b/drivers/net/bonding/bond_sysfs.c
>@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
> }
> }
> out:
>- return count;
>+ return ret;
> }
> static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
> bonding_show_slaves_active, bonding_store_slaves_active);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next-2.6] bonding: fix return value of bonding_store_slaves_active()
2011-01-25 19:22 ` Jay Vosburgh
@ 2011-01-25 20:52 ` Jiri Pirko
2011-01-25 21:03 ` [PATCH net-next-2.6] bonding: fix return value of couple of store functions Jiri Pirko
1 sibling, 0 replies; 6+ messages in thread
From: Jiri Pirko @ 2011-01-25 20:52 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: netdev, davem
Tue, Jan 25, 2011 at 08:22:50PM CET, fubar@us.ibm.com wrote:
>Jiri Pirko <jpirko@redhat.com> wrote:
>
>>count is incorrectly returned even in case of fail. Return ret instead.
>>
>>Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>
> It looks like bonding_store_carrier has the same problem, could
>you fix it up too and resubmit?
you are right, I missed that. Will resend.
Thanks.
Jirka
>
> -J
>
>
>>diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>>index 8fd0174..f33155f 100644
>>--- a/drivers/net/bonding/bond_sysfs.c
>>+++ b/drivers/net/bonding/bond_sysfs.c
>>@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
>> }
>> }
>> out:
>>- return count;
>>+ return ret;
>> }
>> static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
>> bonding_show_slaves_active, bonding_store_slaves_active);
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next-2.6] bonding: fix return value of couple of store functions
2011-01-25 19:22 ` Jay Vosburgh
2011-01-25 20:52 ` Jiri Pirko
@ 2011-01-25 21:03 ` Jiri Pirko
2011-01-25 21:07 ` Jay Vosburgh
1 sibling, 1 reply; 6+ messages in thread
From: Jiri Pirko @ 2011-01-25 21:03 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: netdev, davem
count is incorrectly returned even in case of fail. Return ret instead.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 8fd0174..72bb0f6 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d,
bond->dev->name, new_value);
}
out:
- return count;
+ return ret;
}
static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR,
bonding_show_carrier, bonding_store_carrier);
@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
}
}
out:
- return count;
+ return ret;
}
static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
bonding_show_slaves_active, bonding_store_slaves_active);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next-2.6] bonding: fix return value of couple of store functions
2011-01-25 21:03 ` [PATCH net-next-2.6] bonding: fix return value of couple of store functions Jiri Pirko
@ 2011-01-25 21:07 ` Jay Vosburgh
2011-01-25 21:13 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Jay Vosburgh @ 2011-01-25 21:07 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem
Jiri Pirko <jpirko@redhat.com> wrote:
>count is incorrectly returned even in case of fail. Return ret instead.
>
>Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
>diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>index 8fd0174..72bb0f6 100644
>--- a/drivers/net/bonding/bond_sysfs.c
>+++ b/drivers/net/bonding/bond_sysfs.c
>@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d,
> bond->dev->name, new_value);
> }
> out:
>- return count;
>+ return ret;
> }
> static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR,
> bonding_show_carrier, bonding_store_carrier);
>@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
> }
> }
> out:
>- return count;
>+ return ret;
> }
> static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
> bonding_show_slaves_active, bonding_store_slaves_active);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next-2.6] bonding: fix return value of couple of store functions
2011-01-25 21:07 ` Jay Vosburgh
@ 2011-01-25 21:13 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-01-25 21:13 UTC (permalink / raw)
To: fubar; +Cc: jpirko, netdev
From: Jay Vosburgh <fubar@us.ibm.com>
Date: Tue, 25 Jan 2011 13:07:06 -0800
> Jiri Pirko <jpirko@redhat.com> wrote:
>
>>count is incorrectly returned even in case of fail. Return ret instead.
>>
>>Signed-off-by: Jiri Pirko <jpirko@redhat.com>
>
> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Applied, thanks guys.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-25 21:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 18:53 [PATCH net-next-2.6] bonding: fix return value of bonding_store_slaves_active() Jiri Pirko
2011-01-25 19:22 ` Jay Vosburgh
2011-01-25 20:52 ` Jiri Pirko
2011-01-25 21:03 ` [PATCH net-next-2.6] bonding: fix return value of couple of store functions Jiri Pirko
2011-01-25 21:07 ` Jay Vosburgh
2011-01-25 21:13 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.