Subject: [PATCH] zfcp: NULL vs 0 usage From: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Get rid of two 'warning: Using plain integer as NULL pointer'. Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Signed-off-by: Swen Schillig <swen@xxxxxxxxxxxx> --- drivers/s390/scsi/zfcp_aux.c | 9 +++------ drivers/s390/scsi/zfcp_fsf.c | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff -urpN linux-2.6/drivers/s390/scsi/zfcp_aux.c linux-2.6-patched/drivers/s390/scsi/zfcp_aux.c --- linux-2.6/drivers/s390/scsi/zfcp_aux.c 2007-07-18 10:27:48.000000000 +0200 +++ linux-2.6-patched/drivers/s390/scsi/zfcp_aux.c 2007-07-18 10:28:25.000000000 +0200 @@ -1526,15 +1526,12 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gi * zfcp_gid_pn_buffers_free - free buffers for GID_PN nameserver request * @gid_pn: pointer to struct zfcp_gid_pn_data which has to be freed */ -static void -zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn) +static void zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn) { - if ((gid_pn->ct.pool != 0)) + if (gid_pn->ct.pool) mempool_free(gid_pn, gid_pn->ct.pool); else - kfree(gid_pn); - - return; + kfree(gid_pn); } /** diff -urpN linux-2.6/drivers/s390/scsi/zfcp_fsf.c linux-2.6-patched/drivers/s390/scsi/zfcp_fsf.c --- linux-2.6/drivers/s390/scsi/zfcp_fsf.c 2007-07-09 01:32:17.000000000 +0200 +++ linux-2.6-patched/drivers/s390/scsi/zfcp_fsf.c 2007-07-18 10:28:25.000000000 +0200 @@ -1930,7 +1930,7 @@ static int zfcp_fsf_send_els_handler(str skip_fsfstatus: send_els->status = retval; - if (send_els->handler != 0) + if (send_els->handler) send_els->handler(send_els->handler_data); return retval; - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html