From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasu Dev Date: Thu, 25 Jun 2015 17:44:25 +0000 Subject: Re: [PATCH] SCSI-libfc: Delete an unnecessary check before the function call "fc_fcp_ddp_done" Message-Id: <1435254265.20022.0.camel@lin-nd1-054.jf.intel.com> List-Id: References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <546E3DDB.5040508@users.sourceforge.net> <558AD2D0.6000501@users.sourceforge.net> In-Reply-To: <558AD2D0.6000501-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: SF Markus Elfring Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML , "James E. J. Bottomley" , Julia Lawall , fcoe-devel-s9riP+hp16TNLxjTenLetw@public.gmane.org On Wed, 2015-06-24 at 17:54 +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 24 Jun 2015 17:50:32 +0200 > > The fc_fcp_ddp_done() function tests whether its argument is NULL and then > returns immediately. Thus the test around the call is not needed. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring > --- > drivers/scsi/libfc/fc_exch.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c > index 1b3a094..aad6f48 100644 > --- a/drivers/scsi/libfc/fc_exch.c > +++ b/drivers/scsi/libfc/fc_exch.c > @@ -2120,8 +2120,7 @@ static struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, > spin_unlock_bh(&ep->ex_lock); > return sp; > err: > - if (fsp) > - fc_fcp_ddp_done(fsp); > + fc_fcp_ddp_done(fsp); > rc = fc_exch_done_locked(ep); > spin_unlock_bh(&ep->ex_lock); > if (!rc) Looks good. Acked-by: Vasu Dev