From: Herbert Xu Subject: Re: [cryptodev:master 2/13] lib/crc-t10dif.c:42:1-3: WARNING: PTR_RET can be used Date: Wed, 5 Jun 2013 16:28:30 +0800 Message-ID: <20130605082830.GA12148@gondor.apana.org.au> References: <519a1d39.jkEF83C5OnyeB2uq%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Tim Chen , kbuild-all@01.org, Linux Crypto Mailing List To: kbuild test robot Return-path: Received: from ringil.hengli.com.au ([178.18.16.133]:58595 "EHLO fornost.hengli.com.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752370Ab3FEI2i (ORCPT ); Wed, 5 Jun 2013 04:28:38 -0400 Content-Disposition: inline In-Reply-To: <519a1d39.jkEF83C5OnyeB2uq%fengguang.wu@intel.com> Sender: linux-crypto-owner@vger.kernel.org List-ID: On Mon, May 20, 2013 at 08:55:21PM +0800, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master > head: 52188b6c27199e9b8fca6f7753464137a042efa1 > commit: 2d31e518a42828df7877bca23a958627d60408bc [2/13] crypto: crct10dif - Wrap crc_t10dif function all to use crypto transform framework > > > coccinelle warnings: (new ones prefixed by >>) > > >> lib/crc-t10dif.c:42:1-3: WARNING: PTR_RET can be used > > Please consider folding the attached diff :-) > > --- > 0-DAY kernel build testing backend Open Source Technology Center > http://lists.01.org/mailman/listinfo/kbuild Intel Corporation > [PATCH] crypto: fix coccinelle warnings > TO: Herbert Xu > CC: Tim Chen > CC: linux-kernel@vger.kernel.org > > lib/crc-t10dif.c:42:1-3: WARNING: PTR_RET can be used > > > Use PTR_RET rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: coccinelle/api/ptr_ret.cocci > > Reported-by: Fengguang Wu > --- > > cocci-output-56141-45a4f6-crc-t10dif.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > --- a/lib/crc-t10dif.c > +++ b/lib/crc-t10dif.c > @@ -39,9 +39,7 @@ EXPORT_SYMBOL(crc_t10dif); > static int __init crc_t10dif_mod_init(void) > { > crct10dif_tfm = crypto_alloc_shash("crct10dif", 0, 0); > - if (IS_ERR(crct10dif_tfm)) > - return PTR_ERR(crct10dif_tfm); > - return 0; > + return PTR_RET(crct10dif_tfm); > } > > static void __exit crc_t10dif_mod_fini(void) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt