From 25520184a445976dae5c74cb2b8992fbcf0f99dc Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Fri, 17 Sep 2010 04:00:15 +0000 Subject: [PATCH] A small coding style fix, plus a specifier fix in an ifdef block. The coding style fix conforms to the kernel coding standard and uses if (!xxx) rather than if (NULL == xxx). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2138 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst_local/scst_local.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 7fcd2ab28..76d75bd6c 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -934,7 +934,7 @@ static int scst_local_queuecommand(struct scsi_cmnd *SCpnt, */ tgt_specific = kmem_cache_alloc(tgt_specific_pool, GFP_ATOMIC); if (!tgt_specific) { - PRINT_ERROR("Unable to create tgt_specific (size %d)", + PRINT_ERROR("Unable to create tgt_specific (size %zd)", sizeof(*tgt_specific)); return -ENOMEM; } @@ -1390,7 +1390,7 @@ static int scst_local_driver_probe(struct device *dev) TRACE_DBG("sess %p", sess); hpnt = scsi_host_alloc(&scst_lcl_ini_driver_template, sizeof(*sess)); - if (NULL == hpnt) { + if (!hpnt) { PRINT_ERROR("%s", "scsi_register() failed"); ret = -ENODEV; goto out; @@ -1528,7 +1528,7 @@ static int __scst_local_add_adapter(struct scst_local_tgt *tgt, TRACE_ENTRY(); sess = kzalloc(sizeof(*sess), GFP_KERNEL); - if (NULL == sess) { + if (!sess) { PRINT_ERROR("Unable to alloc scst_lcl_host (size %zd)", sizeof(*sess)); res = -ENOMEM; @@ -1641,7 +1641,7 @@ static int scst_local_add_target(const char *target_name, TRACE_ENTRY(); tgt = kzalloc(sizeof(*tgt), GFP_KERNEL); - if (NULL == tgt) { + if (!tgt) { PRINT_ERROR("Unable to alloc tgt (size %zd)", sizeof(*tgt)); res = -ENOMEM; goto out;