From patchwork Wed Mar 4 20:34:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 5940201 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5B5F19F380 for ; Wed, 4 Mar 2015 20:34:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B9E220357 for ; Wed, 4 Mar 2015 20:34:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92D9C2034F for ; Wed, 4 Mar 2015 20:34:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932911AbbCDUeU (ORCPT ); Wed, 4 Mar 2015 15:34:20 -0500 Received: from mga03.intel.com ([134.134.136.65]:29844 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932907AbbCDUeU (ORCPT ); Wed, 4 Mar 2015 15:34:20 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 04 Mar 2015 12:31:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,689,1418112000"; d="scan'208";a="660510702" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga001.jf.intel.com with ESMTP; 04 Mar 2015 12:34:17 -0800 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1YTFzj-0004Lp-7a; Thu, 05 Mar 2015 04:34:15 +0800 Date: Thu, 5 Mar 2015 04:34:02 +0800 From: kbuild test robot To: Javi Merino Cc: kbuild-all@01.org, Eduardo Valentin , Kapileshwar Singh , Punit Agrawal , Zhang Rui , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] thermal: cpu_cooling: fix ptr_ret.cocci warnings Message-ID: <20150304203402.GA168719@athens.lkp.intel.com> References: <201503050401.EJ55ouQ7%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201503050401.EJ55ouQ7%fengguang.wu@intel.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 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/thermal/cpu_cooling.c:463:18-24: 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 CC: Javi Merino Signed-off-by: Fengguang Wu --- cpu_cooling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -460,7 +460,7 @@ static int get_static_power(struct cpufr if (voltage == 0) { dev_warn_ratelimited(cpufreq_device->cpu_dev, "Failed to get voltage for frequency %lu: %ld\n", - freq_hz, IS_ERR(opp) ? PTR_ERR(opp) : 0); + freq_hz, PTR_ERR_OR_ZERO(opp)); return -EINVAL; }