All of lore.kernel.org
 help / color / mirror / Atom feed
* [staging:staging-testing 278/280] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
@ 2020-03-31 10:45 ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2020-03-31 10:45 UTC (permalink / raw)
  To: kbuild, Christian Gromm; +Cc: devel, Greg Kroah-Hartman, kbuild-all

Hi Christian,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   4a1a3e9bf5654e98bb48f5b074af17af96ded30d
commit: b276527539188f1f61c082ebef27803db93e536d [278/280] staging: most: move core files out of the staging area

If you fix the issue, kindly add following tag
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/gregkh/staging.git/commit/?id=b276527539188f1f61c082ebef27803db93e536d
git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
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 ||
                                                                                                    ^^^^^^

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");
                                                                                                                ^^^^^^^^^^

Hopefully, we can just remove the NULL 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) {

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [staging:staging-testing 278/280] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
@ 2020-03-31 10:45 ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2020-03-31 10:45 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3011 bytes --]

Hi Christian,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   4a1a3e9bf5654e98bb48f5b074af17af96ded30d
commit: b276527539188f1f61c082ebef27803db93e536d [278/280] staging: most: move core files out of the staging area

If you fix the issue, kindly add following tag
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/gregkh/staging.git/commit/?id=b276527539188f1f61c082ebef27803db93e536d
git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
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 ||
                                                                                                    ^^^^^^

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");
                                                                                                                ^^^^^^^^^^

Hopefully, we can just remove the NULL 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) {

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [staging:staging-testing 278/280] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
@ 2020-03-31 10:45 ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2020-03-31 10:45 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3009 bytes --]

Hi Christian,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   4a1a3e9bf5654e98bb48f5b074af17af96ded30d
commit: b276527539188f1f61c082ebef27803db93e536d [278/280] staging: most: move core files out of the staging area

If you fix the issue, kindly add following tag
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/gregkh/staging.git/commit/?id=b276527539188f1f61c082ebef27803db93e536d
git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
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 ||
                                                                                                    ^^^^^^

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");
                                                                                                                ^^^^^^^^^^

Hopefully, we can just remove the NULL 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) {

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [staging:staging-testing 278/280] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
  2020-03-31 10:45 ` Dan Carpenter
@ 2020-03-31 13:38   ` Christian.Gromm
  -1 siblings, 0 replies; 5+ messages in thread
From: Christian.Gromm @ 2020-03-31 13:38 UTC (permalink / raw)
  To: kbuild, dan.carpenter; +Cc: devel, gregkh, kbuild-all

On Tue, 2020-03-31 at 13:45 +0300, Dan Carpenter wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> Hi Christian,
> 
> First bad commit (maybe != root cause):
> 
> tree:   
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> staging-testing
> head:   4a1a3e9bf5654e98bb48f5b074af17af96ded30d
> commit: b276527539188f1f61c082ebef27803db93e536d [278/280] staging:
> most: move core files out of the staging area
> 
> If you fix the issue, kindly add following tag
> 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/gregkh/staging.git/commit/?id=b276527539188f1f61c082ebef27803db93e536d
> git remote add staging 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> git remote update staging
> 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 ||
>                                                                      
>                                ^^^^^^
> 
> 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");
>                                                                      
>                                            ^^^^^^^^^^
> 
> Hopefully, we can just remove the NULL check?

Yes we can. The modules that register such an interface with the
core already check that.

I'll send a patch that removes the NULL check of the "iface" pointer.

thanks,
Chris

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [staging:staging-testing 278/280] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285)
@ 2020-03-31 13:38   ` Christian.Gromm
  0 siblings, 0 replies; 5+ messages in thread
From: Christian.Gromm @ 2020-03-31 13:38 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2867 bytes --]

On Tue, 2020-03-31 at 13:45 +0300, Dan Carpenter wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> Hi Christian,
> 
> First bad commit (maybe != root cause):
> 
> tree:   
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> staging-testing
> head:   4a1a3e9bf5654e98bb48f5b074af17af96ded30d
> commit: b276527539188f1f61c082ebef27803db93e536d [278/280] staging:
> most: move core files out of the staging area
> 
> If you fix the issue, kindly add following tag
> 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/gregkh/staging.git/commit/?id=b276527539188f1f61c082ebef27803db93e536d
> git remote add staging 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> git remote update staging
> 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 ||
>                                                                      
>                                ^^^^^^
> 
> 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");
>                                                                      
>                                            ^^^^^^^^^^
> 
> Hopefully, we can just remove the NULL check?

Yes we can. The modules that register such an interface with the
core already check that.

I'll send a patch that removes the NULL check of the "iface" pointer.

thanks,
Chris


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-31 13:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 10:45 [staging:staging-testing 278/280] drivers/most/core.c:1287 most_register_interface() error: we previously assumed 'iface' could be null (see line 1285) Dan Carpenter
2020-03-31 10:45 ` Dan Carpenter
2020-03-31 10:45 ` Dan Carpenter
2020-03-31 13:38 ` Christian.Gromm
2020-03-31 13:38   ` Christian.Gromm

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.