Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1646254 > unrolled thread
| Started by | Nick Desaulniers <nick.desaulniers@gmail.com> |
|---|---|
| First post | 2017-05-21 06:10 +0200 |
| Last post | 2017-05-23 10:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] drm/i915: mark wait_for_engine() __maybe_unused Nick Desaulniers <nick.desaulniers@gmail.com> - 2017-05-21 06:10 +0200
Re: [Intel-gfx] [PATCH] drm/i915: mark wait_for_engine() __maybe_unused Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> - 2017-05-23 10:50 +0200
| From | Nick Desaulniers <nick.desaulniers@gmail.com> |
|---|---|
| Date | 2017-05-21 06:10 +0200 |
| Subject | [PATCH] drm/i915: mark wait_for_engine() __maybe_unused |
| Message-ID | <tJqlP-2wx-1@gated-at.bofh.it> |
This solves a warning when compiling the driver with Clang, -Werror enabled,
and CONFIG_DRM_I915_DEBUG_GEM unset, since Clang warns that:
drivers/gpu/drm/i915/i915_gem.c:3274:12: error: function
'wait_for_engine' is not needed
and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static int wait_for_engine(struct intel_engine_cs *engine, int
timeout_ms)
^
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
---
Additionally, it only has one call site. Should I mark it inline, too, while
I'm at it?
drivers/gpu/drm/i915/i915_gem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b6ac3df18b58..73b82fb94b0e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3271,7 +3271,8 @@ static int wait_for_timeline(struct i915_gem_timeline *tl, unsigned int flags)
return 0;
}
-static int wait_for_engine(struct intel_engine_cs *engine, int timeout_ms)
+static __maybe_unused int wait_for_engine(
+ struct intel_engine_cs *engine, int timeout_ms)
{
return wait_for(intel_engine_is_idle(engine), timeout_ms);
}
--
2.11.0
[toc] | [next] | [standalone]
| From | Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> |
|---|---|
| Date | 2017-05-23 10:50 +0200 |
| Subject | Re: [Intel-gfx] [PATCH] drm/i915: mark wait_for_engine() __maybe_unused |
| Message-ID | <tKdFU-Jg-33@gated-at.bofh.it> |
| In reply to | #1646254 |
Hi,
On 21/05/2017 05:03, Nick Desaulniers wrote:
> This solves a warning when compiling the driver with Clang, -Werror enabled,
> and CONFIG_DRM_I915_DEBUG_GEM unset, since Clang warns that:
>
> drivers/gpu/drm/i915/i915_gem.c:3274:12: error: function
> 'wait_for_engine' is not needed
> and will not be emitted [-Werror,-Wunneeded-internal-declaration]
> static int wait_for_engine(struct intel_engine_cs *engine, int
> timeout_ms)
> ^
You have actually uncovered a bug here where the call is not supposed to
be optional in the first place. I'll send a different fix and copy you
on it.
Regards,
Tvrtko
> Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
> ---
> Additionally, it only has one call site. Should I mark it inline, too, while
> I'm at it?
>
> drivers/gpu/drm/i915/i915_gem.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index b6ac3df18b58..73b82fb94b0e 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3271,7 +3271,8 @@ static int wait_for_timeline(struct i915_gem_timeline *tl, unsigned int flags)
> return 0;
> }
>
> -static int wait_for_engine(struct intel_engine_cs *engine, int timeout_ms)
> +static __maybe_unused int wait_for_engine(
> + struct intel_engine_cs *engine, int timeout_ms)
> {
> return wait_for(intel_engine_is_idle(engine), timeout_ms);
> }
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web