From: kbuild test robot <fengguang.wu@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
tipbuild@zytor.com, Ingo Molnar <mingo@kernel.org>
Subject: [tip:locking/core 12/12] drivers/gpu/drm/i915/i915_gem_shrinker.c:230:2: warning: 'mutex_trylock_recursive' is deprecated
Date: Wed, 16 Nov 2016 17:45:22 +0800 [thread overview]
Message-ID: <201611161719.AImfWbrZ%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2224 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head: 0f5225b024d4bffd682aab008c35862e8fdc1865
commit: 0f5225b024d4bffd682aab008c35862e8fdc1865 [12/12] locking/mutex, drm: Introduce mutex_trylock_recursive()
config: i386-randconfig-a0-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout 0f5225b024d4bffd682aab008c35862e8fdc1865
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
drivers/gpu/drm/i915/i915_gem_shrinker.c: In function 'i915_gem_shrinker_lock':
>> drivers/gpu/drm/i915/i915_gem_shrinker.c:230:2: warning: 'mutex_trylock_recursive' is deprecated [-Wdeprecated-declarations]
switch (mutex_trylock_recursive(&dev->struct_mutex)) {
^~~~~~
In file included from arch/x86/include/asm/mmu.h:5:0,
from include/linux/mm_types.h:17,
from include/linux/sched.h:27,
from include/linux/oom.h:5,
from drivers/gpu/drm/i915/i915_gem_shrinker.c:25:
include/linux/mutex.h:215:1: note: declared here
mutex_trylock_recursive(struct mutex *lock)
^~~~~~~~~~~~~~~~~~~~~~~
vim +/mutex_trylock_recursive +230 drivers/gpu/drm/i915/i915_gem_shrinker.c
214 */
215 unsigned long i915_gem_shrink_all(struct drm_i915_private *dev_priv)
216 {
217 unsigned long freed;
218
219 freed = i915_gem_shrink(dev_priv, -1UL,
220 I915_SHRINK_BOUND |
221 I915_SHRINK_UNBOUND |
222 I915_SHRINK_ACTIVE);
223 rcu_barrier(); /* wait until our RCU delayed slab frees are completed */
224
225 return freed;
226 }
227
228 static bool i915_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
229 {
> 230 switch (mutex_trylock_recursive(&dev->struct_mutex)) {
231 case MUTEX_TRYLOCK_FAILED:
232 return false;
233
234 case MUTEX_TRYLOCK_SUCCESS:
235 *unlock = true;
236 return true;
237
238 case MUTEX_TRYLOCK_RECURSIVE:
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21709 bytes --]
reply other threads:[~2016-11-16 9:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201611161719.AImfWbrZ%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tipbuild@zytor.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®