Message ID | 1612319190-111421-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | scsi: qla2xxx: Simplify the calculation of variables | expand |
> On Feb 2, 2021, at 8:26 PM, Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote: > > Fix the following coccicheck warnings: > > ./drivers/scsi/qla2xxx/qla_target.c:984:12-14: WARNING !A || A && B is > equivalent to !A || B. > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> > --- > drivers/scsi/qla2xxx/qla_target.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c > index 0d09480..c48daf5 100644 > --- a/drivers/scsi/qla2xxx/qla_target.c > +++ b/drivers/scsi/qla2xxx/qla_target.c > @@ -981,8 +981,7 @@ void qlt_free_session_done(struct work_struct *work) > int rc; > > if (!own || > - (own && > - (own->iocb.u.isp24.status_subcode == ELS_PLOGI))) { > + (own->iocb.u.isp24.status_subcode == ELS_PLOGI)) { > rc = qla2x00_post_async_logout_work(vha, sess, > NULL); > if (rc != QLA_SUCCESS) > -- > 1.8.3.1 > Looks Good. Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> -- Himanshu Madhani Oracle Linux Engineering
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 0d09480..c48daf5 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -981,8 +981,7 @@ void qlt_free_session_done(struct work_struct *work) int rc; if (!own || - (own && - (own->iocb.u.isp24.status_subcode == ELS_PLOGI))) { + (own->iocb.u.isp24.status_subcode == ELS_PLOGI)) { rc = qla2x00_post_async_logout_work(vha, sess, NULL); if (rc != QLA_SUCCESS)
Fix the following coccicheck warnings: ./drivers/scsi/qla2xxx/qla_target.c:984:12-14: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- drivers/scsi/qla2xxx/qla_target.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)