Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp749035lqs; Fri, 14 Jun 2024 04:53:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtmUBLu85VvoVI6AHRX5mgvK75HzeHKyNu2dIaLAhR5i++eYEfPx3VRv7JZF079IBDKy2os6U2oKs8CLG9XIq2OXGeIwOrF1EMhV1oUg== X-Google-Smtp-Source: AGHT+IEq3YTaJDgV0Y4R2tgXLHnt+vtbBs3q1XSD6qLG5decAecEOczSrhPOGHoUzdgeFsj859wk X-Received: by 2002:a0c:8e42:0:b0:6b1:e371:99c5 with SMTP id 6a1803df08f44-6b2afc7657emr24278326d6.7.1718365994452; Fri, 14 Jun 2024 04:53:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718365994; cv=pass; d=google.com; s=arc-20160816; b=BIcHKONIOqpGk/it6jkS9hSoexALFCD/MZBMZun8Gl+ZPY69mZVf6bkjiFfMaEiJgV W0IWO2tEyZPpSPoivkeSY+16xU0nXF/2SE7pO9ENvBPw1nN+HhlWLr+3KVshlS2IIbDz 4OykyJrXM553IyvuSHHjUZN3C+ZCyC2dxoqacCtOmB2Vx9Cb6FHZTMZtsqipD3cXL56z MfSN0nVMMVB+5vDgQ6sX8QLTtFzno+yQautMQveR0AY4M+4yn+OfS4Awn38GvpzsDLAA gPNdbe5cYZb5vT5Ubgr8JUZ+oeOHCcH59LX3/7YHfHC8Xuj+e10Azieced17pV3QsX3L g3Vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=yXlthA35cfeR1MyCqMf03r9IKObV2EtyLUo+AVV/Vro=; fh=vSvqfmYikVEPG8Pgt4bvunThRiuArJupGVvk9Wak4rA=; b=s8cPpUulwu8BApUH5ju7IVZI+3uxA1zFTZrm/KARO06ko91bZckotf2JorQ8rONs4S 9a9ovSXwR8jjXryn7j6r6mNr2pFfZKOqUtxBpsE8wl2T3ML2WP+XzMWRUi0UYfTLwjpe risx6WCyJQ0xtiKX16VL8V8SdWfGG7uQrJDf73vEtrSDNplIc+/XCl5nHYmP54FeMLvn yKkFEtZdH04++o21mvwIod97rtx9LaC8uJhFoqDXLwc/bTwbhKWFuTci6OnysmP1RUrM 1W1TTsXo1QD1g0HjMtPHp4bgW+bVPG3t4H5Z9JAQOaT7pOqtze3lVHukBwGMqZ3amZit ngbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.net header.s=s31663417 header.b=jSRi3hoV; arc=pass (i=1 spf=pass spfdomain=gmx.net dkim=pass dkdomain=gmx.net dmarc=pass fromdomain=gmx.net); spf=pass (google.com: domain of linux-kernel+bounces-214849-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214849-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5a16056si36356986d6.98.2024.06.14.04.53.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 04:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214849-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=s31663417 header.b=jSRi3hoV; arc=pass (i=1 spf=pass spfdomain=gmx.net dkim=pass dkdomain=gmx.net dmarc=pass fromdomain=gmx.net); spf=pass (google.com: domain of linux-kernel+bounces-214849-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214849-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.net 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2DDE11C21275 for ; Fri, 14 Jun 2024 11:53:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B9CD195F3B; Fri, 14 Jun 2024 11:53:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="jSRi3hoV" Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (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 425D7195B16; Fri, 14 Jun 2024 11:53:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718365987; cv=none; b=qUKxWhsq1bGWYKdNbz2LtIp6yF4Xz/O12ei23fwC1duPsgPw3z4vS1Q86JGJw2loZzX+qDGdWJBwKlet9j8fAWpOnDhYWQjyfIuFY1DQtjcWQiB/NP1/yV+EfRtoSGFg4dKaylaEqxwqZMg5nrCBsRVLbYHJDtfTXKn0Y/Zn5zE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718365987; c=relaxed/simple; bh=yXlthA35cfeR1MyCqMf03r9IKObV2EtyLUo+AVV/Vro=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jEdlZLCRUKNhmle0MyL/vWEY5PyzpUooQal/mT8NpycfFAdbXOGP6+9regFAGNdwhs1x6aCaUgNit/WucPsTCvvi102EH7m9r6Eez07GB/sqYsGr3QdhpjMKBQMeNOBlEqi0J3hBUIrA4JKURum9/nwzG/FsVmYNAR1I0ag8iZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=jSRi3hoV; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1718365974; x=1718970774; i=wahrenst@gmx.net; bh=yXlthA35cfeR1MyCqMf03r9IKObV2EtyLUo+AVV/Vro=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=jSRi3hoVb9fpg50ybPceUfzasqRGeUGCQScWAanhuSGs68EP3jDH3DhykHPIepyQ zUPKpDxbp/J+rvqRCAOSRJQOss9XmxRp8H39dDk0BuE6x2RVIE5viUsOv0ThxQU1b O4Z9rGijZAttQCijhjMyC1hXa4Cz9buI152d+d2cG6uRchrkQoA+xoLpMCcP6LKhe oMyMZogjFAdkh7QNXyQqAZb7tUV5h6WcbfuUklPGw5vnGClgcF0f0/17v1M1G+F/S cVOI9MjymMoqywh8Z/d+cP5Ac0AyJH9d4xN11t6/pp6IGSjtTrii6qbkB/buPBy7R AmbS+bc+iQil8/wO5A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.1.127] ([37.4.248.43]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N3KTo-1sRbjI2CNm-00xcPN; Fri, 14 Jun 2024 13:52:54 +0200 Message-ID: <104f23d7-9832-4c06-92c7-d3ea84fbf186@gmx.net> Date: Fri, 14 Jun 2024 13:52:53 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] staging: vc04_services: vchiq_arm: Fix initialisation check To: Kieran Bingham , Florian Fainelli , Umang Jain , linux-rpi-kernel@lists.infradead.org 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 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> Content-Language: en-US From: Stefan Wahren In-Reply-To: <171836496531.2248009.11650291484570726735@ping.linuxembedded.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:IVK4kVk1lkaB2alF6g8ChP2vH4UwkZn8RCqNsu2RrEnfQ0h8pe0 max8l1w/pnF0r8yIx4wki094uvcbytMdLSXwBH2TegYE/V0Fz+C2YxWw+/vWp/pXHxiSP+/ QHS0L5YUA8XoL2mG98ZGIb2XMDXFC1Ee5x+36USWU/5GTC2pC5HX62AltQ3iirNaVgwiuPU EJx+CE9LbCZotQYhWTJ+A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:IXSy47jmsJA=;XxNo+wybPSb96wXOawF84Ikkh0p Rxq85Y5W1LmlQ75ZCF9PeU1SS2wWfKQMNXGf42CYSTlhVWdvOLCJbv2fb3YP3EY4He+OycHuy lOM8LIF/YpXDy3WjGtmx03wFUMPeas9OK7kx+g6SUVNlG7tHTRmvrxuXXaMz/HRwgd8NTfGH3 bOfem205pxAzu7yigz32OckVyvS7B3Trw7pkLoIN/152O6BoqcyQB5dPMyFtwM9Q/gZ0i3Rqo yCVBsF87VeBHrFJfzqn+JTncXlbXvHZ1/i7ypDibf6o6kJ+GdLUtbiaW7XbXcqt64RIA//xFC y/jJ8nQb0ppv+3qDpy5zwh8RPdQ8nO+ZfGO3Y/15VMBqGJ1sgiWQXImyqcC2UQ9SOfbeKyIUr vW3bW5oqXdOe2N+GVd4qzcRAFMqw2OeXiehLmD9ErcWr799OriQsdhpHO9LhN/9laFD2jb1ZI bhe1+S5kUUvs3xYOthYFSHw6OTvdHZ9vTHt58hMZ0Vq1OBW/J6baViuL1TcqHo4sTzRrxsS+x k9EtI5800/fxANiC1UAi8KocV0oeN54XtoevGFKkriB1nbB0VCikWr88rXeZDbSeu1FJKq+78 b0KuD4ozxrMz02vqhiXnTjH08kdh1gykQSfLlR/b3IZi3xk955MHI2zqZId2labtlCKK9YEKR /nOecab2yKKLHBRj0d9BC65u5BdVU9j+4G8DRoaQG1J6PpsQ4jKx+qdOCB5R4ldMlWQmloLSr SRnvqX8rhCzRF3zYQqaEWX/4vWCKE6SMCXpmL4/numP8be0dQwYpdGnpUm0Wwxsb6FJIE58WU x45/5ZQVFnDiSFgl4NQmpYGy2gHdmP1iuCfEGQ4A3x8ts= Hi Kieran, 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 t= o >>> vchiq_state") the global state was moved to the vchiq_mgnt structures >>> stored as a vchiq instance specific context. This conversion removed t= he >>> 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().