[SCSI] qla2xxx: use wwn_to_u64() transport helper

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

authored by Andrew Vasquez and committed by James Bottomley f8b02a85 218fba00

+10 -12
+8 -10
drivers/scsi/qla2xxx/qla_attr.c
··· 360 360 struct Scsi_Host *host = dev_to_shost(starget->dev.parent); 361 361 scsi_qla_host_t *ha = to_qla_host(host); 362 362 fc_port_t *fcport; 363 - uint64_t node_name = 0; 363 + u64 node_name = 0; 364 364 365 365 list_for_each_entry(fcport, &ha->fcports, list) { 366 366 if (starget->id == fcport->os_target_id) { 367 - node_name = *(uint64_t *)fcport->node_name; 367 + node_name = wwn_to_u64(fcport->node_name); 368 368 break; 369 369 } 370 370 } 371 371 372 - fc_starget_node_name(starget) = be64_to_cpu(node_name); 372 + fc_starget_node_name(starget) = node_name; 373 373 } 374 374 375 375 static void ··· 378 378 struct Scsi_Host *host = dev_to_shost(starget->dev.parent); 379 379 scsi_qla_host_t *ha = to_qla_host(host); 380 380 fc_port_t *fcport; 381 - uint64_t port_name = 0; 381 + u64 port_name = 0; 382 382 383 383 list_for_each_entry(fcport, &ha->fcports, list) { 384 384 if (starget->id == fcport->os_target_id) { 385 - port_name = *(uint64_t *)fcport->port_name; 385 + port_name = wwn_to_u64(fcport->port_name); 386 386 break; 387 387 } 388 388 } 389 389 390 - fc_starget_port_name(starget) = be64_to_cpu(port_name); 390 + fc_starget_port_name(starget) = port_name; 391 391 } 392 392 393 393 static void ··· 460 460 void 461 461 qla2x00_init_host_attr(scsi_qla_host_t *ha) 462 462 { 463 - fc_host_node_name(ha->host) = 464 - be64_to_cpu(*(uint64_t *)ha->init_cb->node_name); 465 - fc_host_port_name(ha->host) = 466 - be64_to_cpu(*(uint64_t *)ha->init_cb->port_name); 463 + fc_host_node_name(ha->host) = wwn_to_u64(ha->init_cb->node_name); 464 + fc_host_port_name(ha->host) = wwn_to_u64(ha->init_cb->port_name); 467 465 fc_host_supported_classes(ha->host) = FC_COS_CLASS3; 468 466 }
+2 -2
drivers/scsi/qla2xxx/qla_init.c
··· 2066 2066 return; 2067 2067 } 2068 2068 2069 - rport_ids.node_name = be64_to_cpu(*(uint64_t *)fcport->node_name); 2070 - rport_ids.port_name = be64_to_cpu(*(uint64_t *)fcport->port_name); 2069 + rport_ids.node_name = wwn_to_u64(fcport->node_name); 2070 + rport_ids.port_name = wwn_to_u64(fcport->port_name); 2071 2071 rport_ids.port_id = fcport->d_id.b.domain << 16 | 2072 2072 fcport->d_id.b.area << 8 | fcport->d_id.b.al_pa; 2073 2073 rport_ids.roles = FC_RPORT_ROLE_UNKNOWN;