From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Nick Desaulniers <nick.desaulniers@gmail.com>
Cc: airlied@linux.ie, intel-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
daniel.vetter@intel.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915: mark wait_for_engine() __maybe_unused
Date: Tue, 23 May 2017 09:39:39 +0100 [thread overview]
Message-ID: <fb0ee888-0667-7326-0c8c-a3c24bd5c3a3@linux.intel.com> (raw)
In-Reply-To: <20170521040319.13007-1-nick.desaulniers@gmail.com>
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);
> }
>
prev parent reply other threads:[~2017-05-23 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-21 4:03 Nick Desaulniers
2017-05-23 8:39 ` Tvrtko Ursulin [this message]
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=fb0ee888-0667-7326-0c8c-a3c24bd5c3a3@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick.desaulniers@gmail.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
all inboxes | Powered by JetHome®