Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1664524ioo; Sun, 22 May 2022 23:34:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3Mvpanc9nxsMEq9chjqMBtsF9BY/D1VGz+5nVFoFxnlXYVG/5+JRu9Qr9vAnFXfF0DCIY X-Received: by 2002:a17:902:ea57:b0:15a:6173:87dd with SMTP id r23-20020a170902ea5700b0015a617387ddmr21974038plg.147.1653287662158; Sun, 22 May 2022 23:34:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653287662; cv=none; d=google.com; s=arc-20160816; b=M0tCGUgx6RWnNKnTj6JwZq6MfzBkItKJA5v/zeVarqTyjkq8kD3k2jddodPURz8SRt GfcGnNHgD/r6wzvlpLo/XK/9IwHhG+9idvF5hMUoFJFgtg3eGncfDrLPEsp2vDOeQr6a r5ohj8EXIZlDtby2epwgEmlqasiKxsqPPWsS1VaDqoRyQDpQp5896Ut0tEwTeBw8Jglc XzhAuDP8MiGPwbmwARUSmOzeZCZuurZa7jXLBRCIzUEl2ajL0RbaMnP1gw57StG8GgTu BDnNlS6LAmjEwEfOtzbcwQNmAk7dSt42jYhg+GGtnn314ZiaFSj1o4klqEiWKtvGH+vd 7VXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=a/1mG4i9L+tNMsMaLddfm8Iy2qnBWYeXfL4GIdKcyQE=; b=nwqGsOo5/Q09n92j4LbDYeMa2nCPiSfemB6RPnCIRVW3S5JweU54tadOiqkVTAV8Ia QCr/VwapulUZWxi6BQBONFmTS7r8J56sbO2w+xc+yLEDqGvO17G/lyTbw6r1+i4lLbwb xpvRFFYBM2VntlfnRKX/CSZceJeeUHvI1k9X3ghqjNpKqmGrKGM5nkpK9A6kOlj31OCj 6dFYObzrU0C18MDrmShENKnbF7fGddEeorvWZWPIBpXzVzwjMh0Os2G1K3NcAgn1sB90 4J3gkS8pYyO7zo05AQZFmE9zU9+aHZ6eXMxu7oxQK10UtlXzzHO1zi44zZxFI5MRYF5p GiGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=be1dlzwg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id be15-20020a056a001f0f00b00506475da4desi10807547pfb.151.2022.05.22.23.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:34:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=be1dlzwg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 90DF247556; Sun, 22 May 2022 23:09:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352484AbiETSOz (ORCPT + 99 others); Fri, 20 May 2022 14:14:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344415AbiETSOx (ORCPT ); Fri, 20 May 2022 14:14:53 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C4071900D3; Fri, 20 May 2022 11:14:52 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id 055C51F4675C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1653070491; bh=x/OOyFHTqKvvNw+5fLLflE2enF2X0UELX4BA2pQVGII=; h=From:To:Cc:Subject:Date:From; b=be1dlzwgyznSiKw4DhsBnAbpQs4W46+0yvn2g9+eaTZt3f6Kxo5t+ZIV4qsuBJJzX Q90pkkkJtwtTW8vh2TG/KZBD1Rk+86FYaG16JoIBmq14OQ4TYPbTRTpfWG2wc6Afls QxGLdsQVoJzYyQH4b1aJP/0YUX8nq8yIvQrLsw/Dkh2gqq9gLZS7CQoZGayOw0FKop jqIFjt6zYHgXgpOPmCOAFgLGcUS46/Of7V75uXhhYSemVVgnMX25uj6lpngJarb/3s ppX70pUiPsyMzXXaBYVCOCv0E5gxlDxnI8MuANXb4vhsAgjL+wTiwfx+8zqppYb7xR Q0PQqIyoCwUZA== From: Dmitry Osipenko To: Vinod Koul Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] dmaengine: pl330: Fix lockdep warning about non-static key Date: Fri, 20 May 2022 21:14:32 +0300 Message-Id: <20220520181432.149904-1-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DEFINE_SPINLOCK() macro shouldn't be used for dynamically allocated spinlocks. The lockdep warns about this and disables locking validator. Fix the warning by making lock static. INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. Hardware name: Radxa ROCK Pi 4C (DT) Call trace: dump_backtrace.part.0+0xcc/0xe0 show_stack+0x18/0x6c dump_stack_lvl+0x8c/0xb8 dump_stack+0x18/0x34 register_lock_class+0x4a8/0x4cc __lock_acquire+0x78/0x20cc lock_acquire.part.0+0xe0/0x230 lock_acquire+0x68/0x84 _raw_spin_lock_irqsave+0x84/0xc4 add_desc+0x44/0xc0 pl330_get_desc+0x15c/0x1d0 pl330_prep_dma_cyclic+0x100/0x270 snd_dmaengine_pcm_trigger+0xec/0x1c0 dmaengine_pcm_trigger+0x18/0x24 ... Fixes: e588710311ee ("dmaengine: pl330: fix descriptor allocation fail") Signed-off-by: Dmitry Osipenko --- drivers/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 858400e42ec0..09915a5cba3e 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2589,7 +2589,7 @@ static struct dma_pl330_desc *pl330_get_desc(struct dma_pl330_chan *pch) /* If the DMAC pool is empty, alloc new */ if (!desc) { - DEFINE_SPINLOCK(lock); + static DEFINE_SPINLOCK(lock); LIST_HEAD(pool); if (!add_desc(&pool, &lock, GFP_ATOMIC, 1)) -- 2.35.3