devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, kbuild-all@lists.01.org,
	catalin.marinas@arm.com, davem@davemloft.net,
	herbert@gondor.apana.org.au, linux@armlinux.org.uk,
	mark.rutland@arm.com, mripard@kernel.org, robh+dt@kernel.org,
	wens@csie.org, will@kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sunxi@googlegroups.com
Subject: Re: [PATCH v4 02/11] crypto: Add Allwinner sun8i-ce Crypto Engine
Date: Tue, 22 Oct 2019 15:22:12 +0200	[thread overview]
Message-ID: <20191022132212.GA28813@Red> (raw)
In-Reply-To: <20191022092312.GC10833@kadam>

On Tue, Oct 22, 2019 at 12:23:12PM +0300, Dan Carpenter wrote:
> Hi Corentin,
> 
> url:    https://github.com/0day-ci/linux/commits/Corentin-Labbe/crypto-add-sun8i-ce-driver-for-Allwinner-crypto-engine/20191014-104401
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> smatch warnings:
> drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c:371 sun8i_ce_allocate_chanlist() error: uninitialized symbol 'err'.
> 
> # https://github.com/0day-ci/linux/commit/f113059e7b4f94c545994aeafdc809a3e4907ae4
> git remote add linux-review https://github.com/0day-ci/linux
> git remote update linux-review
> git checkout f113059e7b4f94c545994aeafdc809a3e4907ae4
> vim +/err +371 drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c
> 
> f113059e7b4f94 Corentin Labbe 2019-10-12  334  static int sun8i_ce_allocate_chanlist(struct sun8i_ce_dev *ce)
> f113059e7b4f94 Corentin Labbe 2019-10-12  335  {
> f113059e7b4f94 Corentin Labbe 2019-10-12  336  	int i, err;
> f113059e7b4f94 Corentin Labbe 2019-10-12  337  
> f113059e7b4f94 Corentin Labbe 2019-10-12  338  	ce->chanlist = devm_kcalloc(ce->dev, MAXFLOW,
> f113059e7b4f94 Corentin Labbe 2019-10-12  339  				    sizeof(struct sun8i_ce_flow), GFP_KERNEL);
> f113059e7b4f94 Corentin Labbe 2019-10-12  340  	if (!ce->chanlist)
> f113059e7b4f94 Corentin Labbe 2019-10-12  341  		return -ENOMEM;
> f113059e7b4f94 Corentin Labbe 2019-10-12  342  
> f113059e7b4f94 Corentin Labbe 2019-10-12  343  	for (i = 0; i < MAXFLOW; i++) {
> f113059e7b4f94 Corentin Labbe 2019-10-12  344  		init_completion(&ce->chanlist[i].complete);
> f113059e7b4f94 Corentin Labbe 2019-10-12  345  
> f113059e7b4f94 Corentin Labbe 2019-10-12  346  		ce->chanlist[i].engine = crypto_engine_alloc_init(ce->dev, true);
> f113059e7b4f94 Corentin Labbe 2019-10-12  347  		if (!ce->chanlist[i].engine) {
> f113059e7b4f94 Corentin Labbe 2019-10-12  348  			dev_err(ce->dev, "Cannot allocate engine\n");
> f113059e7b4f94 Corentin Labbe 2019-10-12  349  			i--;
> f113059e7b4f94 Corentin Labbe 2019-10-12  350  			goto error_engine;
> 
> err = -ENOMEM;
> 
> f113059e7b4f94 Corentin Labbe 2019-10-12  351  		}
> f113059e7b4f94 Corentin Labbe 2019-10-12  352  		err = crypto_engine_start(ce->chanlist[i].engine);
> f113059e7b4f94 Corentin Labbe 2019-10-12  353  		if (err) {
> f113059e7b4f94 Corentin Labbe 2019-10-12  354  			dev_err(ce->dev, "Cannot start engine\n");
> f113059e7b4f94 Corentin Labbe 2019-10-12  355  			goto error_engine;
> f113059e7b4f94 Corentin Labbe 2019-10-12  356  		}
> f113059e7b4f94 Corentin Labbe 2019-10-12  357  		ce->chanlist[i].tl = dma_alloc_coherent(ce->dev,
> f113059e7b4f94 Corentin Labbe 2019-10-12  358  							sizeof(struct ce_task),
> f113059e7b4f94 Corentin Labbe 2019-10-12  359  							&ce->chanlist[i].t_phy,
> f113059e7b4f94 Corentin Labbe 2019-10-12  360  							GFP_KERNEL);
> f113059e7b4f94 Corentin Labbe 2019-10-12  361  		if (!ce->chanlist[i].tl) {
> f113059e7b4f94 Corentin Labbe 2019-10-12  362  			dev_err(ce->dev, "Cannot get DMA memory for task %d\n",
> f113059e7b4f94 Corentin Labbe 2019-10-12  363  				i);
> f113059e7b4f94 Corentin Labbe 2019-10-12  364  			err = -ENOMEM;
> f113059e7b4f94 Corentin Labbe 2019-10-12  365  			goto error_engine;
> f113059e7b4f94 Corentin Labbe 2019-10-12  366  		}
> f113059e7b4f94 Corentin Labbe 2019-10-12  367  	}
> f113059e7b4f94 Corentin Labbe 2019-10-12  368  	return 0;
> f113059e7b4f94 Corentin Labbe 2019-10-12  369  error_engine:
> f113059e7b4f94 Corentin Labbe 2019-10-12  370  	sun8i_ce_free_chanlist(ce, i);
> f113059e7b4f94 Corentin Labbe 2019-10-12 @371  	return err;
> f113059e7b4f94 Corentin Labbe 2019-10-12  372  }
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

fixed.

Thanks

  reply	other threads:[~2019-10-22 13:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12 18:48 [PATCH v4 00/11] crypto: add sun8i-ce driver for Allwinner crypto engine Corentin Labbe
     [not found] ` <20191012184852.28329-1-clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-10-12 18:48   ` [PATCH v4 01/11] crypto: Add allwinner subdirectory Corentin Labbe
2019-10-12 18:48   ` [PATCH v4 02/11] crypto: Add Allwinner sun8i-ce Crypto Engine Corentin Labbe
2019-10-14 16:32     ` kbuild test robot
2019-10-14 16:32     ` [RFC PATCH] crypto: sun8i_ce_pm_ops can be static kbuild test robot
2019-10-22  9:23     ` [PATCH v4 02/11] crypto: Add Allwinner sun8i-ce Crypto Engine Dan Carpenter
2019-10-22 13:22       ` Corentin Labbe [this message]
2019-10-12 18:48   ` [PATCH v4 03/11] dt-bindings: crypto: Add DT bindings documentation for " Corentin Labbe
2019-10-12 18:48   ` [PATCH v4 04/11] ARM: dts: sun8i: R40: add crypto engine node Corentin Labbe
2019-10-12 18:48   ` [PATCH v4 05/11] ARM: dts: sun8i: H3: Add Crypto Engine node Corentin Labbe
2019-10-12 18:48   ` [PATCH v4 06/11] ARM64: dts: allwinner: sun50i: Add Crypto Engine node on A64 Corentin Labbe
2019-10-12 18:48   ` [PATCH v4 07/11] ARM64: dts: allwinner: sun50i: Add crypto engine node on H5 Corentin Labbe
2019-10-12 18:48   ` [PATCH v4 08/11] ARM64: dts: allwinner: sun50i: Add Crypto Engine node on H6 Corentin Labbe
2019-10-12 18:48   ` [PATCH v4 11/11] crypto: sun4i-ss: Move to Allwinner directory Corentin Labbe
2019-10-12 18:48 ` [PATCH v4 09/11] sunxi_defconfig: add new Allwinner crypto options Corentin Labbe
2019-10-12 18:48 ` [PATCH v4 10/11] arm64: defconfig: " Corentin Labbe
2019-10-14 10:47 ` [PATCH v4 00/11] crypto: add sun8i-ce driver for Allwinner crypto engine Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191022132212.GA28813@Red \
    --to=clabbe.montjoie@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).