> -----Original Message----- > From: linux-crypto-owner@xxxxxxxxxxxxxxx [mailto:linux-crypto-owner@xxxxxxxxxxxxxxx] On Behalf Of Shukun Tan > Sent: Friday, May 8, 2020 6:58 PM > To: herbert@xxxxxxxxxxxxxxxxxxx; davem@xxxxxxxxxxxxx > Cc: linux-crypto@xxxxxxxxxxxxxxx; Xu Zaibo <xuzaibo@xxxxxxxxxx>; Wangzhou (B) <wangzhou1@xxxxxxxxxxxxx> > Subject: [PATCH 13/13] crypto: hisilicon/zip - Make negative compression not an error > From: Zhou Wang <wangzhou1@xxxxxxxxxxxxx> > 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@xxxxxxxxxxxxx> > Signed-off-by: Shukun Tan <tanshukun1@xxxxxxxxxx> > --- > 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