[ A couple more Smatch warnings ] Hello Bryant G. Ly, The patch 88a678bbc34c: "ibmvscsis: Initial commit of IBM VSCSI Tgt Driver" from Jun 28, 2016, leads to the following static checker warning: drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:3381 ibmvscsis_probe() error: snprintf() is printing too much 256 vs 32 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c 3360 static int ibmvscsis_probe(struct vio_dev *vdev, 3361 const struct vio_device_id *id) 3362 { 3363 struct scsi_info *vscsi; 3364 int rc = 0; 3365 long hrc = 0; 3366 char wq_name[24]; 3367 3368 vscsi = kzalloc(sizeof(*vscsi), GFP_KERNEL); 3369 if (!vscsi) { 3370 rc = -ENOMEM; 3371 pr_err("probe: allocation of adapter failed\n"); 3372 return rc; 3373 } 3374 3375 vscsi->dma_dev = vdev; 3376 vscsi->dev = vdev->dev; 3377 INIT_LIST_HEAD(&vscsi->schedule_q); 3378 INIT_LIST_HEAD(&vscsi->waiting_rsp); 3379 INIT_LIST_HEAD(&vscsi->active_q); 3380 3381 snprintf(vscsi->tport.tport_name, 256, "%s", dev_name(&vdev->dev)); ^^^ This should be 32. 3382 3383 pr_debug("probe tport_name: %s\n", vscsi->tport.tport_name); drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:2525 ibmvscsis_parse_cmd() info: ignoring unreachable code. drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c 2520 2521 if (srp_get_desc_table(srp, &dir, &data_len)) { 2522 dev_err(&vscsi->dev, "0x%llx: parsing SRP descriptor table failed.\n", 2523 srp->tag); 2524 goto fail; 2525 return; Presumably the "goto fail;" is correct and the return is wrong. 2526 } regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html