Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1021266lqg; Sat, 2 Mar 2024 11:25:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQ4dIcQqPgMF2SezIpkSOEwNr1z15ZzNAy2njXmFhYrBgZLprXNlLWcM/RFhSZ8klMsKqPlVKML00ERa1QmcV8Ih2kUOEoslWXB65AEA== X-Google-Smtp-Source: AGHT+IFQeGJftyeCxqQ/nVxXhtDGopOZ4v3GMHySxxvWvOLjYM9Ke/zeZdYpZ6nnu9N+Cv2TeFrr X-Received: by 2002:a17:90b:188a:b0:29a:ca83:19a1 with SMTP id mn10-20020a17090b188a00b0029aca8319a1mr3772858pjb.33.1709407557294; Sat, 02 Mar 2024 11:25:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709407557; cv=pass; d=google.com; s=arc-20160816; b=q8svtl/X3nhjTmGreL4BOAjlydXqWRQc4medkB7NhByL5wbYhrDJWywa3sLDdQf6lM Tl0Lfiinao4mAAJz1DMTmASHUp22qIX8oPt5D9JenttPfO1yELgvS47vWSoB/YHAJ9RE l++m77p50O9d6i0B/w068SaZPZQ76NaE2JHmYT64a/XTl/EJ13gVNZm6QAYI5KVA2iOK jXzsY/K39wgYn+HPq8HtYstfEnopuCg8TuXRjek7qqYdRaqTz1CVIYvbGeTM7nzdKyH9 lnIR/gvJ8PcX8fIxF6hA9+TqYhLvnV9Erzsnhi9nX5zY255930bI9bqwMwfWrEhOfbRK Y69Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MEFycyZ3eNJzWHC/dO96pDHHmxDAxlU0JfxwFJA8T7o=; fh=PEkH9v0Zmj/RlPLDCbcKTtjdUyBUqfhfh12IfknXudU=; b=ZnSKs1niN/wK6LEBXmp60eikpCpSPTHj8wfuUCzawCy5XjUjeXN0jcCZNcbhwj96rU kY6s8NGigGGfV/qemWMSkrIvfHK0Gtj9BdPjlnMH832DumWIqSol5i1vkot+pOdj3ClD iobzBY4onsnoCKbpp4tZyjFcXYZbOVoSZ0NI3FqZLFMpgBVkf4YPQDFvHZCL1Yr4yUJ+ c3AD5z0eNDhJEYtEThAp8yP9nbFbfFl2+BC2j9TyQrvX7VYU14RO/Tm05WWQSVok2BPd 6cvub8e94EL3L6p7zzSx9QHVjcwxAAx2ZZYbl3gH0BK+UoDM8o8VkPRUp5dlgCP234GP DQJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I2Kzifhm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-89566-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89566-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id na12-20020a17090b4c0c00b0029b2404161fsi3696354pjb.82.2024.03.02.11.25.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Mar 2024 11:25:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89566-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I2Kzifhm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-89566-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89566-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E2BB1284214 for ; Sat, 2 Mar 2024 19:25:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 751713FE5D; Sat, 2 Mar 2024 19:25:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I2Kzifhm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9951629D11; Sat, 2 Mar 2024 19:25:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709407548; cv=none; b=q/XW9qnBMxhKpqUHhzi6e8fCocExCoPXDJiAXrLaRrpKFJppjQiYAvQWVb+8QqtyO2UxdnBVWdZb7xu1IrD9ebOxw2dr7SXPHT7koQ41/aWWVjpDxgbQBBAfZ8yejB2Cs0ldt+GhRqdfKGMix4Ro9wc6TqR/bWquoEUypfNij7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709407548; c=relaxed/simple; bh=MeR1UFYMjfBi5U2g3HdYII+Nu312YIrJkntoZr+VBJs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gGxJwdYSi27gQp11wdl8iPMorluWcUIYuRBphVVEjWyM7YVDhD5vgJlmG1zsvqvMyRyZGPfeevJAU2EBQ7ujxjy0xcJbrEDKlE/14P38WhGW5ANuVGQdvHvihCz+f7TUmNvmojo6eamZRamcGwBWw5rG9ag8u1QGBJ9tNHh2T7s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I2Kzifhm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99732C433C7; Sat, 2 Mar 2024 19:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709407548; bh=MeR1UFYMjfBi5U2g3HdYII+Nu312YIrJkntoZr+VBJs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I2Kzifhm6objQzgMOTMsNyAoYekMxHI4OG7SvlsgPOHHeTHQX8l1s8tJa2q68ws2A LJZ7lm25zihEimMiTjFTBAWnfGuYGEbTY5xEoUZcXNjIg0kFgk+vp008DpJOKAOsAW hZ8m4vMx2zQQ2+tlPg0Vt1zRr21knKQ8XrVEdqs7GfMX8QoZNJZnE5VoJcctG2IB/n pa2kSguPZB+Y+CZ7uSjJlZkhFSe0t2uJBv7uDhNl5kKY6v+Xha6YN+qLvwBn/W43/l gbAxa5aQ+a9mCWY/9iYn1FF9bBjHuyAZNIPzPWJM2FyBrpKQdLuB7yGjZglvVG0x6T wk2EDBVAYRqMQ== Date: Sat, 2 Mar 2024 13:25:45 -0600 From: Bjorn Andersson To: Mukesh Ojha Cc: konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linus.walleij@linaro.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v12 7/9] firmware: qcom: scm: Fix __scm->dev assignement Message-ID: References: <20240227155308.18395-1-quic_mojha@quicinc.com> <20240227155308.18395-8-quic_mojha@quicinc.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240227155308.18395-8-quic_mojha@quicinc.com> On Tue, Feb 27, 2024 at 09:23:06PM +0530, Mukesh Ojha wrote: > qcom_scm_is_available() gives wrong indication if __scm > is initialized but __scm->dev is not. > > Fix this appropriately by making sure if __scm is > initialized and then it is associated with its > device. > This seems like a bug fix, and should as such have a Fixes: tag and probably Cc: stable@vger.kernel.org > Signed-off-by: Mukesh Ojha > --- > drivers/firmware/qcom/qcom_scm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c > index 6c252cddd44e..6f14254c0c10 100644 > --- a/drivers/firmware/qcom/qcom_scm.c > +++ b/drivers/firmware/qcom/qcom_scm.c > @@ -1859,6 +1859,7 @@ static int qcom_scm_probe(struct platform_device *pdev) > if (!scm) > return -ENOMEM; > > + scm->dev = &pdev->dev; > ret = qcom_scm_find_dload_address(&pdev->dev, &scm->dload_mode_addr); > if (ret < 0) > return ret; > @@ -1895,7 +1896,6 @@ static int qcom_scm_probe(struct platform_device *pdev) > return ret; > > __scm = scm; > - __scm->dev = &pdev->dev; Is it sufficient to just move the line up, or do we need a barrier of some sort here? Regards, Bjorn > > init_completion(&__scm->waitq_comp); > > -- > 2.43.0.254.ga26002b62827 >