[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220113100622.12783-3-farbere@amazon.com>
Date: Thu, 13 Jan 2022 10:06:20 +0000
From: Eliav Farber <farbere@...zon.com>
To: <bp@...en8.de>
CC: <mchehab@...nel.org>, <linux-edac@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <ronenk@...zon.com>,
<talel@...zon.com>, <hhhawa@...zon.com>, <jonnyc@...zon.com>,
<hanochu@...zon.com>, <farbere@...zon.com>
Subject: [PATCH 2/4] EDAC: Remove unnecessary cast to char* in edac_align_ptr() function
Amend commit 7391c6dcab30 ("drivers/edac: mod edac_align_ptr function")
and change all return path to use void* instead of char* according
to the new signature.
Signed-off-by: Eliav Farber <farbere@...zon.com>
---
drivers/edac/edac_mc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 61d72bd96754..8b9b86a7720a 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -263,12 +263,12 @@ void *edac_align_ptr(void **p, unsigned size, int n_elems)
else if (size > sizeof(char))
align = sizeof(short);
else
- return (char *)ptr;
+ return ptr;
r = (unsigned long)ptr % align;
if (r == 0)
- return (char *)ptr;
+ return ptr;
*p += align - r;
--
2.32.0
Powered by blists - more mailing lists