From patchwork Wed Jun 28 09:21:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 9813813 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C7E8760365 for ; Wed, 28 Jun 2017 09:22:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAAA0201B0 for ; Wed, 28 Jun 2017 09:22:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE323284B2; Wed, 28 Jun 2017 09:22:20 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 25F6B2846C for ; Wed, 28 Jun 2017 09:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MpecVKlF7MuiDU6YtmsTltAw7+oc3oFpuTOEePfznSE=; b=LrJoeDYn7Kc9km pzKLhzZ2MZrxoyBj/V7RynjuF30VRnLye/frm80ftNr99xzUeD7h+P1zXjQvYNLn2eCXYyofzOTJ2 7/rC0nbhZOzKVu6TByK0oIN5EmPPXSLGIPAtEeojS3PI1OzS8Vln5u8UOKTwWfawdwiY8FtnwfkWE xTbyssvtJoT+nxEXifbzJ+QV2DuuxYCwk22YtW8fkKkuk5JBuvu964tefO2s9xx0P2KIwHQkHECUy 3ACST7Py4Jtr+/iiyKSLf0GLyhqef9DFpQbu0FfCQafm3TANukxZK31pK0xIyZGw3XtpeXehoeXNP HdDNVeURxG74BVkluFXw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQ9Au-000702-Vv; Wed, 28 Jun 2017 09:22:16 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQ9As-0006uv-1b for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Jun 2017 09:22:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0G2l+xULPb+QagOooYXxZQgTeMa4zj9CE2KwTLqUtw0=; b=TxeH+77uaGJaMlFklilEgSu00 trKSo6aYuplY1YLnWWA2ZII0S1xSdtE37D5IH6iPYE1Y4563nJE8Vv/gPiMe/ZDJuAbcZac/SdwWr NQ2CxRvYH45LQ/+EyIT7VF7IhA3MB0NQddWowjGsdJ+CW82sc2QVZ4eCJEYlxv6ENOh7hJdOaesgn P2XaBO+NKEH3eUtMN+4Jmn/S28WyW7h8f2miNhNRFeRuGYM8OHZEV27iKAf8AyZQhr06cess9HnvQ cc7eihW1IwqFkOeYHdvPGlh0dtcs/SjIfB6Y2knFV/JxSR5NKaqwdneF3y59fZiTZqraCmCNKwbjv PVVxpm2DQ==; Received: from mga04.intel.com ([192.55.52.120]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQ9An-0005pS-Lb for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2017 09:22:11 +0000 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2017 02:21:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,274,1496127600"; d="scan'208";a="872514693" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by FMSMGA003.fm.intel.com with ESMTP; 28 Jun 2017 02:21:42 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1dQ9Dp-0002ny-Tl; Wed, 28 Jun 2017 17:25:17 +0800 Date: Wed, 28 Jun 2017 17:21:18 +0800 From: kbuild test robot To: Shaokun Zhang Subject: [PATCH] drivers: perf: hisi: fix ptr_ret.cocci warnings Message-ID: <20170628092118.GA3354@lkp-wsm-ep1> References: <201706281748.v6FQazSw%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1498552001-182148-4-git-send-email-zhangshaokun@hisilicon.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, linux-doc@vger.kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, linuxarm@huawei.com, Shaokun Zhang , kbuild-all@01.org, linux-arm-kernel@lists.infradead.org, Anurup M Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c:348:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 05958712d8d4 ("drivers: perf: hisi: Add support for HiSilicon SoC L3C PMU driver") CC: Shaokun Zhang Signed-off-by: Fengguang Wu --- hisi_uncore_l3c_pmu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c @@ -345,10 +345,7 @@ static int hisi_l3c_pmu_init_data(struct res = platform_get_resource(pdev, IORESOURCE_MEM, 0); l3c_pmu->base = devm_ioremap_resource(dev, res); - if (IS_ERR(l3c_pmu->base)) - return PTR_ERR(l3c_pmu->base); - - return 0; + return PTR_ERR_OR_ZERO(l3c_pmu->base); } static struct attribute *hisi_l3c_pmu_format_attr[] = {