From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66C33C4338F for ; Thu, 5 Aug 2021 15:41:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DE8E6113B for ; Thu, 5 Aug 2021 15:41:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242115AbhHEPmJ (ORCPT ); Thu, 5 Aug 2021 11:42:09 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:43638 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242282AbhHEPla (ORCPT ); Thu, 5 Aug 2021 11:41:30 -0400 Message-ID: <20210805153953.270134895@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628178075; 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: references:references; bh=vwehnuXDeImKsjZ4mWbe7dd6/xJMgVJeOod7/h8jtVk=; b=FH0lcR52zm00cQUlVtw5uiMudmSlV3BZa1waFw8+VfLJWRiwE3ug9b4uPKS3RbGuYPy6yO SwZIcoZxhbvbZ5iUP46qYvNhrEKPx6EYiXqe9J50ICorWJ/zFTscKyFRT36LSiU4Oxaq9B pDILQwA3xSFZEDXWFyR88g2DOjx90pFZJBFojues2oRRennM3HjTk4SdF+fhy2x/ST1ryo Rvb4hBP+sm3jThIvOEzwnwe46S09KqecQQf0ZMshuttKqCJAt6oPYRNBV7fHZGGYVFr5N6 UdrSzjvwAvegzQ4QTt67B1ChyXfqowCIJX+F2FTvpB6ErdmFmZ5p+U9VS96flQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628178075; 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: references:references; bh=vwehnuXDeImKsjZ4mWbe7dd6/xJMgVJeOod7/h8jtVk=; b=irP8A54u4LP0RupLpeos2RXmR+EYNSYcONaOSOU+hsgK4BDtsyXqYujENj5VyJzfe3O0gK KJRqGejLUbGehwDQ== Date: Thu, 05 Aug 2021 17:13:08 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Steven Rostedt , Daniel Bristot de Oliveira , Will Deacon , Waiman Long , Boqun Feng , Sebastian Andrzej Siewior , Davidlohr Bueso , Mike Galbraith Subject: [patch V3 08/64] media/atomisp: Use lockdep instead of *mutex_is_locked() References: <20210805151300.330412127@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Zijlstra Subject: [patch V3 08/64] media/atomisp: Use lockdep instead of *mutex_is_locked() The only user of rt_mutex_is_locked() is an anti-pattern, remove it. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210714100719.GA11408@worktop.programming.kicks-ass.net --- --- drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c @@ -1904,8 +1904,8 @@ int __atomisp_streamoff(struct file *fil dev_dbg(isp->dev, "Stop stream on pad %d for asd%d\n", atomisp_subdev_source_pad(vdev), asd->index); - BUG_ON(!rt_mutex_is_locked(&isp->mutex)); - BUG_ON(!mutex_is_locked(&isp->streamoff_mutex)); + lockdep_assert_held(&isp->mutex); + lockdep_assert_held(&isp->streamoff_mutex); if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE) { dev_dbg(isp->dev, "unsupported v4l2 buf type\n");