Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1266443ybg; Thu, 11 Jun 2020 05:35:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyNTq/Meh7FwMIIP9K63VvMnmVPbfjw6xLz6XVIZglNHHq9RT+CEL5Hu0W3E90vBkufmV4 X-Received: by 2002:a17:906:b2c1:: with SMTP id cf1mr8620427ejb.135.1591878910521; Thu, 11 Jun 2020 05:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591878910; cv=none; d=google.com; s=arc-20160816; b=cx1xAI83jT+u7fC5GFQ4Cj+uOMLr92zic1zxY7ttsndTjS4E1xUS8z42PM0Y504fGP 2/SqT8cBV5C0JXkK6ujPyxtPDkcbOUH4wXdUkk3G/ogFHolwdB+tyoC0pGjn129MeSjK ByQeoOBqhpAjp/mQeNJ4GzLVSZGq+oL3y3yhGUk7tkE2JodbtHxoiYMdP5AWs1TxzZeJ eRzMV6z3Ld7iBCt3kZmNduaBk+a9yxhhEyd4w0Gpr3SLgblCWZ9q7cRkfMHpCfJIFl2w ErGm7XQHbyZczM+/+tFFB91DZWe7JQpdTYw/aNrfmYvVlRwA2NQ9zwjk+bO5cdnZG1wl rlpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=FZ+czw2NADBZK0H8QhUFTHvtOXBeQF53IvnjA6BNp54=; b=MzPOM+7fo3uq7l0q52QEZZtgKkn9pqfahVo8OojYKZG40Un9/ocIGrod57mlDQ2eT3 o5MeKhxjLvRNoUB0peuM5X9x3QSzZ0yZP2o3KyO2txQ8Kt8k50TzocN6rdNqUu0a+pq4 IQCuCoiZWJwf8NniKwnidvGayOHfWOHINh9YVsP7mejwf6z3WMPRLHa94nYJgU/y3aBR X+Rr5X0s7W5u2npJgg2eslkFRuvI+/f6ji1KZkAufiXz2JmANCexgnktzLExqQIzi9vU rgOjSYxpRRpCxlDm9socTeqMI7J4p4i24PlOzEFWFEQmtGuo5z8Apch4sGf0hRG0YGd3 U46w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=McBN7Is8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f3si1530900edw.282.2020.06.11.05.34.46; Thu, 11 Jun 2020 05:35:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=McBN7Is8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727883AbgFKMRt (ORCPT + 99 others); Thu, 11 Jun 2020 08:17:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:44694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727097AbgFKMRt (ORCPT ); Thu, 11 Jun 2020 08:17:49 -0400 Received: from PC-kkoz.proceq.com (unknown [213.160.61.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 32C0320760; Thu, 11 Jun 2020 12:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591877868; bh=TL+cCvJxcZMcr3rIlEDjazM57ouI9QtmzoB6fKwEDWs=; h=From:To:Cc:Subject:Date:From; b=McBN7Is8KkDw3Jq+G7qOZe8jTIG5ZeQjw598HNM7gyNmo5KZn5Zgcad1TovUuDtTi q6+5TNzob39RQvnvWqc/eloLWybEyPjzxg/MFOjsdC27uNqaHfqzPq43pFbqnfqKKV 5rfd+dSdnnWsuKBz6ijGHR9sQpT8VgntdnGLbRC4= From: Krzysztof Kozlowski To: Vinod Koul , Dan Williams , Robin Gong , Peng Ma , Fabio Estevam , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] dmaengine: fsl-edma: Add lockdep assert for exported function Date: Thu, 11 Jun 2020 14:17:40 +0200 Message-Id: <1591877861-28156-1-git-send-email-krzk@kernel.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add lockdep assert for an exported function expected to be called under spin lock. Since this function is called in different modules, the lockdep assert will be self-documenting note about need for locking. Signed-off-by: Krzysztof Kozlowski --- drivers/dma/fsl-edma-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index 5697c3622699..4550818cca4a 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -589,6 +589,8 @@ void fsl_edma_xfer_desc(struct fsl_edma_chan *fsl_chan) { struct virt_dma_desc *vdesc; + lockdep_assert_held(&fsl_chan->vchan.lock); + vdesc = vchan_next_desc(&fsl_chan->vchan); if (!vdesc) return; -- 2.7.4