linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: kbuild-all@01.org, Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Thermal: Intel SoC: fix simple_return.cocci warnings
Date: Wed, 29 Apr 2015 09:10:16 +0800	[thread overview]
Message-ID: <20150429011016.GA14116@athens> (raw)
In-Reply-To: <201504290914.FLUcG2uJ%fengguang.wu@intel.com>

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 <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 intel_soc_dts_iosf.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- 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;
 			}
 		}
 	}

           reply	other threads:[~2015-04-29  1:11 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <201504290914.FLUcG2uJ%fengguang.wu@intel.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150429011016.GA14116@athens \
    --to=fengguang.wu@intel.com \
    --cc=edubezval@gmail.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).