* [Patch] net/sched/sch_generic.c: fix an error pointer
@ 2008-06-19 14:37 WANG Cong
2008-06-19 23:11 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: WANG Cong @ 2008-06-19 14:37 UTC (permalink / raw)
To: LKML; +Cc: Netdev, David Miller, Alexey Kuznetsov
ERR_PTR() ususally encodes an negative errno, not positive.
Note, in the following patch, 'err' is initialized as:
int err = -ENOBUFS;
Signed-off-by: WANG Cong <wcong@critical-links.com>
Cc: David Miller <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
---
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index d355e5e..13afa72 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -468,7 +468,7 @@ struct Qdisc *qdisc_alloc(struct net_device *dev,
struct Qdisc_ops *ops)
return sch;
errout:
- return ERR_PTR(-err);
+ return ERR_PTR(err);
}
struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct
Qdisc_ops *ops,
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Patch] net/sched/sch_generic.c: fix an error pointer
2008-06-19 14:37 [Patch] net/sched/sch_generic.c: fix an error pointer WANG Cong
@ 2008-06-19 23:11 ` David Miller
2008-06-21 19:55 ` WANG Cong
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2008-06-19 23:11 UTC (permalink / raw)
To: wcong; +Cc: linux-kernel, netdev, kuznet
From: WANG Cong <wcong@critical-links.com>
Date: Thu, 19 Jun 2008 15:37:14 +0100
> ERR_PTR() ususally encodes an negative errno, not positive.
>
> Note, in the following patch, 'err' is initialized as:
>
> int err = -ENOBUFS;
>
> Signed-off-by: WANG Cong <wcong@critical-links.com>
Patch is whitespace corruped and line wrapped by your
email client.
Please fix this and resubmit, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch] net/sched/sch_generic.c: fix an error pointer
2008-06-19 23:11 ` David Miller
@ 2008-06-21 19:55 ` WANG Cong
2008-06-28 2:51 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: WANG Cong @ 2008-06-21 19:55 UTC (permalink / raw)
To: David Miller; +Cc: wcong, linux-kernel, netdev, kuznet
On Thu, Jun 19, 2008 at 04:11:08PM -0700, David Miller wrote:
>From: WANG Cong <wcong@critical-links.com>
>Date: Thu, 19 Jun 2008 15:37:14 +0100
>
>> ERR_PTR() ususally encodes an negative errno, not positive.
>>
>> Note, in the following patch, 'err' is initialized as:
>>
>> int err = -ENOBUFS;
>>
>> Signed-off-by: WANG Cong <wcong@critical-links.com>
>
>Patch is whitespace corruped and line wrapped by your
>email client.
>
>Please fix this and resubmit, thank you.
I am very sorry for this. Resend it with mutt. :-)
--------------->
ERR_PTR() ususally encodes an negative errno, not positive.
Note, in the following patch, 'err' is initialized as:
int err = -ENOBUFS;
Signed-off-by: WANG Cong <wcong@critical-links.com>
Cc: David Miller <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
---
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index d355e5e..13afa72 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -468,7 +468,7 @@ struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops)
return sch;
errout:
- return ERR_PTR(-err);
+ return ERR_PTR(err);
}
struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops,
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Patch] net/sched/sch_generic.c: fix an error pointer
2008-06-21 19:55 ` WANG Cong
@ 2008-06-28 2:51 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-06-28 2:51 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: wcong, linux-kernel, netdev, kuznet
From: WANG Cong <xiyou.wangcong@gmail.com>
Date: Sat, 21 Jun 2008 20:55:26 +0100
> ERR_PTR() ususally encodes an negative errno, not positive.
>
> Note, in the following patch, 'err' is initialized as:
>
> int err = -ENOBUFS;
>
> Signed-off-by: WANG Cong <wcong@critical-links.com>
Patch applied, th anks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-28 2:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-19 14:37 [Patch] net/sched/sch_generic.c: fix an error pointer WANG Cong
2008-06-19 23:11 ` David Miller
2008-06-21 19:55 ` WANG Cong
2008-06-28 2:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).