The code under the error label may not be meaningful if error is reached
from line 495.

julia


---------- Forwarded message ----------
Date: Sat, 29 Apr 2017 01:52:34 +0800
From: kbuild test robot <fengguang...@intel.com>
To: kbu...@01.org
Cc: Julia Lawall <julia.law...@lip6.fr>
Subject: [staging:staging-testing 393/1005]
    drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:503:6-12: ERROR:
    invalid reference to the index variable of the iterator on line 456

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
head:   11270059e8d0b6f80801fac910c4ef751ca05c4c
commit: 49637a458b61629672a8ae19fdae2058c64815cf [393/1005] staging: media: 
atomisp: remove '.' from pci Makefile
:::::: branch date: 2 hours ago
:::::: commit date: 7 weeks ago

>> drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:503:6-12: ERROR: 
>> invalid reference to the index variable of the iterator on line 456

git remote add staging 
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git remote update staging
git checkout 49637a458b61629672a8ae19fdae2058c64815cf
vim +503 drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c

a49d2536 Alan Cox 2017-02-17  450       if (asd->acc.pipeline || 
asd->acc.extension_mode)
a49d2536 Alan Cox 2017-02-17  451               return -EBUSY;
a49d2536 Alan Cox 2017-02-17  452
a49d2536 Alan Cox 2017-02-17  453       /* Invalidate caches. FIXME: should 
flush only necessary buffers */
a49d2536 Alan Cox 2017-02-17  454       wbinvd();
a49d2536 Alan Cox 2017-02-17  455
a49d2536 Alan Cox 2017-02-17 @456       list_for_each_entry(acc_fw, 
&asd->acc.fw, list) {
a49d2536 Alan Cox 2017-02-17  457               if (acc_fw->type != 
ATOMISP_ACC_FW_LOAD_TYPE_OUTPUT &&
a49d2536 Alan Cox 2017-02-17  458                   acc_fw->type != 
ATOMISP_ACC_FW_LOAD_TYPE_VIEWFINDER)
a49d2536 Alan Cox 2017-02-17  459                       continue;
a49d2536 Alan Cox 2017-02-17  460
a49d2536 Alan Cox 2017-02-17  461               for (i = 0; i < 
ARRAY_SIZE(acc_flag_to_pipe); i++) {
a49d2536 Alan Cox 2017-02-17  462                       /* QoS (ACC pipe) 
acceleration stages are currently
a49d2536 Alan Cox 2017-02-17  463                        * allowed only in 
continuous mode. Skip them for
a49d2536 Alan Cox 2017-02-17  464                        * all other modes. */
a49d2536 Alan Cox 2017-02-17  465                       if (!continuous &&
a49d2536 Alan Cox 2017-02-17  466                           
acc_flag_to_pipe[i].flag ==
a49d2536 Alan Cox 2017-02-17  467                           
ATOMISP_ACC_FW_LOAD_FL_ACC)
a49d2536 Alan Cox 2017-02-17  468                               continue;
a49d2536 Alan Cox 2017-02-17  469
a49d2536 Alan Cox 2017-02-17  470                       if (acc_fw->flags & 
acc_flag_to_pipe[i].flag) {
a49d2536 Alan Cox 2017-02-17  471                               ret = 
atomisp_css_load_acc_extension(asd,
a49d2536 Alan Cox 2017-02-17  472                                       
acc_fw->fw,
a49d2536 Alan Cox 2017-02-17  473                                       
acc_flag_to_pipe[i].pipe_id,
a49d2536 Alan Cox 2017-02-17  474                                       
acc_fw->type);
a49d2536 Alan Cox 2017-02-17  475                               if (ret) {
a49d2536 Alan Cox 2017-02-17  476                                       i--;
a49d2536 Alan Cox 2017-02-17  477                                       goto 
error;
a49d2536 Alan Cox 2017-02-17  478                               }
a49d2536 Alan Cox 2017-02-17  479
a49d2536 Alan Cox 2017-02-17  480                               ext_loaded = 
true;
a49d2536 Alan Cox 2017-02-17  481                       }
a49d2536 Alan Cox 2017-02-17  482               }
a49d2536 Alan Cox 2017-02-17  483
a49d2536 Alan Cox 2017-02-17  484               ret = 
atomisp_css_set_acc_parameters(acc_fw);
a49d2536 Alan Cox 2017-02-17  485               if (ret < 0)
a49d2536 Alan Cox 2017-02-17  486                       goto error;
a49d2536 Alan Cox 2017-02-17  487       }
a49d2536 Alan Cox 2017-02-17  488
a49d2536 Alan Cox 2017-02-17  489       if (!ext_loaded)
a49d2536 Alan Cox 2017-02-17  490               return ret;
a49d2536 Alan Cox 2017-02-17  491
a49d2536 Alan Cox 2017-02-17  492       ret = atomisp_css_update_stream(asd);
a49d2536 Alan Cox 2017-02-17  493       if (ret) {
a49d2536 Alan Cox 2017-02-17  494               dev_err(isp->dev, "%s: update 
stream failed.\n", __func__);
a49d2536 Alan Cox 2017-02-17  495               goto error;
a49d2536 Alan Cox 2017-02-17  496       }
a49d2536 Alan Cox 2017-02-17  497
a49d2536 Alan Cox 2017-02-17  498       asd->acc.extension_mode = true;
a49d2536 Alan Cox 2017-02-17  499       return 0;
a49d2536 Alan Cox 2017-02-17  500
a49d2536 Alan Cox 2017-02-17  501  error:
a49d2536 Alan Cox 2017-02-17  502       for (; i >= 0; i--) {
a49d2536 Alan Cox 2017-02-17 @503               if (acc_fw->flags & 
acc_flag_to_pipe[i].flag) {
a49d2536 Alan Cox 2017-02-17  504                       
atomisp_css_unload_acc_extension(asd, acc_fw->fw,
a49d2536 Alan Cox 2017-02-17  505                                       
acc_flag_to_pipe[i].pipe_id);
a49d2536 Alan Cox 2017-02-17  506               }

:::::: The code at line 503 was first introduced by commit
:::::: a49d25364dfb9f8a64037488a39ab1f56c5fa419 staging/atomisp: Add support 
for the Intel IPU v2

:::::: TO: Alan Cox <a...@linux.intel.com>
:::::: CC: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to