From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Aya Levin <ayal@mellanox.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Saeed Mahameed <saeedm@mellanox.com>,
Eran Ben Elisha <eranbe@mellanox.com>
Subject: drivers/net/ethernet/mellanox/mlx5/core/en/port.c:453 mlx5e_fec_in_caps() warn: signedness bug returning '(-95)'
Date: Fri, 11 Sep 2020 20:51:44 +0300 [thread overview]
Message-ID: <20200911175144.GJ12635@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3286 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 581cb3a26baf846ee9636214afaa5333919875b1
commit: 2132b71f78d207b63974fc7d6eced9c5e886c405 net/mlx5e: Advertise globaly supported FEC modes
config: powerpc-randconfig-m031-20200911 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/net/ethernet/mellanox/mlx5/core/en/port.c:453 mlx5e_fec_in_caps() warn: signedness bug returning '(-95)'
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2132b71f78d207b63974fc7d6eced9c5e886c405
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2132b71f78d207b63974fc7d6eced9c5e886c405
vim +453 drivers/net/ethernet/mellanox/mlx5/core/en/port.c
2132b71f78d207 Aya Levin 2020-02-11 444 bool mlx5e_fec_in_caps(struct mlx5_core_dev *dev, int fec_policy)
^^^^
2095b264147753 Shay Agroskin 2018-10-10 445 {
2095b264147753 Shay Agroskin 2018-10-10 446 u32 out[MLX5_ST_SZ_DW(pplm_reg)] = {};
2095b264147753 Shay Agroskin 2018-10-10 447 u32 in[MLX5_ST_SZ_DW(pplm_reg)] = {};
2095b264147753 Shay Agroskin 2018-10-10 448 int sz = MLX5_ST_SZ_BYTES(pplm_reg);
2095b264147753 Shay Agroskin 2018-10-10 449 int err;
2132b71f78d207 Aya Levin 2020-02-11 450 int i;
2095b264147753 Shay Agroskin 2018-10-10 451
2095b264147753 Shay Agroskin 2018-10-10 452 if (!MLX5_CAP_GEN(dev, pcam_reg))
2095b264147753 Shay Agroskin 2018-10-10 @453 return -EOPNOTSUPP;
^^^^^^^^^^^^^^^^^^
2095b264147753 Shay Agroskin 2018-10-10 454
2095b264147753 Shay Agroskin 2018-10-10 455 if (!MLX5_CAP_PCAM_REG(dev, pplm))
2095b264147753 Shay Agroskin 2018-10-10 456 return -EOPNOTSUPP;
^^^^^^^^^^^^^^^^^^
These become "return true;"
2095b264147753 Shay Agroskin 2018-10-10 457
2095b264147753 Shay Agroskin 2018-10-10 458 MLX5_SET(pplm_reg, in, local_port, 1);
2095b264147753 Shay Agroskin 2018-10-10 459 err = mlx5_core_access_reg(dev, in, sz, out, sz, MLX5_REG_PPLM, 0, 0);
2095b264147753 Shay Agroskin 2018-10-10 460 if (err)
2132b71f78d207 Aya Levin 2020-02-11 461 return false;
2095b264147753 Shay Agroskin 2018-10-10 462
2132b71f78d207 Aya Levin 2020-02-11 463 for (i = 0; i < MLX5E_FEC_SUPPORTED_SPEEDS; i++) {
2132b71f78d207 Aya Levin 2020-02-11 464 u8 fec_caps;
2095b264147753 Shay Agroskin 2018-10-10 465
2132b71f78d207 Aya Levin 2020-02-11 466 mlx5e_get_fec_cap_field(out, &fec_caps, fec_supported_speeds[i]);
2132b71f78d207 Aya Levin 2020-02-11 467 if (fec_caps & fec_policy)
2132b71f78d207 Aya Levin 2020-02-11 468 return true;
2132b71f78d207 Aya Levin 2020-02-11 469 }
2132b71f78d207 Aya Levin 2020-02-11 470 return false;
2095b264147753 Shay Agroskin 2018-10-10 471 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34773 bytes --]
reply other threads:[~2020-09-11 17:52 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=20200911175144.GJ12635@kadam \
--to=dan.carpenter@oracle.com \
--cc=ayal@mellanox.com \
--cc=eranbe@mellanox.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=saeedm@mellanox.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