Hi Dan, W dniu 08.12.2015 o 14:15, Dan Carpenter pisze:
Hello Andrzej Pietrasiewicz, The patch b4b91143ec45: "usb: gadget: tcm: factor out f_tcm" from Oct 27, 2015, leads to the following static checker warning: drivers/usb/gadget/function/f_tcm.c:1149 usbg_submit_command() warn: bool is not less than zero. drivers/usb/gadget/function/f_tcm.c 1145 cmd->unpacked_lun = scsilun_to_int(&cmd_iu->lun); 1146 1147 INIT_WORK(&cmd->work, usbg_cmd_work); 1148 ret = queue_work(tpg->workqueue, &cmd->work); 1149 if (ret < 0) queue_work() returns type bool. Probably just remove this check. 1150 goto err; 1151 1152 return 0; 1153 err: 1154 kfree(cmd); 1155 return -EINVAL; 1156 } drivers/usb/gadget/function/f_tcm.c:1244 bot_submit_command() warn: bool is not less than zero.
The purpose of the commit is to split tcm_usb_gadget.c into legacy gadget proper and f_tcm.c. The newly created f_tcm.c is a part of tcm_usb_gadget.c copied into the new place, so this warning is a duplicate of an old warning (which of course does not mean it will not be addressed). AP -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html