re: cxgb4: Add routines to create and remove listening IPv6 servers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Vipul Pandya,

The patch 80f40c1f7a72: "cxgb4: Add routines to create and remove
listening IPv6 servers" from Jul 4, 2013, leads to the following
static checker warning:

	drivers/target/iscsi/cxgbit/cxgbit_cm.c:419 cxgbit_free_np()
	warn: 'ret' can be either negative or positive

drivers/target/iscsi/cxgbit/cxgbit_cm.c
   382  
   383                  cxgbit_get_cnp(cnp);
   384                  cxgbit_init_wr_wait(&cnp->com.wr_wait);
   385                  ret = cxgb4_remove_server(cdev->lldi.ports[0], stid,
   386                                            cdev->lldi.rxq_ids[0], ipv6);

It's complaining because normally kernel function return negative error
codes but cxgb4_remove_server() returns NET_XMIT_DROP (1) for some
errors.

It's harmless in this case other than the static checker warning.  There
is no comment why we return 1 for some errors.

   387                  if (ret) {
   388                          cxgbit_put_cnp(cnp);
   389                          continue;
   390                  }
   391  
   392                  ret = cxgbit_wait_for_reply(cdev, &cnp->com.wr_wait,
   393                                              0, 10, __func__);
   394  
   395                  if (ret == -ETIMEDOUT)
   396                          continue;
   397  

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



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux