From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] ethtool: provide coalescing parameters with COALESCE_GET request
Date: Sat, 04 Apr 2020 18:02:38 +0000 [thread overview]
Message-ID: <20200404180238.GA173535@mwanda> (raw)
Hello Michal Kubecek,
The patch 217275453b3e: "ethtool: provide coalescing parameters with
COALESCE_GET request" from Mar 28, 2020, leads to the following
static checker warning:
net/ethtool/coalesce.c:134 coalesce_put_u32()
warn: signedness bug returning '(-90)'
net/ethtool/coalesce.c
129 static bool coalesce_put_u32(struct sk_buff *skb, u16 attr_type, u32 val,
130 u32 supported_params)
131 {
132 if (!val && !(supported_params & attr_to_mask(attr_type)))
133 return false;
134 return nla_put_u32(skb, attr_type, val);
This is done deliberately to return true on failure and false on
success but it causes a static checker warning.
135 }
136
137 static bool coalesce_put_bool(struct sk_buff *skb, u16 attr_type, u32 val,
138 u32 supported_params)
139 {
140 if (!val && !(supported_params & attr_to_mask(attr_type)))
141 return false;
142 return nla_put_u8(skb, attr_type, !!val);
Same.
143 }
regards,
dan carpenter
reply other threads:[~2020-04-04 18:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200404180238.GA173535@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.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 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.