Message ID | 20240123184632.725054-5-afd@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-35888-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp537321dyi; Tue, 23 Jan 2024 10:48:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhpjh91fCaFk6BcM9FDB/EUczouKFsKa5s0mvML7YKd5foO5SFN6hSfUtbIrlPfsIK6R7r X-Received: by 2002:a05:6512:3117:b0:510:56f:293 with SMTP id n23-20020a056512311700b00510056f0293mr788241lfb.46.1706035682082; Tue, 23 Jan 2024 10:48:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706035682; cv=pass; d=google.com; s=arc-20160816; b=FwodKPFaA0I7WItCa20ljsCcmSJXb/YoxVY9Pp/fR0bnIfB2wKaaY82ijlyufjqbBr dArDHwwzlaY9am5kDTR2pv5bCF61Cm/LJdWQCPIEWUw7hyQW7NTtr4mEN0FVngOFhrqH Ha7ytkmpYqWhgfJ7kTtgu2Uv3W0vUFbe0OIYTCzVixuV+X/+u3pyZYsUPhRiwiVSmAY0 GYTgaqBQwfv8ARIskwvWmXW/8Gw5hZvRarmTAbgfhvkj7AxcW71BH4cAC6+XJpny3VVe A3UuwY6gNOXjLGUJp7iKFQqyi+xyA23A9VOY2GLzR1xXj3ayj9Es4tInPCJwXaZMiSBS LIAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=4OoYou47DqNz8DYkVnH3Oy3op4du31DW+m2rH224CIM=; fh=rmmMs/JsOUVHi++Wrl5ML8j1LcPsVgqH/ULrQQY0bCs=; b=Sy4sqyi3+HA7AzAWBJkInk9e6aKJRm+62a9Bg3X/M3OtrX0XLIbz5AVuEMdlfdpI/r Z6FUT8NgarZoBFfQa74bOZHLBh3RDAq7GCyqGpUD3bnoR9XoNHg5859Cc0jamXT/Cif3 WZkHcdRP1Sta1yKah//aHGxO41+Qj00zxn2L9gun535BHSQze3ZXHDMp8TOKYoJpUio0 NwQr63k9WBZQu0l/X+Qtir71I66VSPp1KQICZkKLKYMzoKwaailCH9IH7UHxgqpOJXaB 5MHI17BvGMo6BNU4mpe/wlpMOMiQKWsZWh8gHRhIcf+S+Mr0AvaV/sVznxiWr30QOmfZ R6tw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=slWbiOLO; 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-35888-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35888-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bn3-20020a170906c0c300b00a2356f4c943si11464736ejb.866.2024.01.23.10.48.01 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 10:48:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35888-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=slWbiOLO; 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-35888-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35888-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id AF35E1F22A9D for <ouuuleilei@gmail.com>; Tue, 23 Jan 2024 18:48:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A5AD86135; Tue, 23 Jan 2024 18:46:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="slWbiOLO" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 37BA381AD4; Tue, 23 Jan 2024 18:46:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706035613; cv=none; b=Jnak3TnAU1XtDkm/E1iFiEEEeTE8TTBVoW6D7aV4ZIYv5blU1sg5l/TLtDgyjQPctPZuk0yhWH1bEQnDdkZ1lqklZl5fAQl8giIC5sPlUB3fnXpu/pWCkU7kgulO5CqiidXWw7rFOuZ91+TmdJU4TtE6MlI9rKC//F76ev7kpTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706035613; c=relaxed/simple; bh=Hyb1VGFfyYopkNLIcjNsDib+wPbRe4qUv62+iaxQRf8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=g6W3ZVEDJgiqamYerxiwtmpO4nays5cY055QK/Ecq6YoNL4GdkdGE7IX5165pvZbjFsN/gnG0wIzRtBqXurg0hu84R8su3bhyDaPwv3WgRgIaNYlMk/vHwLy+2a8N7WSbs702cEzz9Ywrm09g4dX7GsGKV6IlSyqEC/s74qAcD0= 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=slWbiOLO; arc=none smtp.client-ip=198.47.23.249 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 lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40NIkbEZ010747; Tue, 23 Jan 2024 12:46:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1706035597; bh=4OoYou47DqNz8DYkVnH3Oy3op4du31DW+m2rH224CIM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=slWbiOLOWkUwicHCeQTOVUcxkWi/h6xs4ar0Kyquf/76Cub3LdAdpDE665xb6DtX+ LEO9UFmvl6X6Gq+MlgWp8M12X+8l23qmonl+2e92kqx8onmxf3xjUyqTqwNGu3Wk3+ 0oKnWFTsjCcBF4OyjWdeuLSjzTGi5WJS4AEOSY0I= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40NIkb2b011067 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 Jan 2024 12:46:37 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 23 Jan 2024 12:46:36 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE111.ent.ti.com (157.170.170.22) 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, 23 Jan 2024 12:46:36 -0600 Received: from lelvsmtp5.itg.ti.com ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40NIkX1u063265; Tue, 23 Jan 2024 12:46:36 -0600 From: Andrew Davis <afd@ti.com> To: Bjorn Andersson <andersson@kernel.org>, Mathieu Poirier <mathieu.poirier@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, Konrad Dybcio <konrad.dybcio@linaro.org>, Patrice Chotard <patrice.chotard@foss.st.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com> CC: <linux-remoteproc@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, Andrew Davis <afd@ti.com> Subject: [PATCH 5/9] remoteproc: qcom_q6v5_pas: Use devm_rproc_alloc() helper Date: Tue, 23 Jan 2024 12:46:28 -0600 Message-ID: <20240123184632.725054-5-afd@ti.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240123184632.725054-1-afd@ti.com> References: <20240123184632.725054-1-afd@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788908071228587206 X-GMAIL-MSGID: 1788908071228587206 |
Series |
[1/9] remoteproc: imx_dsp_rproc: Use devm_rproc_alloc() helper
|
|
Commit Message
Andrew Davis
Jan. 23, 2024, 6:46 p.m. UTC
Use the device lifecycle managed allocation function. This helps prevent
mistakes like freeing out of order in cleanup functions and forgetting to
free on error paths.
Signed-off-by: Andrew Davis <afd@ti.com>
---
drivers/remoteproc/qcom_q6v5_pas.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index a9dd58608052c..60b0cd30c0592 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -678,7 +678,7 @@ static int adsp_probe(struct platform_device *pdev) if (desc->minidump_id) ops = &adsp_minidump_ops; - rproc = rproc_alloc(&pdev->dev, pdev->name, ops, fw_name, sizeof(*adsp)); + rproc = devm_rproc_alloc(&pdev->dev, pdev->name, ops, fw_name, sizeof(*adsp)); if (!rproc) { dev_err(&pdev->dev, "unable to allocate remoteproc\n"); @@ -754,7 +754,6 @@ static int adsp_probe(struct platform_device *pdev) adsp_pds_detach(adsp, adsp->proxy_pds, adsp->proxy_pd_count); free_rproc: device_init_wakeup(adsp->dev, false); - rproc_free(rproc); return ret; } @@ -773,7 +772,6 @@ static void adsp_remove(struct platform_device *pdev) qcom_remove_ssr_subdev(adsp->rproc, &adsp->ssr_subdev); adsp_pds_detach(adsp, adsp->proxy_pds, adsp->proxy_pd_count); device_init_wakeup(adsp->dev, false); - rproc_free(adsp->rproc); } static const struct adsp_data adsp_resource_init = {