Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3243904rdb; Tue, 6 Feb 2024 11:14:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNlMXPlTuWITFXy5X77XqZHOHEJwUicp9M3Bmchhe2JKXQpytZFg5ydy7lvWSk2XC2T5PD X-Received: by 2002:a05:6a20:9f8c:b0:19e:9cb3:2a49 with SMTP id mm12-20020a056a209f8c00b0019e9cb32a49mr1555538pzb.21.1707246872236; Tue, 06 Feb 2024 11:14:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707246872; cv=pass; d=google.com; s=arc-20160816; b=wx4cxlvgQ0mjxS1K53SKoxeaF4SgZSXlLDzgZ4KVFkwAdia93WLFfUBOk5ErDbsQC+ ph1bhe/djABl2f1PXYNjYVba/nXeytjEDDUH3+ItMqqSeBy7GSfPzlHq1XfqBDVI6Pci E0VnAn4J17miTiGK8uZnUGt/CqMRdXhSCDUj6TF8KdDrIYkWIKAq4f2Inyx+9ewPgB+r A3AmYKtbv8zMCh4nBJfBmwPgdpj4UTg2TVoaqX9Lv9Cm30oj9tyyOLCXkblNjqkLArmb 780ty+ChmXaoIWi96mtSthcsHPep0fRLwW/nZYM3RYJK58CgHilRfw+E4Gc8ak5MxYyq 5SBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=McDF83SqW1QdyD+7tudNz9OwaUHXbfqRvg49t9XHoHA=; fh=4Y+92/8ysb4O9zC5G2F24ZRF3oYP5Q7E1U10Gp00cSA=; b=Ird71SdsS/Y2ZsyXudfhcFnpIaDuoqqwQxa2B8nVeDz7duQlFTfL9ZYC6TFCScUI6a TkCa59WVuSqNwD1hKSWjA1O8xIOCLAZZa53cWuWIOLC9YjcUEkvwcAtK8FYV5XZBuR4x SZn0QvDqqc/8rK9RlSWNxW6cw8lgjyCivEi6VI2hs0vb8psZGPLV212otLzKwaqpQ2x6 xdLYm/B/01PakIgQ0HtL6RG8saHQ/EkUKAR+fAd+hQDSeAvqFOFYXgBaW75y0WpHXBZP ava6e0ff32yYAG9YgZAe4PBIfHSOnxwJuBFLQdfyGwr0seHkL9RXbns4Cljn13rtBRtp OjbA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AbBvkPpz; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-55540-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55540-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=1; AJvYcCW8vkslvvqgnX7/GpYZ2n9SXETIS1t8MdN+JaF1+2LOjAYbHgOHfXaszHlK7fnEW8ppKgJXqUY4g4m41sgscNeBlupvtX5SZdZX5lBCfg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d16-20020a056a00199000b006e04bccfdefsi2084197pfl.138.2024.02.06.11.14.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 11:14:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55540-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AbBvkPpz; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-55540-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55540-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id CF32BB24693 for ; Tue, 6 Feb 2024 19:07:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F17231400F; Tue, 6 Feb 2024 19:07:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="AbBvkPpz" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 697C613FE2; Tue, 6 Feb 2024 19:07:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707246458; cv=none; b=bzYHqLvSfYnIjM8G6nnzKfjVuDK87lVynebMLkVfp4r31LehS0unirOH6+F5Bn5LDFdkvNf5eDH/rG8AyLKpQ+dOtSn2sU3bILqkXWUmFZer7MY/4DZjZYvKbOT0Ly7+c5BTJrS2Td/mYPRr7HMG704d55x3YkX9QJjjpLOR2ho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707246458; c=relaxed/simple; bh=fcUpuXMDio+yishakHJrhuMm+7x1jRFTokuTht7ioxs=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=l7IxR+8Yhlaqg6vHlxpXN340i2M0LJpVcRg/GRpyHjWva/nSrouB1zGD5Vk4nzkCIAy622Sr1+BYatZ5lssmmCUHXtPTfAhB+y/TcUVNeyePXGYsqfQVLtp0vAPpsTEQDyenu4AD7y8H/X8vRuTZAZ8XbciyyaFxh3SXC/MLUFY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=AbBvkPpz; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 416J7T6K097971; Tue, 6 Feb 2024 13:07:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707246449; bh=McDF83SqW1QdyD+7tudNz9OwaUHXbfqRvg49t9XHoHA=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=AbBvkPpzp1KmZVlOd/gA9MzseMYs0IY8wHEybpvI5aWa6lyfHVQ/Hab2owaFYAx6+ FKxK/FymB9XIhgrRZP8Vjh5AnUJU+C1FaHCvsWDVuNudm8kLIqOKoa/zUMdlMXRqIm VvD68Tk5/vcH+9ALaTw49DhF/igjQcTU7xlTm6SA= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 416J7TcP011106 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Feb 2024 13:07:29 -0600 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 6 Feb 2024 13:07:29 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 6 Feb 2024 13:07:29 -0600 Received: from [10.249.42.149] ([10.249.42.149]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 416J7SVl002592; Tue, 6 Feb 2024 13:07:28 -0600 Message-ID: Date: Tue, 6 Feb 2024 13:07:28 -0600 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 2/4] hwspinlock: omap: Use devm_pm_runtime_enable() helper Content-Language: en-US To: Bjorn Andersson CC: Baolin Wang , , , References: <20240123160405.360437-1-afd@ti.com> <20240123160405.360437-2-afd@ti.com> <73jxbyqatxc7r56df2iweewb22qvmqo33rhpsu3darczn7ldof@p2qepqpdf5ds> From: Andrew Davis In-Reply-To: <73jxbyqatxc7r56df2iweewb22qvmqo33rhpsu3darczn7ldof@p2qepqpdf5ds> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 2/6/24 1:06 PM, Bjorn Andersson wrote: > On Tue, Jan 23, 2024 at 10:04:03AM -0600, Andrew Davis wrote: >> This disables runtime PM on module exit, allowing us to simplify >> the probe exit path and remove callbacks. Do that here. > > As with the later patch, unless I'm misreading the code, you already do > disable runtime PM in omap_hwspinlock_remove(). > Right, what I meant to say in the commit message was "This disables runtime PM on module exit *automatically for us*.." As in we don't have to manually do it anymore, and that simplifies the code, which is the "fix" that this patch does. Will update the commit message to make that more clear in this and the next patch. >> >> Signed-off-by: Andrew Davis >> --- >> drivers/hwspinlock/omap_hwspinlock.c | 26 ++++++++------------------ >> 1 file changed, 8 insertions(+), 18 deletions(-) >> >> diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c > [..] >> @@ -129,16 +125,12 @@ static int omap_hwspinlock_probe(struct platform_device *pdev) >> ret = hwspin_lock_register(bank, &pdev->dev, &omap_hwspinlock_ops, >> base_id, num_locks); >> if (ret) >> - goto runtime_err; >> + return ret; >> >> dev_dbg(&pdev->dev, "Registered %d locks with HwSpinlock core\n", >> num_locks); > > I don't fancy these debug information messages, there are other ways to > confirm that the device probed successfully etc. > > Now that you don't need the goto runtime_err, I'd prefer the tail of > this function: > > return hwspin_lock_register(...); > Sure, will update. Thanks, Andrew > Regards, > Bjorn > >> >> return 0; >> - >> -runtime_err: >> - pm_runtime_disable(&pdev->dev); >> - return ret; >> } >> >> static void omap_hwspinlock_remove(struct platform_device *pdev) >> @@ -151,8 +143,6 @@ static void omap_hwspinlock_remove(struct platform_device *pdev) >> dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret); >> return; >> } >> - >> - pm_runtime_disable(&pdev->dev); >> } >> >> static const struct of_device_id omap_hwspinlock_of_match[] = { >> -- >> 2.39.2 >>