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 4981EC27C6E for ; Fri, 14 Jun 2024 12:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Message-ID:Date:To:Cc:From: Subject:References:In-Reply-To:Content-Transfer-Encoding:MIME-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bAlhxQStFAmZTApOJUn3JrhaamWFbMWxst5fkHbC0gU=; b=Ihw+HSkmDCOL7nP39rg1wb6swH QyAeDC03kGLFkUd5MLxHJdJdjCTzKHlx8r4B3sBaYcTYjhYl14biYZJzlLfeEXmIWPgES/dbllSQc Q1ibMAEIu/7FPBaV4kQ9G+H+w64frKWNMX88MnZhZ9iyiYuyqCzh/irBrXv4ZFgE0AFe3HLLoCynm H+j+okm39tDsox50KDyBe2YHC6faT5t1/XZlQ90B4s6t5poW2jNFa8+0GMdrRHAO6+sVXVilDyN4X 0M7d+DJU/ZC7J3rv+xWmxbRjQzoZT/FQRL6fj2lfRXKpjtKWsEjkZX2Y8BOV5PKig75Wy8TCcDb65 dbqDEKtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sI5bX-00000002ffR-3Z9r; Fri, 14 Jun 2024 12:00:27 +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 1sI5bU-00000002fdb-1sYn; Fri, 14 Jun 2024 12:00:25 +0000 Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3ABA310C4; Fri, 14 Jun 2024 14:00:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718366408; bh=bAlhxQStFAmZTApOJUn3JrhaamWFbMWxst5fkHbC0gU=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Zmo2T1k1JxFY7Ox3jeUaRrzQNPwnyou67p0Hk1qjQkB3kuQV2Vebe+OKunm5vb/6w Ir5w6cx1/YWrUUBK0OxpRjO1wwu1M9hiWtbfIjdOtE+HsGidYNwWwpdRm2W9qKc2kN 4OW8ynggelj4VVeVy9npTBOm2hIudjAUC/aUuGhw= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <104f23d7-9832-4c06-92c7-d3ea84fbf186@gmx.net> References: <20240613194150.2915202-1-kieran.bingham@ideasonboard.com> <20240613194150.2915202-2-kieran.bingham@ideasonboard.com> <082d9df0-0947-4452-a3fc-87eab2019e01@gmx.net> <171836496531.2248009.11650291484570726735@ping.linuxembedded.co.uk> <104f23d7-9832-4c06-92c7-d3ea84fbf186@gmx.net> Subject: Re: [PATCH] staging: vc04_services: vchiq_arm: Fix initialisation check From: Kieran Bingham Cc: Broadcom internal kernel review list , Greg Kroah-Hartman , Laurent Pinchart , Dave Stevenson , detule , Dan Carpenter , BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE , STAGING SUBSYSTEM , open list To: Florian Fainelli , Stefan Wahren , Umang Jain , linux-rpi-kernel@lists.infradead.org Date: Fri, 14 Jun 2024 13:00:19 +0100 Message-ID: <171836641941.2248009.7362589437453917188@ping.linuxembedded.co.uk> User-Agent: alot/0.10 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240614_050024_653688_AD6AC5DF X-CRM114-Status: GOOD ( 15.00 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Stefan Wahren (2024-06-14 12:52:53) > Hi Kieran, >=20 > Am 14.06.24 um 13:36 schrieb Kieran Bingham: > > Hi Stefan, > > > > Sorry, indeed I completely missed this mail. > > > > Quoting Stefan Wahren (2024-06-13 21:01:42) > >> Hi Kieran, > >> > >> Am 13.06.24 um 21:41 schrieb Kieran Bingham: > >>> The vchiq_state used to be obtained through an accessor > >>> which would validate that the VCHIQ had been initialised > >>> correctly with the remote. > >>> > >>> In commit 42a2f6664e18 ("staging: vc04_services: Move global g_state = to > >>> vchiq_state") the global state was moved to the vchiq_mgnt structures > >>> stored as a vchiq instance specific context. This conversion removed = the > >>> helpers and instead replaced users of this helper with the assumption > >>> that the state is always available and the remote connected. > >>> > >>> Fix this broken assumption by re-introducing the logic that was lost > >>> during the conversion. > >> thank you for sending this patch. Maybe it's worth to mention that this > >> patch also drop some unnecessary NULL checks of state. > > I don't understand this comment. Nothing is dropped is it? > > > > The newly added vchiq_remote_initialised() is itself a null-check too! > the vchiq_remote_initialised() only checks the member remote, but not > state itself. From my point of view the null-check for state is > unnecessary, because most of the code already assumed that state is not > null like e.g. in vchiq_open(). >=20 aha, I misread my own code ;-) Of course - I see it now. I'll send v3. -- Kieran