From d4de7bcdff2f9e18d8b5815b1ef23be43a304594 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Mon, 12 Apr 2021 14:55:17 +0800 Subject: [PATCH] rk: Replace deprecated PTR_RET MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to commit fad7c9020948 ("err.h: remove deprecated PTR_RET for good"). Initially, commit fa9ee9c4b988 ("include/linux/err.h: add a function to cast error-pointers to a return value") from Uwe Kleine-König introduced PTR_RET in 03/2011. Then, in 07/2013, commit 6e8b8726ad50 ("PTR_RET is now PTR_ERR_OR_ZERO") from Rusty Russell renamed PTR_RET to PTR_ERR_OR_ZERO, and left PTR_RET as deprecated-marked alias. After six years since the renaming and various repeated cleanups in the meantime, it is time to finally remove the deprecated PTR_RET for good. Change-Id: I2b5d464dc1c6bc0409e41dd9da503f14bef17dc7 Signed-off-by: Tao Huang --- drivers/gpu/arm/mali400/mali/linux/mali_memory_dma_buf.c | 2 +- sound/soc/codecs/es7210.c | 2 +- sound/soc/codecs/es7243e.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/arm/mali400/mali/linux/mali_memory_dma_buf.c b/drivers/gpu/arm/mali400/mali/linux/mali_memory_dma_buf.c index 38c7ab228b57..1f4565127a6b 100755 --- a/drivers/gpu/arm/mali400/mali/linux/mali_memory_dma_buf.c +++ b/drivers/gpu/arm/mali400/mali/linux/mali_memory_dma_buf.c @@ -258,7 +258,7 @@ int mali_dma_buf_get_size(struct mali_session_data *session, _mali_uk_dma_buf_ge buf = dma_buf_get(fd); if (IS_ERR_OR_NULL(buf)) { MALI_DEBUG_PRINT_ERROR(("Failed to get dma-buf from fd: %d\n", fd)); - return PTR_RET(buf); + return PTR_ERR_OR_ZERO(buf); } if (0 != put_user(buf->size, &user_arg->size)) { diff --git a/sound/soc/codecs/es7210.c b/sound/soc/codecs/es7210.c index dd4d89a7a6e9..584697433c3f 100644 --- a/sound/soc/codecs/es7210.c +++ b/sound/soc/codecs/es7210.c @@ -903,7 +903,7 @@ static int es7210_probe(struct snd_soc_component *component) //ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_I2C);//8,8 #else component->control_data = devm_regmap_init_i2c(es7210->i2c_client, &es7210_regmap_config); - ret = PTR_RET(component->control_data); + ret = PTR_ERR_OR_ZERO(component->control_data); #endif if (ret < 0) { diff --git a/sound/soc/codecs/es7243e.c b/sound/soc/codecs/es7243e.c index f71f1ad631dd..a2830c9a3ea5 100644 --- a/sound/soc/codecs/es7243e.c +++ b/sound/soc/codecs/es7243e.c @@ -1948,7 +1948,7 @@ static int es7243e_probe(struct snd_soc_component *component) #else component->control_data = devm_regmap_init_i2c(es7243e->i2c, &es7243e_regmap_config); - ret = PTR_RET(component->control_data); + ret = PTR_ERR_OR_ZERO(component->control_data); #endif if (ret < 0) { dev_err(component->dev, "Failed to set cache I/O: %d\n", ret);