From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B353D1FA5 for ; Fri, 16 Aug 2024 00:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723768874; cv=none; b=BEMrL4wAODa0Jht0aXsFdg8wFwOqtkd09a01LvC8Ov1jmu3U8h8ebwsKFHwmaWnFlhaR4hNBY4wnp4AOTOyetWdoyPWbspYBZacuJwQNMG5+kTDckdaIu2sWKqKgWaqguDPIHaGwNuXIQAYwh4VwheBjLddriiBSLjPthhV0MT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723768874; c=relaxed/simple; bh=Nwp0IY+YulJgG/xhjgBvDy9CxQVPztBLK39wd2uTlDs=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=aSq6/EpwpSulZyA6OU2n7mZgA1Q+zC1QaL/grW5NafWAYlcvBstsF6+CD+ELltnIxvlEhfnxzCO3rwrryCD0Jl0CbmmX5xePegjmg9djzjS2JOJLmPNlb5SbAmkXettzvHxn/zdfrP1Gyr939acOSv9dbZHHUx0Qu3GLt6oBRkU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=BTM0gF5G; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BTM0gF5G" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723768871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vRjt0LxdwBprGD6cGDXYK8NHp/OzYaejcIxCi4AIQiE=; b=BTM0gF5GFo1AUFfFnUIcHl22qbLiHMGict9SH8jCn0AWuCxkUT5CB4sEZqpk1VSqlw6Qks mrhkP2xsrALG+wCBONgCR39GwLdYqtbbuK4rhk2YmNPtBAu216ar7V/0Olzn4iwwL7yz6u 9YupN52U9fmCXAednFPHZt1OstedzQM= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-192-dCAtnkc-MfOcpOzounfbvA-1; Thu, 15 Aug 2024 20:41:08 -0400 X-MC-Unique: dCAtnkc-MfOcpOzounfbvA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 66A7619560B4; Fri, 16 Aug 2024 00:41:06 +0000 (UTC) Received: from localhost (unknown [10.22.8.106]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4A22A19560AA; Fri, 16 Aug 2024 00:41:05 +0000 (UTC) Date: Thu, 15 Aug 2024 21:41:03 -0300 From: "Luis Claudio R. Goncalves" To: linux-rt-users , stable-rt , Steven Rostedt , Sebastian Andrzej Siewior , Daniel Wagner , Tom Zanussi , Clark Williams , Mark Gross , Pavel Machek , Jeff Brady Subject: [PATCH v5.10-rt] rt: dma: fix build issue in at_hdmac Message-ID: Precedence: bulk X-Mailing-List: linux-rt-users@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 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 The functions atc_advance_work() and atc_issue_pending() both have a similar statement return spin_unlock_irqrestore(&atchan->lock, flags); That results in the following errors during the build: drivers/dma/at_hdmac.c: In function ‘atc_advance_work’: ./include/linux/spinlock_rt.h:115:9: error: expected expression before ‘do’ 115 | do { \ | ^~ drivers/dma/at_hdmac.c:487:24: note: in expansion of macro ‘spin_unlock_irqrestore’ 487 | return spin_unlock_irqrestore(&atchan->lock, flags); | ^~~~~~~~~~~~~~~~~~~~~~ ./include/linux/spinlock_rt.h:115:9: error: ‘return’ with a value, in function returning void [-Werror=return-type] 115 | do { \ | ^~ drivers/dma/at_hdmac.c:487:24: note: in expansion of macro ‘spin_unlock_irqrestore’ 487 | return spin_unlock_irqrestore(&atchan->lock, flags); | ^~~~~~~~~~~~~~~~~~~~~~ Fix this by splitting the spin_unlock_irqrestore() call and the return statement in both functions. Signed-off-by: Luis Claudio R. Goncalves --- drivers/dma/at_hdmac.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) Many thanks to Daniel Wagner who spotted and reported this build issue! diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 6a4f9697b574..bdbd85adeea9 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -483,8 +483,10 @@ static void atc_advance_work(struct at_dma_chan *atchan) dev_vdbg(chan2dev(&atchan->chan_common), "advance_work\n"); spin_lock_irqsave(&atchan->lock, flags); - if (atc_chan_is_enabled(atchan) || list_empty(&atchan->active_list)) - return spin_unlock_irqrestore(&atchan->lock, flags); + if (atc_chan_is_enabled(atchan) || list_empty(&atchan->active_list)) { + spin_unlock_irqrestore(&atchan->lock, flags); + return; + } desc = atc_first_active(atchan); /* Remove the transfer node from the active list. */ @@ -1477,8 +1479,10 @@ static void atc_issue_pending(struct dma_chan *chan) dev_vdbg(chan2dev(chan), "issue_pending\n"); spin_lock_irqsave(&atchan->lock, flags); - if (atc_chan_is_enabled(atchan) || list_empty(&atchan->queue)) - return spin_unlock_irqrestore(&atchan->lock, flags); + if (atc_chan_is_enabled(atchan) || list_empty(&atchan->queue)) { + spin_unlock_irqrestore(&atchan->lock, flags); + return; + } desc = atc_first_queued(atchan); list_move_tail(&desc->desc_node, &atchan->active_list); -- 2.46.0