From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3CF0DC25B76 for ; Wed, 5 Jun 2024 07:10:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f0pRe9I9FCnJioyWKMrsyPVlX6FYMGLGvq6CFWr0m4Y=; b=gYVFXlrfofWAIU tVu3R3q8n8plgtTlvA9GU0M6LtjqHBXZ8vRsxMmNL/hl3gse20JTbIG9+xsj6g0LUaNxAXjh9dZQD 6Kv3YCZIdKOA/P2Oh2bIbq/pcEOYI+chmEUVat9UD/JTsPb5Pa0nSbBI0ZDV/ayKYmotLKZe3zHmj mtt2ZTOwou5rxwR8F+kYpohsVGxR3dh2csBpRORl+pPyTkJhwohPCfELlqUOWprmK//ZmeL8yrJma BGfc843Cx8Q71IheMCYDYYZTeGrPycQH5C2e6KiYWFjSxiovN6x5eMD4iTcUo1eh0Enbmy7m91VRP U38cUgSOdYYFC/6wE4gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEknE-00000004wGP-3Hk1; Wed, 05 Jun 2024 07:10:44 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEknC-00000004wFY-12wZ for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2024 07:10:43 +0000 Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 75F08BEB; Wed, 5 Jun 2024 09:10:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717571432; bh=FlyDA7hSBcLk27B60r6BgU4NIm4yp715BkqHmqInYBM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OahbQad+E98NwcB6EaopIO3pfmjW4BkGjjBFa0vlswGyIZKGeVaPGR5LEAHKMiTRK 26GO0LCoGq0YTYwv+yUM/FtppvcYScO/1TPR5/JojfDp3pzNWMHqFjO8pr0vz/Ss6J 0ychSLZjMBww2wuCY/0VjT56KJeyFptq5W3AvGqQ= Date: Wed, 5 Jun 2024 10:10:24 +0300 From: Laurent Pinchart To: Stefan Wahren Cc: Greg Kroah-Hartman , Florian Fainelli , Umang Jain , linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Phil Elwell Subject: Re: [PATCH 08/11] staging: vchiq_core: Add comments to mutex/spinlocks Message-ID: <20240605071024.GC3488@pendragon.ideasonboard.com> References: <20240604172904.61613-1-wahrenst@gmx.net> <20240604172904.61613-9-wahrenst@gmx.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240604172904.61613-9-wahrenst@gmx.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240605_001042_570845_35C3CF90 X-CRM114-Status: GOOD ( 18.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Stefan and Phil, Thank you for the patch. On Tue, Jun 04, 2024 at 07:29:01PM +0200, Stefan Wahren wrote: > From: Phil Elwell > > checkpatch.pl complains about missing comments at > mutex/spinlock definitions. So add them accordingly. Less warnings is good, but we should address the problem they outline, not just silence them for the sake of it. It would be better, for each lock, to explicitly list the data fields the lock protects. > Link: https://github.com/raspberrypi/linux/pull/6139/ > Signed-off-by: Phil Elwell > Signed-off-by: Stefan Wahren > --- > .../vc04_services/interface/vchiq_arm/vchiq_core.h | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h > index 3c7a6838ddba..3abcd6910f25 100644 > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h > @@ -196,6 +196,8 @@ struct vchiq_service { > > struct completion remove_event; > struct completion bulk_remove_event; > + > + /* Serialise access to the bulk transfer queues */ > struct mutex bulk_mutex; > > struct service_stats_struct { > @@ -312,7 +314,7 @@ struct vchiq_state { > /* Event indicating connect message received */ > struct completion connect; > > - /* Mutex protecting services */ > + /* Mutex protecting service creation */ > struct mutex mutex; > struct vchiq_instance **instance; > > @@ -341,16 +343,22 @@ struct vchiq_state { > char *rx_data; > struct vchiq_slot_info *rx_info; > > + /* Serialise access to the main message slots */ > struct mutex slot_mutex; > > + /* Serialise slot refcount updates */ > struct mutex recycle_mutex; > > + /* Serialise access to the single synchronous message slot */ > struct mutex sync_mutex; > > + /* Serialise access to the message queues to userspace */ > spinlock_t msg_queue_spinlock; > > + /* Serialise completion of blocking transfers */ > spinlock_t bulk_waiter_spinlock; > > + /* Serialise updates to slot quota data */ > spinlock_t quota_spinlock; > > /* -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel