From patchwork Wed Apr 29 01:10:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 6293121 X-Patchwork-Delegate: rui.zhang@intel.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 111579F326 for ; Wed, 29 Apr 2015 01:11:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 558D820320 for ; Wed, 29 Apr 2015 01:11:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 64C46202FE for ; Wed, 29 Apr 2015 01:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031212AbbD2BL2 (ORCPT ); Tue, 28 Apr 2015 21:11:28 -0400 Received: from mga14.intel.com ([192.55.52.115]:59162 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031140AbbD2BL1 (ORCPT ); Tue, 28 Apr 2015 21:11:27 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 28 Apr 2015 18:11:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,667,1422950400"; d="scan'208";a="720782123" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga002.jf.intel.com with ESMTP; 28 Apr 2015 18:11:26 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1YnGX6-0009xe-Fc; Wed, 29 Apr 2015 09:11:24 +0800 Date: Wed, 29 Apr 2015 09:10:16 +0800 From: kbuild test robot To: Srinivas Pandruvada Cc: kbuild-all@01.org, Zhang Rui , Eduardo Valentin , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Thermal: Intel SoC: fix simple_return.cocci warnings Message-ID: <20150429011016.GA14116@athens> References: <201504290914.FLUcG2uJ%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201504290914.FLUcG2uJ%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/intel_soc_dts_iosf.c:358:4-7: WARNING: end returns can be simpified Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Srinivas Pandruvada Signed-off-by: Fengguang Wu --- intel_soc_dts_iosf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 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/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel_soc_dts_iosf.c @@ -350,18 +350,13 @@ int intel_soc_dts_iosf_add_read_only_cri struct intel_soc_dts_sensors *sensors, int critical_offset) { int i, j; - int ret; for (i = 0; i < SOC_MAX_DTS_SENSORS; ++i) { for (j = 0; j < sensors->soc_dts[i].trip_count; ++j) { if (!(sensors->soc_dts[i].trip_mask & BIT(j))) { - ret = update_trip_temp(&sensors->soc_dts[i], j, + return update_trip_temp(&sensors->soc_dts[i], j, sensors->tj_max - critical_offset, THERMAL_TRIP_CRITICAL); - if (ret) - return ret; - - return 0; } } }