Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3179909imw; Mon, 11 Jul 2022 03:41:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tcKiYEnTt19FjYS8gnhqJetxvZO+f5IK2lSZLpwk4ACRY6jImeHhU3rDNEoZGJ+5b9uAXZ X-Received: by 2002:a05:6a00:2401:b0:528:57cf:5720 with SMTP id z1-20020a056a00240100b0052857cf5720mr17900958pfh.60.1657536087840; Mon, 11 Jul 2022 03:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657536087; cv=none; d=google.com; s=arc-20160816; b=AJKa+KXyi/h8P6bR3fCQqltaJz2+crSwBUXDgdwL9j6ozkK2VDvBCXpArXMwVLck4b Z8cD1usUuejI489Td5NytkspZ6q9jZmAVjVeZCUYFPK6GJGlvtAw1Krqmz7Jpko4f1BH uZ7Kx1cKhS1wXRxyi51nG8cgbXDsGFv4yWyXEOrfkFQ4SYDVMUf0IKNVdZAjk+QOqEoN fUOqmplx9sf7fxNQdD3iwhSbqAL42zfxbvT0faNC2aGURmdX/vTwQetnOHt/QAxCAx4P dQgciToyJPDk3uDJIvZxbEBHB/NcZGrvPmbpDTA/KhILuXoFkQvW6lbScmQMJxS5AcNV 4IwQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o2nsCFo2xTlwWK+1zexd4hapJ7gkqN3gitndpqHdcDw=; b=U3kCfyZIM4/9t94fJ2HrqtQ3NIIkrgmqwYBRVxKbi2gQqO3FOu4ouk5itkGKF5Y0Do jN/haejZi4leQ37nvl2Ut8PyXXO2h7ZR0qbM4qcAIFMiugGL+1+2tuluOVvaWOT8TPp8 erh47austFeT2r11Jry5XbEvmi04e27oN92w90rW+1/KpHd0FhlILS6rt8hf2Im2WI0O waGLxAMDF6vbhm2RSIr5lSSuCK+yRAV+aI9J338OdqVaJsE5lGVhvbtQ01ZsPn408+kn P9dbAEMvSVCxIhj7mFB824AmqNt5MPbB9lbviRAycBTj1STvKcO3a5qEBFZm2w9bNwrw tlHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Ml7N69w/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k24-20020a635618000000b0040dc2f85ca9si9547759pgb.381.2022.07.11.03.41.14; Mon, 11 Jul 2022 03:41:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Ml7N69w/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232995AbiGKJgx (ORCPT + 99 others); Mon, 11 Jul 2022 05:36:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232956AbiGKJgT (ORCPT ); Mon, 11 Jul 2022 05:36:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 782DF4C630; Mon, 11 Jul 2022 02:18:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 994A6B80E76; Mon, 11 Jul 2022 09:18:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDD7FC34115; Mon, 11 Jul 2022 09:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657531131; bh=p0lflOcWHVfiMHk1+KUAd/x8/pQZqrbHUD1i0/M/Vz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ml7N69w/GPaPWcOshhL702ju8eojgWb/Wfy2S0OkRVtNhM0HfVgEAAlqbk8lRNKBH mANxKuJwrP7kF1gpjfh7pH9SmxL6JNtX62joaD7vEyi5VtMjPb40uIlmHD1GzwPwhB ks6CA9cM2EnvvHTUFTFRbF2M3SAdrlRMiafNl9zA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Osipenko , Vinod Koul Subject: [PATCH 5.18 106/112] dmaengine: pl330: Fix lockdep warning about non-static key Date: Mon, 11 Jul 2022 11:07:46 +0200 Message-Id: <20220711090552.578956571@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090549.543317027@linuxfoundation.org> References: <20220711090549.543317027@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Dmitry Osipenko commit b64b3b2f1d81f83519582e1feee87d77f51f5f17 upstream. 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 Link: https://lore.kernel.org/r/20220520181432.149904-1-dmitry.osipenko@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2589,7 +2589,7 @@ static struct dma_pl330_desc *pl330_get_ /* 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))