CC: [email protected]
BCC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Russ Weight <[email protected]>
TO: [email protected]
TO: [email protected]
TO: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: Russ Weight <[email protected]>

Hi Russ,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on shuah-kselftest/next mcgrof/sysctl-next 
linus/master v5.18-rc3 next-20220419]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    
https://github.com/intel-lab-lkp/linux/commits/Russ-Weight/Extend-FW-framework-for-user-FW-uploads/20220419-064126
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
3123109284176b1532874591f7c81f3837bbdc17
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
config: powerpc64-randconfig-c003-20220418 
(https://download.01.org/0day-ci/archive/20220419/[email protected]/config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Julia Lawall <[email protected]>


cocci warnings: (new ones prefixed by >>)
>> lib/test_firmware.c:1291:5-8: ERROR: invalid reference to the index variable 
>> of the iterator on line 1287

vim +1291 lib/test_firmware.c

c92316bf8e94830a Luis R. Rodriguez 2017-07-20  1273  
cb4d12e8d7596410 Russ Weight       2022-04-18  1274  static ssize_t 
upload_read_show(struct device *dev,
cb4d12e8d7596410 Russ Weight       2022-04-18  1275                             
struct device_attribute *attr,
cb4d12e8d7596410 Russ Weight       2022-04-18  1276                             
char *buf)
cb4d12e8d7596410 Russ Weight       2022-04-18  1277  {
cb4d12e8d7596410 Russ Weight       2022-04-18  1278     struct 
test_firmware_upload *tst;
cb4d12e8d7596410 Russ Weight       2022-04-18  1279     int ret = -EINVAL;
cb4d12e8d7596410 Russ Weight       2022-04-18  1280  
cb4d12e8d7596410 Russ Weight       2022-04-18  1281     if 
(!test_fw_config->upload_name) {
cb4d12e8d7596410 Russ Weight       2022-04-18  1282             pr_err("Set 
config_upload_name before using upload_read\n");
cb4d12e8d7596410 Russ Weight       2022-04-18  1283             return -EINVAL;
cb4d12e8d7596410 Russ Weight       2022-04-18  1284     }
cb4d12e8d7596410 Russ Weight       2022-04-18  1285  
cb4d12e8d7596410 Russ Weight       2022-04-18  1286     
mutex_lock(&test_fw_mutex);
cb4d12e8d7596410 Russ Weight       2022-04-18 @1287     
list_for_each_entry(tst, &test_upload_list, node)
cb4d12e8d7596410 Russ Weight       2022-04-18  1288             if (tst->name 
== test_fw_config->upload_name)
cb4d12e8d7596410 Russ Weight       2022-04-18  1289                     break;
cb4d12e8d7596410 Russ Weight       2022-04-18  1290  
cb4d12e8d7596410 Russ Weight       2022-04-18 @1291     if (tst->name != 
test_fw_config->upload_name) {
cb4d12e8d7596410 Russ Weight       2022-04-18  1292             
pr_err("Firmware name not found: %s\n",
cb4d12e8d7596410 Russ Weight       2022-04-18  1293                    
test_fw_config->upload_name);
cb4d12e8d7596410 Russ Weight       2022-04-18  1294             goto out;
cb4d12e8d7596410 Russ Weight       2022-04-18  1295     }
cb4d12e8d7596410 Russ Weight       2022-04-18  1296  
cb4d12e8d7596410 Russ Weight       2022-04-18  1297     if (tst->size > 
PAGE_SIZE) {
cb4d12e8d7596410 Russ Weight       2022-04-18  1298             pr_err("Testing 
interface must use PAGE_SIZE firmware for now\n");
cb4d12e8d7596410 Russ Weight       2022-04-18  1299             goto out;
cb4d12e8d7596410 Russ Weight       2022-04-18  1300     }
cb4d12e8d7596410 Russ Weight       2022-04-18  1301  
cb4d12e8d7596410 Russ Weight       2022-04-18  1302     memcpy(buf, tst->buf, 
tst->size);
cb4d12e8d7596410 Russ Weight       2022-04-18  1303     ret = tst->size;
cb4d12e8d7596410 Russ Weight       2022-04-18  1304  out:
cb4d12e8d7596410 Russ Weight       2022-04-18  1305     
mutex_unlock(&test_fw_mutex);
cb4d12e8d7596410 Russ Weight       2022-04-18  1306     return ret;
cb4d12e8d7596410 Russ Weight       2022-04-18  1307  }
cb4d12e8d7596410 Russ Weight       2022-04-18  1308  static 
DEVICE_ATTR_RO(upload_read);
cb4d12e8d7596410 Russ Weight       2022-04-18  1309  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to