From: kbuild test robot <fengguang.wu@intel.com>
To: Michel Thierry <michel.thierry@intel.com>
Cc: kbuild-all@01.org, Daniel Vetter <daniel.vetter@ffwll.ch>,
Ben Widawsky <ben@bwidawsk.net>,
Jani Nikula <jani.nikula@linux.intel.com>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] drm/i915: fix simple_return.cocci warnings
Date: Fri, 27 Mar 2015 19:26:35 +0800 [thread overview]
Message-ID: <20150327112635.GA178369@athens> (raw)
In-Reply-To: <201503271934.hxMuVM63%fengguang.wu@intel.com>
drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci
CC: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
i915_gem_gtt.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -1344,13 +1344,7 @@ err_out:
static int gen6_ppgtt_alloc(struct i915_hw_ppgtt *ppgtt)
{
- int ret;
-
- ret = gen6_ppgtt_allocate_page_directories(ppgtt);
- if (ret)
- return ret;
-
- return 0;
+ return gen6_ppgtt_allocate_page_directories(ppgtt);
}
static void gen6_scratch_va_range(struct i915_hw_ppgtt *ppgtt,
next parent reply other threads:[~2015-03-27 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201503271934.hxMuVM63%fengguang.wu@intel.com>
2015-03-27 11:26 ` kbuild test robot [this message]
2015-03-27 13:49 ` [PATCH] drm/i915: fix simple_return.cocci warnings Daniel Vetter
[not found] <201503052205.pdPgdu3L%fengguang.wu@intel.com>
2015-03-05 14:03 ` kbuild test robot
2015-03-05 15:30 ` Daniel Vetter
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=20150327112635.GA178369@athens \
--to=fengguang.wu@intel.com \
--cc=airlied@linux.ie \
--cc=ben@bwidawsk.net \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michel.thierry@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