* [staging:staging-testing 87/153] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:686 vchiq_initialise() error: we previously assumed 'state' could be null (see line 681)
@ 2023-12-18 16:50 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-12-18 16:50 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: devel@driverdev.osuosl.org
TO: Umang Jain <umang.jain@ideasonboard.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head: 5e8cdb6f6ebe28976876ab04995a5d3779b85082
commit: e70f17ed997cb7ee6c34089f2cdc2a9edc886503 [87/153] staging: vc04_services: Drop vchiq_log_error() in favour of dev_err
:::::: branch date: 3 days ago
:::::: commit date: 12 days ago
config: csky-randconfig-r081-20231218 (https://download.01.org/0day-ci/archive/20231219/202312190038.zuEX32PB-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202312190038.zuEX32PB-lkp@intel.com/
smatch warnings:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:686 vchiq_initialise() error: we previously assumed 'state' could be null (see line 681)
vim +/state +686 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
7b9148dcb74a004 Ojaswin Mujoo 2021-07-21 666
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 667 #define VCHIQ_INIT_RETRIES 10
abf2836a381a307 Stefan Wahren 2021-04-25 668 int vchiq_initialise(struct vchiq_instance **instance_out)
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 669 {
2d0a0291135fd2f Dominic Braun 2018-12-14 670 struct vchiq_state *state;
4ddf9a2555caf21 Jamal Shareef 2019-11-05 671 struct vchiq_instance *instance = NULL;
abf2836a381a307 Stefan Wahren 2021-04-25 672 int i, ret;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 673
3da8757576ef789 Amarjargal Gundjalam 2020-10-28 674 /*
3da8757576ef789 Amarjargal Gundjalam 2020-10-28 675 * VideoCore may not be ready due to boot up timing.
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 676 * It may never be ready if kernel and firmware are mismatched,so don't
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 677 * block forever.
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 678 */
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 679 for (i = 0; i < VCHIQ_INIT_RETRIES; i++) {
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 680 state = vchiq_get_state();
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 @681 if (state)
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 682 break;
81244ba0f03691a Stefan Wahren 2018-03-31 683 usleep_range(500, 600);
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 684 }
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 685 if (i == VCHIQ_INIT_RETRIES) {
e70f17ed997cb7e Umang Jain 2023-12-05 @686 dev_err(state->dev, "core: %s: Videocore not initialized\n", __func__);
abf2836a381a307 Stefan Wahren 2021-04-25 687 ret = -ENOTCONN;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 688 goto failed;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 689 } else if (i > 0) {
0b12086306d0563 Umang Jain 2023-10-24 690 vchiq_log_warning(state->dev, VCHIQ_CORE,
146707c355e9823 Gaston Gonzalez 2021-09-19 691 "%s: videocore initialized after %d retries\n", __func__, i);
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 692 }
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 693
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 694 instance = kzalloc(sizeof(*instance), GFP_KERNEL);
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 695 if (!instance) {
e70f17ed997cb7e Umang Jain 2023-12-05 696 dev_err(state->dev, "core: %s: Cannot allocate vchiq instance\n", __func__);
abf2836a381a307 Stefan Wahren 2021-04-25 697 ret = -ENOMEM;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 698 goto failed;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 699 }
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 700
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 701 instance->connected = 0;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 702 instance->state = state;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 703 mutex_init(&instance->bulk_waiter_list_mutex);
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 704 INIT_LIST_HEAD(&instance->bulk_waiter_list);
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 705
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 706 *instance_out = instance;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 707
abf2836a381a307 Stefan Wahren 2021-04-25 708 ret = 0;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 709
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 710 failed:
9748de55a37ee33 Umang Jain 2023-10-24 711 vchiq_log_trace(state->dev, VCHIQ_CORE,
9748de55a37ee33 Umang Jain 2023-10-24 712 "%s(%p): returning %d", __func__, instance, ret);
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 713
abf2836a381a307 Stefan Wahren 2021-04-25 714 return ret;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 715 }
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 716 EXPORT_SYMBOL(vchiq_initialise);
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 717
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [staging:staging-testing 87/153] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:686 vchiq_initialise() error: we previously assumed 'state' could be null (see line 681)
@ 2024-01-03 9:51 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2024-01-03 9:51 UTC (permalink / raw)
To: oe-kbuild, Umang Jain; +Cc: lkp, oe-kbuild-all, devel, Greg Kroah-Hartman
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head: 5e8cdb6f6ebe28976876ab04995a5d3779b85082
commit: e70f17ed997cb7ee6c34089f2cdc2a9edc886503 [87/153] staging: vc04_services: Drop vchiq_log_error() in favour of dev_err
config: csky-randconfig-r081-20231218 (https://download.01.org/0day-ci/archive/20231219/202312190038.zuEX32PB-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202312190038.zuEX32PB-lkp@intel.com/
smatch warnings:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:686 vchiq_initialise() error: we previously assumed 'state' could be null (see line 681)
vim +/state +686 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
abf2836a381a307 Stefan Wahren 2021-04-25 668 int vchiq_initialise(struct vchiq_instance **instance_out)
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 669 {
2d0a0291135fd2f Dominic Braun 2018-12-14 670 struct vchiq_state *state;
4ddf9a2555caf21 Jamal Shareef 2019-11-05 671 struct vchiq_instance *instance = NULL;
abf2836a381a307 Stefan Wahren 2021-04-25 672 int i, ret;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 673
3da8757576ef789 Amarjargal Gundjalam 2020-10-28 674 /*
3da8757576ef789 Amarjargal Gundjalam 2020-10-28 675 * VideoCore may not be ready due to boot up timing.
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 676 * It may never be ready if kernel and firmware are mismatched,so don't
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 677 * block forever.
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 678 */
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 679 for (i = 0; i < VCHIQ_INIT_RETRIES; i++) {
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 680 state = vchiq_get_state();
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 @681 if (state)
We exit early if state is valid
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 682 break;
81244ba0f03691a Stefan Wahren 2018-03-31 683 usleep_range(500, 600);
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 684 }
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 685 if (i == VCHIQ_INIT_RETRIES) {
e70f17ed997cb7e Umang Jain 2023-12-05 @686 dev_err(state->dev, "core: %s: Videocore not initialized\n", __func__);
^^^^^^^^^^
state is NULL at this point.
abf2836a381a307 Stefan Wahren 2021-04-25 687 ret = -ENOTCONN;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 688 goto failed;
5c5e6ef6287cbf3 Arnd Bergmann 2018-02-02 689 } else if (i > 0) {
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-03 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-18 16:50 [staging:staging-testing 87/153] drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:686 vchiq_initialise() error: we previously assumed 'state' could be null (see line 681) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2024-01-03 9:51 Dan Carpenter
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.