From: Borislav Petkov <bp@alien8.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>
Subject: EDAC, sb_edac.c: Fix signedness bugs in *_get_ha() functions.
Date: Sat, 15 Sep 2018 12:21:45 +0200 [thread overview]
Message-ID: <20180915102145.GB6794@zn.tnic> (raw)
On Fri, Sep 14, 2018 at 01:19:05PM -0700, Luck, Tony wrote:
> A static checker gave the following warnings:
>
> drivers/edac/sb_edac.c:1030 ibridge_get_ha() warn: signedness bug returning '(-22)'
> drivers/edac/sb_edac.c:1037 knl_get_ha() warn: signedness bug returning '(-22)'
>
> Both because the functions are declared to return a "u8", but try to return
> -EINVAL for the error case.
>
> Fix by returning 0xff (since the caller doesn't look at, or pass on, the
> return value).
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
> drivers/edac/sb_edac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied,
thanks.
next reply other threads:[~2018-09-15 10:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 10:21 Borislav Petkov [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-09-14 20:19 EDAC, sb_edac.c: Fix signedness bugs in *_get_ha() functions Luck, Tony
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=20180915102145.GB6794@zn.tnic \
--to=bp@alien8.de \
--cc=dan.carpenter@oracle.com \
--cc=linux-edac@vger.kernel.org \
--cc=qiuxu.zhuo@intel.com \
--cc=tony.luck@intel.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