Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp708679ybn; Wed, 2 Oct 2019 05:05:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqysr7UiRzTXt3xdX7pDad+ITCpVutXIT+FkCVfctQ0dyuy1OI6HpFLdaR68thLWXzxZgyVz X-Received: by 2002:a50:ce53:: with SMTP id k19mr3372415edj.2.1570017902007; Wed, 02 Oct 2019 05:05:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570017902; cv=none; d=google.com; s=arc-20160816; b=Y2efN0DAzTUpyfbhIyKdtOjbhcfJVKHzEef9eZuUBRGr5JGoQNsoDWfkBbiN/yVi3L JT2R3NolvB+E/brA4b9h+rnnpViAkjufcXwnngrqBJS12PR3n/xL3ftMPU5X8gZZhDKS S8mS81zsVk9hFQhrto7lbDjlODZYtuxzE0kACLeEy521GuCro0ryzjav25658JWD5D0g woOp0uzZuyi/UWzO/zRg6o2b69DPS9kGZLKSbcCJeKnaHh+SSAYqs6YK6ivB3uAybqQH lx6Dwwn/OwUH/fG2J8H3GnKK3UfbrE8ukWW+3p94XOD0AWYKpN1MWsubZyPO0GCRVmq0 oamA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=UXFe3Cdoh6neghhn+MaZ0YaGkgSW9dDmYFd/u2oSM9o=; b=f6vRy5uxvmpSCb+C3qh3aMabHzcQ1/TPRGglP9l79vjAEBcOZIcIb1DMobTH4/nyNE Oxo5liM43YFLfSl3k/nw+MxUU1fX2hH5P/BT0wmJMt6eDV4CgEJQCn57+X26emoWJxF0 artJrqm//eKasJbUr/zotwJ7hJLhs3BxF5ADNgq/y3A8PieK+ojxfIiW4lG8EsulYttz Xn3ik5+uuXISwdBUevxCmr2lJiTm7Ri/H5TpBQrssAXLtDLh1Z6Ocv6n6syR+BfY+X8m xc0WweD1FLL7yl4nT839ct61ieowNavlyVYTdUA0cfWWF77wqerzRQjQ5CAiSryHzeq2 qTiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=e5cqkXTy; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34si12452237edb.439.2019.10.02.05.04.26; Wed, 02 Oct 2019 05:05:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@benyossef-com.20150623.gappssmtp.com header.s=20150623 header.b=e5cqkXTy; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726354AbfJBKAi (ORCPT + 99 others); Wed, 2 Oct 2019 06:00:38 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:44185 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbfJBKAi (ORCPT ); Wed, 2 Oct 2019 06:00:38 -0400 Received: by mail-vs1-f65.google.com with SMTP id w195so11478194vsw.11 for ; Wed, 02 Oct 2019 03:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benyossef-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=UXFe3Cdoh6neghhn+MaZ0YaGkgSW9dDmYFd/u2oSM9o=; b=e5cqkXTyMS2bK7Z38fZlO5AIT94/EzGYk5po2nVuHCrMMSJIGppW440+lxjrj/+9fD 8eSwhvtZGr11SEcSiR9LqIEGzIZ1EQoPfve0QDZnkELNphBIeMgHkh4qU7gZDu49WhOU TIgWLufpoIl1OJDIVSg9NcwMN4Xqvo4cFVzYQ1Y71rsxATvUfQyLr9xJTQHeNA0ipZzo e1WCi0zG925kcQkSMrh+5mZFtLWQys/GspiMztPfUpnmi0Y6AWiR7uVbTT2ZLSdHcxu6 DbixfGa8X/fuAIFDeUWb6d+yvzttJEfjMTfFs09gEFAHT1MZhACiTiZs7wruwgs74LbX RfUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UXFe3Cdoh6neghhn+MaZ0YaGkgSW9dDmYFd/u2oSM9o=; b=U0H0YnyUDDfzvKqfUhI9GkE4/ZYDBmZnYi20ltx6MViB9vj1pkXN4D+imLf6cNoyn3 VSJYAtazjmAzhtlUu4dhRuX4q7EYzMsKEE52bVA2I+8vOj6ST0yQbZdAbi+2ZkBohgBP 2LN/Pivjf+tu5c3CCk4aSLfwvzbqKiN6p3W/XWcUWzVJweTLcffW4VfOkGV+BoDbq+Df cZYtjJV/jGSqRdwIP++5wxdEETxv7yIccj5sElOqqMFSRSri+2GzLDOTDooZFJ1c7AWv xXeBmHAgxffqzZbomgh98uNKk0g76sKiuTblujKXmUmqLDfDFbW9fAwSUrPIN1YIbHfE NWpA== X-Gm-Message-State: APjAAAUdnbO8MJJlCuJuF2j5wYu84oTuy+YbdK4iXjrwbjE3oZoUQWja nzbBbDImOAvA+JkDgjhgyAxJQhNdZ2zpSrDRZRAPdw== X-Received: by 2002:a67:ef5d:: with SMTP id k29mr1247634vsr.11.1570010437288; Wed, 02 Oct 2019 03:00:37 -0700 (PDT) MIME-Version: 1.0 References: <1569833361-47224-1-git-send-email-tiantao6@huawei.com> In-Reply-To: <1569833361-47224-1-git-send-email-tiantao6@huawei.com> From: Gilad Ben-Yossef Date: Wed, 2 Oct 2019 13:00:25 +0300 Message-ID: Subject: Re: [PATCH] crypto: fix comparison of unsigned expression warnings To: Tian Tao Cc: Herbert Xu , David Miller , Linux Crypto Mailing List , linuxarm@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi, On Mon, Sep 30, 2019 at 11:52 AM Tian Tao wrote: > > This patch fixes the following warnings: > drivers/crypto/ccree/cc_aead.c:630:5-12: WARNING: Unsigned expression > compared with zero: seq_len > 0 > Thanks for the report! Can you please share which compiler/arch/config you use that produces this warning? I'm not seeing it on my end. Many thanks, Gilad > Signed-off-by: Tian Tao > --- > drivers/crypto/ccree/cc_aead.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/crypto/ccree/cc_aead.c b/drivers/crypto/ccree/cc_aea= d.c > index d3e8faa..b19291d 100644 > --- a/drivers/crypto/ccree/cc_aead.c > +++ b/drivers/crypto/ccree/cc_aead.c > @@ -546,7 +546,7 @@ static int cc_aead_setkey(struct crypto_aead *tfm, co= nst u8 *key, > struct cc_aead_ctx *ctx =3D crypto_aead_ctx(tfm); > struct cc_crypto_req cc_req =3D {}; > struct cc_hw_desc desc[MAX_AEAD_SETKEY_SEQ]; > - unsigned int seq_len =3D 0; > + int seq_len =3D 0; > struct device *dev =3D drvdata_to_dev(ctx->drvdata); > const u8 *enckey, *authkey; > int rc; > -- > 2.7.4 > --=20 Gilad Ben-Yossef Chief Coffee Drinker values of =CE=B2 will give rise to dom!