From patchwork Thu Nov 4 12:27:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12602999 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82B39C433F5 for ; Thu, 4 Nov 2021 12:27:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3FA8F61139 for ; Thu, 4 Nov 2021 12:27:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3FA8F61139 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A79736EEB4; Thu, 4 Nov 2021 12:27:10 +0000 (UTC) Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id A949D6EEB4; Thu, 4 Nov 2021 12:27:09 +0000 (UTC) Date: Thu, 4 Nov 2021 13:27:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1636028827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M6NqONrvOq66l/QYoFSVwjLleMhO22wOW4bvAS2dEVY=; b=NKcXU5k15e0NQfoYe+CBkb6tOMToV22terwbv/9kO1t2Hfha8/qkxJ/zExQbtnpZH6X93R PzUnSXkvFDDG4FGUDum9qM+EwYxcn1y3mHBpsqzfo78UwuhOMQnzSWJnuN9ymEjyhPB0k3 AefuaLV6UO9aOVpis7RwqDu/UgVR67ETUdoRO0NhQxLoM6MVMWotVASNcy8fd7hzrzAM6R +TrBo/IxiK/WebTFrVh66GvhN4Co2P/OZaJ84k0RJPH5itXdwBUKVoXqoS0OKpo3JoF47H da8loeWJNeAPrCXC3Gz8VGEqqoKnHOQgG6VcKchkscWZWTFT5T9/8LN9iYE8RA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1636028827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M6NqONrvOq66l/QYoFSVwjLleMhO22wOW4bvAS2dEVY=; b=UyK9WVi/iF5JBJwpnzicusVrisGdl3Ncs9v/wBkhufwv8oLWvxDPOnxbS1NFB81TKyuj4q TQLBdzJcUcjgwHAg== From: Sebastian Andrzej Siewior To: Peter Zijlstra Subject: [PATCH] kernel/locking: Use a pointer in ww_mutex_trylock(). Message-ID: <20211104122706.frk52zxbjorso2kv@linutronix.de> References: <20210907132044.157225-1-maarten.lankhorst@linux.intel.com> <96ab9cf1-250a-8f34-51ec-4a7f66a87b39@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, Liam Girdwood , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ingo Molnar , Mark Brown , Waiman Long , Thomas Gleixner , Will Deacon , Boqun Feng Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" mutex_acquire_nest() expects a pointer, pass the pointer. Fixes: 12235da8c80a1 ("kernel/locking: Add context to ww_mutex_trylock()") Signed-off-by: Sebastian Andrzej Siewior --- Not sure why I haven't seen this earlier… kernel/locking/ww_rt_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/ww_rt_mutex.c b/kernel/locking/ww_rt_mutex.c index 0e00205cf467a..d1473c624105c 100644 --- a/kernel/locking/ww_rt_mutex.c +++ b/kernel/locking/ww_rt_mutex.c @@ -26,7 +26,7 @@ int ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ww_ctx) if (__rt_mutex_trylock(&rtm->rtmutex)) { ww_mutex_set_context_fastpath(lock, ww_ctx); - mutex_acquire_nest(&rtm->dep_map, 0, 1, ww_ctx->dep_map, _RET_IP_); + mutex_acquire_nest(&rtm->dep_map, 0, 1, &ww_ctx->dep_map, _RET_IP_); return 1; }