From: David Miller <davem@davemloft.net>
To: jiri@resnulli.us
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, mlxsw@mellanox.com
Subject: Re: [patch net-next] net/sched: let chain_get to figure out the return value
Date: Fri, 26 May 2017 10:59:12 -0400 (EDT) [thread overview]
Message-ID: <20170526.105912.229870645071385383.davem@davemloft.net> (raw)
In-Reply-To: <20170526072129.11075-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Fri, 26 May 2017 09:21:29 +0200
> From: Jiri Pirko <jiri@mellanox.com>
>
> Alhough I believe that this create/nocreate dance is completelly
> pointless, at least make it a bit nicer and easier to read.
> Push the decision on what error value is returned to chain_get function
> and use ERR macros.
>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
No, this is quite worse.
You're leaving pointer error values in structures. That's extremely
error prone.
And as stated in the other thread, I don't think Cong's logic is strange
or hard to understand at all.
next prev parent reply other threads:[~2017-05-26 14:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 7:21 [patch net-next] net/sched: let chain_get to figure out the return value Jiri Pirko
2017-05-26 14:59 ` David Miller [this message]
2017-05-27 9:54 ` Jiri Pirko
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=20170526.105912.229870645071385383.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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 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).