From patchwork Wed Jun 28 09:56:37 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: 9813843 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 BB11E603D7 for ; Wed, 28 Jun 2017 09:57:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD34926E54 for ; Wed, 28 Jun 2017 09:57:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1D5E28464; Wed, 28 Jun 2017 09:57:29 +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 0A56F26E54 for ; Wed, 28 Jun 2017 09:57:28 +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=aKUzVfR+TRIWmb6fun4JK9UsEPIoQWOQ3S7D0H68q/Y=; b=NDR6pVETPLy9Cj m+MQv9Jts3/pKKrBBNCxsCOT1C5NcID4nYdckNKH/qHqv8o0r057pXF1agWQNy7I/1B1gXJJrw6qU UO/fnzsAAadS9aD+HPFETzfdyvHRjYeg5dQ4rNhk323R443nxzq2CyDgjF0rHDH2YmK5qUqmHLCAa QPKsvkugp01ZnFuxDKA8GaGyMAelkyf+A8hiHgRckQJJUykDqdjBmvwy+rOhpm+Rs11Essy31+mKK vK4jJrNT1xUPWhZ/OPT+OzU1XIpvHU+6/77wRzvyhBimsARUmmD9a+Sy8O+7t4C0OmIHSxaUHXv7A N1b0OyME2e/xDBI+mkNQ==; 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 1dQ9iu-00067y-GY; Wed, 28 Jun 2017 09:57:24 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQ9iq-00065n-Va for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2017 09:57:22 +0000 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2017 02:56:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,274,1496127600"; d="scan'208";a="119738541" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga005.fm.intel.com with ESMTP; 28 Jun 2017 02:56:58 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1dQ9lx-000Tu1-4F; Wed, 28 Jun 2017 18:00:33 +0800 Date: Wed, 28 Jun 2017 17:56:37 +0800 From: kbuild test robot To: Shaokun Zhang Subject: [PATCH] drivers: perf: hisi: fix ptr_ret.cocci warnings Message-ID: <20170628095637.GA1038@lkp-wsm-ep1> References: <201706281706.O4jmBQ6k%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1498552001-182148-5-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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170628_025721_038909_D8E5EBC6 X-CRM114-Status: GOOD ( 10.83 ) 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_hha_pmu.c:272: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: 2b8a651927f4 ("drivers: perf: hisi: Add support for HiSilicon SoC HHA PMU driver") CC: Shaokun Zhang Signed-off-by: Fengguang Wu --- hisi_uncore_hha_pmu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c @@ -269,10 +269,7 @@ static int hisi_hha_pmu_init_data(struct res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hha_pmu->base = devm_ioremap_resource(dev, res); - if (IS_ERR(hha_pmu->base)) - return PTR_ERR(hha_pmu->base); - - return 0; + return PTR_ERR_OR_ZERO(hha_pmu->base); } static struct attribute *hisi_hha_pmu_format_attr[] = {