From: WANG Cong <xiyou.wangcong@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: wcong@critical-links.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru
Subject: Re: [Patch] net/sched/sch_generic.c: fix an error pointer
Date: Sat, 21 Jun 2008 20:55:26 +0100 [thread overview]
Message-ID: <20080621195526.GA25715@hack.netcabo.pt> (raw)
In-Reply-To: <20080619.161108.23678497.davem@davemloft.net>
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,
next prev parent reply other threads:[~2008-06-21 19:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2008-06-28 2:51 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080621195526.GA25715@hack.netcabo.pt \
--to=xiyou.wangcong@gmail.com \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wcong@critical-links.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.