public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH ath-next] wifi: ath10k: use non devm for nvmem_cell_get
@ 2026-02-23  2:48 Rosen Penev
  2026-02-23 20:52 ` Loic Poulain
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-02-23  2:48 UTC (permalink / raw)
  To: linux-wireless
  Cc: Jeff Johnson, open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER,
	open list

There's absolutely no need to extend the lifetime of cell to post
removal of the driver. It's only used in this function.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 5c5bd5ef7175..38c5f5f95433 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1981,13 +1981,14 @@ static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name)
 	size_t len;
 	int ret;

-	cell = devm_nvmem_cell_get(ar->dev, cell_name);
+	cell = nvmem_cell_get(ar->dev, cell_name);
 	if (IS_ERR(cell)) {
 		ret = PTR_ERR(cell);
 		return ret;
 	}

 	buf = nvmem_cell_read(cell, &len);
+	nvmem_cell_put(cell);
 	if (IS_ERR(buf))
 		return PTR_ERR(buf);

--
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH ath-next] wifi: ath10k: use non devm for nvmem_cell_get
  2026-02-23  2:48 [PATCH ath-next] wifi: ath10k: use non devm for nvmem_cell_get Rosen Penev
@ 2026-02-23 20:52 ` Loic Poulain
  0 siblings, 0 replies; 2+ messages in thread
From: Loic Poulain @ 2026-02-23 20:52 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-wireless, Jeff Johnson,
	open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER, open list

On Mon, Feb 23, 2026 at 3:49 AM Rosen Penev <rosenp@gmail.com> wrote:
>
> There's absolutely no need to extend the lifetime of cell to post
> removal of the driver. It's only used in this function.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>

> ---
>  drivers/net/wireless/ath/ath10k/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
> index 5c5bd5ef7175..38c5f5f95433 100644
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -1981,13 +1981,14 @@ static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name)
>         size_t len;
>         int ret;
>
> -       cell = devm_nvmem_cell_get(ar->dev, cell_name);
> +       cell = nvmem_cell_get(ar->dev, cell_name);
>         if (IS_ERR(cell)) {
>                 ret = PTR_ERR(cell);
>                 return ret;
>         }
>
>         buf = nvmem_cell_read(cell, &len);
> +       nvmem_cell_put(cell);
>         if (IS_ERR(buf))
>                 return PTR_ERR(buf);
>
> --
> 2.53.0
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-23 20:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23  2:48 [PATCH ath-next] wifi: ath10k: use non devm for nvmem_cell_get Rosen Penev
2026-02-23 20:52 ` Loic Poulain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox