Message ID | 1588921068-20739-14-git-send-email-tanshukun1@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Herbert Xu |
Headers | show |
Series | [01/13] crypto: hisilicon/sec2 - modify the SEC probe process | expand |
> -----Original Message----- > From: linux-crypto-owner@vger.kernel.org [mailto:linux-crypto-owner@vger.kernel.org] On Behalf Of Shukun Tan > Sent: Friday, May 8, 2020 6:58 PM > To: herbert@gondor.apana.org.au; davem@davemloft.net > Cc: linux-crypto@vger.kernel.org; Xu Zaibo <xuzaibo@huawei.com>; Wangzhou (B) <wangzhou1@hisilicon.com> > Subject: [PATCH 13/13] crypto: hisilicon/zip - Make negative compression not an error > From: Zhou Wang <wangzhou1@hisilicon.com> > Users can decide whether to use negative compression result, so it should not be reported as an error by driver. > Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com> > Signed-off-by: Shukun Tan <tanshukun1@huawei.com> > --- > drivers/crypto/hisilicon/zip/zip_crypto.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drivers/crypto/hisilicon/zip/zip_crypto.c > index 5fb9d4b..0f158d4 100644 > --- a/drivers/crypto/hisilicon/zip/zip_crypto.c > +++ b/drivers/crypto/hisilicon/zip/zip_crypto.c @@ -341,7 +341,7 @@ static void hisi_zip_acomp_cb(struct hisi_qp *qp, void *data) > status = sqe->dw3 & HZIP_BD_STATUS_M; > - if (status != 0 && status != HZIP_NC_ERR) { > + if (status != 0) { Hi Zhou, it seems your comment is saying we won't report errors for some cases. But the code seems to report more errors by removing the "&&" as the condition becomes weaker. Anything have I lost? > dev_err(dev, "%scompress fail in qp%u: %u, output: %u\n", > (qp->alg_type == 0) ? "" : "de", qp->qp_id, status, > sqe->produced); Best Regards Barry
On 2020/5/9 11:25, Song Bao Hua wrote: >> -----Original Message----- >> From: linux-crypto-owner@vger.kernel.org [mailto:linux-crypto-owner@vger.kernel.org] On Behalf Of Shukun Tan >> Sent: Friday, May 8, 2020 6:58 PM >> To: herbert@gondor.apana.org.au; davem@davemloft.net >> Cc: linux-crypto@vger.kernel.org; Xu Zaibo <xuzaibo@huawei.com>; Wangzhou (B) <wangzhou1@hisilicon.com> >> Subject: [PATCH 13/13] crypto: hisilicon/zip - Make negative compression not an error > >> From: Zhou Wang <wangzhou1@hisilicon.com> > >> Users can decide whether to use negative compression result, so it should not be reported as an error by driver. > >> Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com> >> Signed-off-by: Shukun Tan <tanshukun1@huawei.com> >> --- >> drivers/crypto/hisilicon/zip/zip_crypto.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drivers/crypto/hisilicon/zip/zip_crypto.c >> index 5fb9d4b..0f158d4 100644 >> --- a/drivers/crypto/hisilicon/zip/zip_crypto.c >> +++ b/drivers/crypto/hisilicon/zip/zip_crypto.c > @@ -341,7 +341,7 @@ static void hisi_zip_acomp_cb(struct hisi_qp *qp, void *data) > >> status = sqe->dw3 & HZIP_BD_STATUS_M; > >> - if (status != 0 && status != HZIP_NC_ERR) { >> + if (status != 0) { > > Hi Zhou, it seems your comment is saying we won't report errors for some cases. But the code seems to report more errors by removing the "&&" as the condition becomes weaker. > Anything have I lost? My bad here. We already did this in driver. Please drop this patch. Best, Zhou > >> dev_err(dev, "%scompress fail in qp%u: %u, output: %u\n", >> (qp->alg_type == 0) ? "" : "de", qp->qp_id, status, >> sqe->produced); > > Best Regards > Barry > > . >
diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drivers/crypto/hisilicon/zip/zip_crypto.c index 5fb9d4b..0f158d4 100644 --- a/drivers/crypto/hisilicon/zip/zip_crypto.c +++ b/drivers/crypto/hisilicon/zip/zip_crypto.c @@ -341,7 +341,7 @@ static void hisi_zip_acomp_cb(struct hisi_qp *qp, void *data) status = sqe->dw3 & HZIP_BD_STATUS_M; - if (status != 0 && status != HZIP_NC_ERR) { + if (status != 0) { dev_err(dev, "%scompress fail in qp%u: %u, output: %u\n", (qp->alg_type == 0) ? "" : "de", qp->qp_id, status, sqe->produced);