From 9e2871daee24c787e5f45326dac2e465ac39583c Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Wed, 13 Aug 2008 07:19:38 -0500 Subject: [PATCH 10/23] libfc: remove fc_fcp_pkt_free Merge fc_fcp_pkt_free and fc_fcp_pkt_release because fc_fcp_pkt_release just called fc_fcp_pkt_free. Signed-off-by: Mike Christie --- drivers/scsi/libfc/fc_fcp.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 9bb0ed4..51064ad 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -207,14 +207,14 @@ static struct fc_fcp_pkt *fc_fcp_pkt_alloc(struct fc_lport *lp) } /** - * fc_fcp_pkt_free - free routine for scsi_pkt packet + * fc_fcp_pkt_release - release hold on scsi_pkt packet * @sp: fcp packet struct * * This is used by upper layer scsi driver. * Context : call from process and interrupt context. * no locking required */ -static void fc_fcp_pkt_free(struct fc_fcp_pkt *sp) +static void fc_fcp_pkt_release(struct fc_fcp_pkt *sp) { if (atomic_dec_and_test(&sp->ref_cnt)) { struct fc_fcp_internal *si = fc_get_scsi_internal(sp->lp); @@ -228,11 +228,6 @@ static void fc_fcp_pkt_hold(struct fc_fcp_pkt *sp) atomic_inc(&sp->ref_cnt); } -static void fc_fcp_pkt_release(struct fc_fcp_pkt *sp) -{ - fc_fcp_pkt_free(sp); -} - /** * fc_fcp_lock_pkt - lock a packet and get a ref to it. * @fsp: fcp packet @@ -1799,7 +1794,7 @@ int fc_queuecommand(struct scsi_cmnd *sc_cmd, void (*done)(struct scsi_cmnd *)) rval = fc_fcp_pkt_send(lp, sp); if (rval != 0) { sp->state = FC_SRB_FREE; - fc_fcp_pkt_free(sp); + fc_fcp_pkt_release(sp); rc = SCSI_MLQUEUE_HOST_BUSY; } out: @@ -2021,7 +2016,7 @@ int fc_eh_device_reset(struct scsi_cmnd *sc_cmd) */ rc = fc_lun_reset(lp, sp, scmd_id(sc_cmd), sc_cmd->device->lun); sp->state = FC_SRB_FREE; - fc_fcp_pkt_free(sp); + fc_fcp_pkt_release(sp); out: return rc; -- 1.5.4.1