From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
Date: Mon, 01 Jun 2020 22:53:43 +0300 [thread overview]
Message-ID: <20200601195343.GV22511@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3756 bytes --]
Hi Christian,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: b276527539188f1f61c082ebef27803db93e536d staging: most: move core files out of the staging area
date: 10 weeks ago
config: mips-randconfig-m031-20200601 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b276527539188f1f61c082ebef27803db93e536d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout b276527539188f1f61c082ebef27803db93e536d
vim +/iface +1287 drivers/most/core.c
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1279 int most_register_interface(struct most_interface *iface)
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1280 {
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1281 unsigned int i;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1282 int id;
fcb7fad82e23f6 drivers/staging/most/core.c Christian Gromm 2017-11-21 1283 struct most_channel *c;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1284
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 @1285 if (!iface || !iface->enqueue || !iface->configure ||
^^^^^^
Check for NULL.
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1286 !iface->poison_channel || (iface->num_channels > MAX_CHANNELS)) {
6a82c775812944 drivers/staging/most/core.c Christian Gromm 2020-01-23 @1287 dev_err(iface->dev, "Bad interface or channel overflow\n");
^^^^^^^^^^
Dereference. "iface" can't be NULL. Just delete the check.
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1288 return -EINVAL;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1289 }
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1290
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1291 id = ida_simple_get(&mdev_id, 0, 0, GFP_KERNEL);
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1292 if (id < 0) {
b7935e52dd9869 drivers/staging/most/core.c Christian Gromm 2020-01-23 1293 dev_err(iface->dev, "Failed to allocate device ID\n");
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1294 return id;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1295 }
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1296
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27728 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [kbuild] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
Date: Mon, 01 Jun 2020 22:53:43 +0300 [thread overview]
Message-ID: <20200601195343.GV22511@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3756 bytes --]
Hi Christian,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: b276527539188f1f61c082ebef27803db93e536d staging: most: move core files out of the staging area
date: 10 weeks ago
config: mips-randconfig-m031-20200601 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b276527539188f1f61c082ebef27803db93e536d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout b276527539188f1f61c082ebef27803db93e536d
vim +/iface +1287 drivers/most/core.c
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1279 int most_register_interface(struct most_interface *iface)
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1280 {
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1281 unsigned int i;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1282 int id;
fcb7fad82e23f6 drivers/staging/most/core.c Christian Gromm 2017-11-21 1283 struct most_channel *c;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1284
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 @1285 if (!iface || !iface->enqueue || !iface->configure ||
^^^^^^
Check for NULL.
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1286 !iface->poison_channel || (iface->num_channels > MAX_CHANNELS)) {
6a82c775812944 drivers/staging/most/core.c Christian Gromm 2020-01-23 @1287 dev_err(iface->dev, "Bad interface or channel overflow\n");
^^^^^^^^^^
Dereference. "iface" can't be NULL. Just delete the check.
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1288 return -EINVAL;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1289 }
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1290
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1291 id = ida_simple_get(&mdev_id, 0, 0, GFP_KERNEL);
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1292 if (id < 0) {
b7935e52dd9869 drivers/staging/most/core.c Christian Gromm 2020-01-23 1293 dev_err(iface->dev, "Failed to allocate device ID\n");
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1294 return id;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1295 }
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1296
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27728 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, "Christian, Gromm," <christian.gromm@microchip.com>
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [kbuild] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
Date: Mon, 1 Jun 2020 22:53:43 +0300 [thread overview]
Message-ID: <20200601195343.GV22511@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3543 bytes --]
Hi Christian,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: b276527539188f1f61c082ebef27803db93e536d staging: most: move core files out of the staging area
date: 10 weeks ago
config: mips-randconfig-m031-20200601 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b276527539188f1f61c082ebef27803db93e536d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout b276527539188f1f61c082ebef27803db93e536d
vim +/iface +1287 drivers/most/core.c
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1279 int most_register_interface(struct most_interface *iface)
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1280 {
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1281 unsigned int i;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1282 int id;
fcb7fad82e23f6 drivers/staging/most/core.c Christian Gromm 2017-11-21 1283 struct most_channel *c;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1284
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 @1285 if (!iface || !iface->enqueue || !iface->configure ||
^^^^^^
Check for NULL.
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1286 !iface->poison_channel || (iface->num_channels > MAX_CHANNELS)) {
6a82c775812944 drivers/staging/most/core.c Christian Gromm 2020-01-23 @1287 dev_err(iface->dev, "Bad interface or channel overflow\n");
^^^^^^^^^^
Dereference. "iface" can't be NULL. Just delete the check.
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1288 return -EINVAL;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1289 }
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1290
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1291 id = ida_simple_get(&mdev_id, 0, 0, GFP_KERNEL);
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1292 if (id < 0) {
b7935e52dd9869 drivers/staging/most/core.c Christian Gromm 2020-01-23 1293 dev_err(iface->dev, "Failed to allocate device ID\n");
4d5f022f3a664e drivers/staging/most/core.c Christian Gromm 2017-11-21 1294 return id;
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1295 }
57562a72414ca3 drivers/staging/most/mostcore/core.c Christian Gromm 2015-07-24 1296
---
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: 27728 bytes --]
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
next reply other threads:[~2020-06-01 19:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 19:53 Dan Carpenter [this message]
2020-06-01 19:53 ` [kbuild] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285) Dan Carpenter
2020-06-01 19:53 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2020-06-01 19:10 kbuild test robot
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=20200601195343.GV22511@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.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.