* [patch] [SCSI] pm80xx: remove unneeded NULL check [not found] <518b863d.vBepQb4eXhQYEt/W%fengguang.wu@intel.com> @ 2013-05-09 12:48 ` Dan Carpenter 2013-05-09 12:51 ` Anand Kumar Santhanam 0 siblings, 1 reply; 2+ messages in thread From: Dan Carpenter @ 2013-05-09 12:48 UTC (permalink / raw) To: xjtuwjp, Anand Kumar S Cc: lindar_liu, James E.J. Bottomley, linux-scsi, kernel-janitors, dan.carpenter Coccinelle complains about the inconsistent NULL checking on "t". It turns out the check isn't needed because we verified that "t" is non-NULL at the start of the function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 69dd49c..683df42 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -3740,7 +3740,7 @@ int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb) pm8001_ccb_task_free(pm8001_ha, t, ccb, tag); mb(); - if ((pm8001_dev->id & NCQ_ABORT_ALL_FLAG) && t) { + if (pm8001_dev->id & NCQ_ABORT_ALL_FLAG) { pm8001_tag_free(pm8001_ha, tag); sas_free_task(t); /* clear the flag */ ^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [patch] [SCSI] pm80xx: remove unneeded NULL check 2013-05-09 12:48 ` [patch] [SCSI] pm80xx: remove unneeded NULL check Dan Carpenter @ 2013-05-09 12:51 ` Anand Kumar Santhanam 0 siblings, 0 replies; 2+ messages in thread From: Anand Kumar Santhanam @ 2013-05-09 12:51 UTC (permalink / raw) To: Dan Carpenter, xjtuwjp Cc: lindar_liu, James E.J. Bottomley, linux-scsi, kernel-janitors Hi Dan, Yes. I agree with your comment. Acked-by: anandkumar_santhanam@pmcs.com Regards Anand -----Original Message----- From: Dan Carpenter [mailto:dan.carpenter@oracle.com] Sent: Thursday, May 09, 2013 6:18 PM To: xjtuwjp@gmail.com; Anand Kumar Santhanam Cc: lindar_liu@usish.com; James E.J. Bottomley; linux-scsi@vger.kernel.org; kernel-janitors@vger.kernel.org; dan.carpenter@oracle.com Subject: [patch] [SCSI] pm80xx: remove unneeded NULL check Coccinelle complains about the inconsistent NULL checking on "t". It turns out the check isn't needed because we verified that "t" is non-NULL at the start of the function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c index 69dd49c..683df42 100644 --- a/drivers/scsi/pm8001/pm8001_hwi.c +++ b/drivers/scsi/pm8001/pm8001_hwi.c @@ -3740,7 +3740,7 @@ int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb) pm8001_ccb_task_free(pm8001_ha, t, ccb, tag); mb(); - if ((pm8001_dev->id & NCQ_ABORT_ALL_FLAG) && t) { + if (pm8001_dev->id & NCQ_ABORT_ALL_FLAG) { pm8001_tag_free(pm8001_ha, tag); sas_free_task(t); /* clear the flag */ ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-09 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <518b863d.vBepQb4eXhQYEt/W%fengguang.wu@intel.com>
2013-05-09 12:48 ` [patch] [SCSI] pm80xx: remove unneeded NULL check Dan Carpenter
2013-05-09 12:51 ` Anand Kumar Santhanam
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox