Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp6897lqp; Sun, 9 Jun 2024 13:34:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUdefIm0JwE25vdUqKLXAjFPhGghOUoA5uEqg2sVL/5HdlmqT15NwMpJVN6xQ2yPUaymPlEcZebU6i38LA7ST1mzuK0D918i4cjv/Jvqg== X-Google-Smtp-Source: AGHT+IE38VxXmRjknRLvYk3s3+0tVNxgfDwaMnCXcrXbEJGOpK+xG/nnxYOEikG/YIhi+sD1mTS0 X-Received: by 2002:a50:8e07:0:b0:57a:2e8d:c308 with SMTP id 4fb4d7f45d1cf-57c509ac1c8mr3891397a12.40.1717965249502; Sun, 09 Jun 2024 13:34:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717965249; cv=pass; d=google.com; s=arc-20160816; b=VjJyuxD4thMvzr3BBHv3hacXIlVhky2DhAO4ny/fDcL07/3u3gNqMO7QA4PS9hSbbz aFlSYvJ6scb6c2YFPtwKWQVOQlhSSlFl8+X731W3ICp30/38F4hSgvHZSwDhjgHAvXwU f0y6fgo3OwXvKjbAMTg0IganQfKmjW0g35nTP/2yoNuqj7EdseBTw8Ve2wlpWH2sMy54 sGNUyh8HnVd2lVVJ+39dduTyiI+We4Vsm3I3/qe3BRTPOc6PmzNHsoHL7IR142b25lM4 PcJuMqXxiBjnuhiyO0kGFmzkU0c4eRcNvMaMNC8JiaLAsqr57JKd6mOfETaPk8c1UllW 1PhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3n8SaL8WINeV1wuWjpxwfyGNSRase5dnk0DKSMoT+2M=; fh=9d/VWLZFhvLlnEOekXB8RK63KQGuQLwCnPfQ2DisxsY=; b=KSRQhM+La1n3eCc8cMaIl8Pc+to+uC8BbwlBZvLo+4F+IVtWFWn6q2rCXDNOEycIVC w3C2CnQtG+39jlcnqirIjA1YT0Dt5HO5Se+QwRcGLGHXZpAbUIsqfMuNlrL9WMNNXEeZ BXtIiCq/SmJvU9SqRZ8el3v7RFwgC0xR34cBy7qpC87JIgLnxAT7gk0dozs70KOtlltX ei31tmfPwW/HHU8M0ldbOp+czmRYe2RhTP5TZfMX0F892KlQ5vWbOXj3X7VlY2cr94Hb ygcVUr2vtPo8kHGhUcDsQ+RbzqCtwn7V/rR0WtEtV4M/sUsJ1+OggphX5uxM3Unsc+gK xSqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fBmOZ037; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-207503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c7f2677bdsi683197a12.352.2024.06.09.13.34.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 13:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fBmOZ037; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-207503-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207503-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0A7F11F21492 for ; Sun, 9 Jun 2024 20:34:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 845BB4D8C7; Sun, 9 Jun 2024 20:34:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fBmOZ037" Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3187517BD3; Sun, 9 Jun 2024 20:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717965241; cv=none; b=Crw9N8h+DvW1P4Mq8fl/CDNT/rNWIBXMMH7yV2Csear9l3YRJOXqTG91ArdKAVReICU5m4xkfPGSgSXIlDz/KUT4U6OGy1moMyAlQa6KnUHCYgcV575oB4HbVLUuaHlmQBdCrvNUFgnfb+HHOkfz68G9nlwBEJZrHP1ZpNM8QgA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717965241; c=relaxed/simple; bh=rIKPDLDsHnN3JbRPuvRDCF5YTJrHLEE5++xGLHlQGoY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f49MywR76d/MvO+5JA1+QLs282AHz8NpP9a7KycFNamz0W9+4r7TtOaPxE8YwV0Xea0mIMsqIqevzcbGMAY6ZGio100gteqnaC4ceXfpBQeSk9G4jpavxZiIf7169U1rmXAd2tIglvpqwwtslmKhA8HuwzeCUJR92bKcgnb3TZA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fBmOZ037; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-35f0f4746c2so1056529f8f.3; Sun, 09 Jun 2024 13:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717965238; x=1718570038; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=3n8SaL8WINeV1wuWjpxwfyGNSRase5dnk0DKSMoT+2M=; b=fBmOZ0374mnyw4wVkZEPL96F2/Jkh8Pz06VV/vTBTHdVi+j09fB33010IhXNhvmrRn 2NKqN69GqoaXsfgDqH83boOWR4e0TeXCbzGyYmKsomYY0xjeE3ioxy+OjqaEfz0ywMSD WFGHwazrw9CwLYCT7GCgHFTL8EMSXFOBXo63y8a349S52eKTuMTYAy9RN7yISZvkPYkC 6VE+A9EWbcTWsBVfh8mgTo69p6LTwMF/8RtBJLNp2D/6WStwBse5ucB3U8mcJvqw1ybV SpaUhfdMKKL9dTjY4yOTPTgmAknMzf+sFojDc47zc5/BGFYYNXTJ6cG+D2nD15KiIuWM k4iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717965238; x=1718570038; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3n8SaL8WINeV1wuWjpxwfyGNSRase5dnk0DKSMoT+2M=; b=Xu0g3ZqxITI02iAM+uUJartfePs/iTwgYLLp+wtR1okFyqc9NYAFdWatDWmS7ihwdh sORMl5Iinm1cquXzPsiOG/4ImNRX8ACUg27YNzwpGR8s40TZ1sglhA6dh0LzsSSdze6N lYgo0DR5WmYXBfQEnrzXoCOJQmvif2jO0dBkJUd1kwEWzc4eR2gPIhdTd7g/gOlyAzyr n8Zba7069jN/FdkJa49EQ4C3PZeGBWV5jMJ4ICHEObreDgU+1ZsdNWOFOU87fnh/zwZw j4sfcYPngd8HbVIBoGYPhruspC7+kKN1ooqCEPCfupoznaFmkGOqCxALFgjhLzpTqnfT htfg== X-Forwarded-Encrypted: i=1; AJvYcCXVnZUsCutREk9MDTlqQ8RyvjvrnoiR6hf1fL4GRgwRI5JkKbTPBZeR+MhwnB/p99MKCpNRQ+r5UBqUaalfFAgl7AHEQ+HGmnw3Iyoz X-Gm-Message-State: AOJu0YyjymvA1NFtomR/fAYXelRjaGwdiT2IB5txHPRAXL06blakjz7M RpYyiZ/w4t3swKdkQhnaIyXOIJJTdWdSU5nunKB/w1LB7di5Lmew X-Received: by 2002:adf:ef0c:0:b0:35f:25c9:8c2 with SMTP id ffacd0b85a97d-35f25c90961mr211695f8f.46.1717965238385; Sun, 09 Jun 2024 13:33:58 -0700 (PDT) Received: from olivier-manjaro (oliv-cloud.duckdns.org. [78.196.47.215]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35f1fd78d1bsm2251058f8f.48.2024.06.09.13.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 13:33:57 -0700 (PDT) Date: Sun, 9 Jun 2024 22:33:56 +0200 From: Olivier Dautricourt To: Markus Elfring Cc: dmaengine@vger.kernel.org, Stefan Roese , Vinod Koul , LKML , Eric Schwarz Subject: Re: [PATCH v2 2/3] dmaengine: altera-msgdma: cleanup after completing all descriptors Message-ID: References: <20240608213216.25087-2-olivierdautricourt@gmail.com> <0e439d73-aff5-4d56-9a3c-b29867132db1@web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0e439d73-aff5-4d56-9a3c-b29867132db1@web.de> On Sun, Jun 09, 2024 at 07:20:49PM +0200, Markus Elfring wrote: > … > > This fixes a Sparse warning because we first take the lock in > > msgdma_tasklet. > … > > Can the tag “Fixes” become relevant for the proposed change? I can add a Fixes tag, it will target only the first commit introducing this driver. > > > … > > +++ b/drivers/dma/altera-msgdma.c > > @@ -585,6 +585,8 @@ static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev) > > struct msgdma_sw_desc *desc, *next; > > unsigned long irqflags; > > > > + spin_lock_irqsave(&mdev->lock, irqflags); > > + > > list_for_each_entry_safe(desc, next, &mdev->done_list, node) { > > struct dmaengine_desc_callback cb; > > > > @@ -600,6 +602,8 @@ static void msgdma_chan_desc_cleanup(struct msgdma_device *mdev) > > /* Run any dependencies, then free the descriptor */ > > msgdma_free_descriptor(mdev, desc); > > } > > + > > + spin_unlock_irqrestore(&mdev->lock, irqflags); > > } > … > > Would you become interested to apply the guard “spinlock_irqsave”? > https://elixir.bootlin.com/linux/v6.10-rc2/source/include/linux/spinlock.h#L574 I could but arent these type of things to be integrated in a more global patch serie targeting (let say) all drivers in one subsystem ? Currently it seems only one driver uses a guard in the dmaengine subsystem. Kr, Olivier