* [PATCH] zsmalloc: replace IS_ERR() with IS_ERR_VALUE()
@ 2022-11-04 2:38 Deming Wang
2022-11-04 3:11 ` Sergey Senozhatsky
0 siblings, 1 reply; 2+ messages in thread
From: Deming Wang @ 2022-11-04 2:38 UTC (permalink / raw)
To: minchan, ngupta, akpm; +Cc: senozhatsky, linux-mm, linux-kernel, Deming Wang
Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE()
instead.
Signed-off-by: Deming Wang <wangdeming@inspur.com>
---
mm/zsmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index a40c548520d3..1322f3615067 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -379,7 +379,7 @@ static int zs_zpool_malloc(void *pool, size_t size, gfp_t gfp,
{
*handle = zs_malloc(pool, size, gfp);
- if (IS_ERR((void *)(*handle)))
+ if (IS_ERR_VALUE(*handle))
return PTR_ERR((void *)*handle);
return 0;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] zsmalloc: replace IS_ERR() with IS_ERR_VALUE()
2022-11-04 2:38 [PATCH] zsmalloc: replace IS_ERR() with IS_ERR_VALUE() Deming Wang
@ 2022-11-04 3:11 ` Sergey Senozhatsky
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2022-11-04 3:11 UTC (permalink / raw)
To: Deming Wang; +Cc: minchan, ngupta, akpm, senozhatsky, linux-mm, linux-kernel
On (22/11/03 22:38), Deming Wang wrote:
> Avoid typecasts that are needed for IS_ERR() and use IS_ERR_VALUE()
> instead.
>
> Signed-off-by: Deming Wang <wangdeming@inspur.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-04 3:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 2:38 [PATCH] zsmalloc: replace IS_ERR() with IS_ERR_VALUE() Deming Wang
2022-11-04 3:11 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).