From patchwork Sat Mar 30 13:09:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 10878477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66C931708 for ; Sat, 30 Mar 2019 13:10:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DE3028A00 for ; Sat, 30 Mar 2019 13:10:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F0AA28A09; Sat, 30 Mar 2019 13:10:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C192A28A00 for ; Sat, 30 Mar 2019 13:09:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 56ED46E149; Sat, 30 Mar 2019 13:09:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3F726E149 for ; Sat, 30 Mar 2019 13:09:56 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Mar 2019 06:09:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,288,1549958400"; d="scan'208";a="145172368" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by FMSMGA003.fm.intel.com with ESMTP; 30 Mar 2019 06:09:53 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1hADk9-000HRM-8Q; Sat, 30 Mar 2019 21:09:53 +0800 Date: Sat, 30 Mar 2019 21:09:13 +0800 From: kbuild test robot To: Zeng Tao Subject: [PATCH] staging: android: ion: fix err_cast.cocci warnings Message-ID: <20190330130913.GA8643@roam> References: <1553884816-37850-1-git-send-email-prime.zeng@hisilicon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1553884816-37850-1-git-send-email-prime.zeng@hisilicon.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Todd Kjos , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Arve =?iso-8859-1?q?Hj=F8nnev=E5g?= , kbuild-all@01.org, prime.zeng@hisilicon.com, Joel Fernandes , Martijn Coenen , Christian Brauner Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/staging/android/ion/ion.c:427:9-16: WARNING: ERR_CAST can be used with buffer Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) Generated by: scripts/coccinelle/api/err_cast.cocci Fixes: d51f182d188a ("staging: android: ion: refactory ion_alloc for kernel driver use") CC: Zeng Tao Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/Zeng-Tao/staging-android-ion-refactory-ion_alloc-for-kernel-driver-use/20190330-071409 ion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -424,7 +424,7 @@ struct dma_buf *ion_alloc(size_t len, un return ERR_PTR(-ENODEV); if (IS_ERR(buffer)) - return ERR_PTR(PTR_ERR(buffer)); + return ERR_CAST(buffer); exp_info.ops = &dma_buf_ops; exp_info.size = buffer->size;