From: Jiri Pirko <jiri@resnulli.us>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, dsahern@gmail.com, mlxsw@mellanox.com
Subject: Re: [patch iproute2] devlink: relax dpipe table show dependency on resources
Date: Thu, 21 Feb 2019 08:02:56 +0100 [thread overview]
Message-ID: <20190221070256.GB2312@nanopsycho> (raw)
In-Reply-To: <20190220180117.2ad552d0@shemminger-XPS-13-9360>
Thu, Feb 21, 2019 at 03:01:17AM CET, stephen@networkplumber.org wrote:
>On Wed, 20 Feb 2019 10:21:09 +0100
>Jiri Pirko <jiri@resnulli.us> wrote:
>
>> - resource_valid = !!nla_table[DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID];
>> + resource_valid = !!nla_table[DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID] &&
>> + ctx->resources;
>
>When you add a logical AND operator the !! is no longer needed. The !! convention
>is used to turn a value of not zero (ie not NULL) into a boolean. When you add the
>additional operator the result is already boolean.
Okay. Will send v2.
prev parent reply other threads:[~2019-02-21 7:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 9:21 [patch iproute2] devlink: relax dpipe table show dependency on resources Jiri Pirko
2019-02-21 2:01 ` Stephen Hemminger
2019-02-21 7:02 ` Jiri Pirko [this message]
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=20190221070256.GB2312@nanopsycho \
--to=jiri@resnulli.us \
--cc=dsahern@gmail.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/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