On Tue, 8 May 2012 19:21:57 -0700, Nicholas A. Bellinger wrote: > > Btw, this did not apply after the recent qla2xxx target checkpatch > cleanups within lio-core.git, so I've applied it up by hand and folding > into for-next-merge. I noticed the same and respun my patches, only to find this mail... Guess I don't have to resend anymore. However, I also have the additional patch below. Jörn -- More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity. -- W. A. Wulf [PATCH 3/3] target: use WWN_SIZE instead of hard-coded constants Signed-off-by: Joern Engel <joern@xxxxxxxxx> --- drivers/scsi/qla2xxx/qla_target.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 2baef81..92bc33d 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -4381,17 +4381,17 @@ static void qlt_lport_dump(struct scsi_qla_host *vha, u64 wwpn, int i; pr_debug("qla2xxx HW vha->node_name: "); - for (i = 0; i < 8; i++) + for (i = 0; i < WWN_SIZE; i++) pr_debug("%02x ", vha->node_name[i]); pr_debug("\n"); pr_debug("qla2xxx HW vha->port_name: "); - for (i = 0; i < 8; i++) + for (i = 0; i < WWN_SIZE; i++) pr_debug("%02x ", vha->port_name[i]); pr_debug("\n"); pr_debug("qla2xxx passed configfs WWPN: "); put_unaligned_be64(wwpn, b); - for (i = 0; i < 8; i++) + for (i = 0; i < WWN_SIZE; i++) pr_debug("%02x ", b[i]); pr_debug("\n"); } @@ -4413,7 +4413,7 @@ int qlt_lport_register(struct qla_tgt_func_tmpl *qla_tgt_ops, u64 wwpn, struct Scsi_Host *host; unsigned long flags; int rc; - u8 b[8]; + u8 b[WWN_SIZE]; mutex_lock(&qla_tgt_mutex); list_for_each_entry(tgt, &qla_tgt_glist, tgt_list_entry) { @@ -4447,7 +4447,7 @@ int qlt_lport_register(struct qla_tgt_func_tmpl *qla_tgt_ops, u64 wwpn, } qlt_lport_dump(vha, wwpn, b); - if (memcmp(vha->port_name, b, 8)) { + if (memcmp(vha->port_name, b, WWN_SIZE)) { scsi_host_put(host); continue; } -- 1.7.10 -- 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