[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YfGW6n59lDRiS3di@zn.tnic>
Date: Wed, 26 Jan 2022 19:46:02 +0100
From: Borislav Petkov <bp@...en8.de>
To: Eliav Farber <farbere@...zon.com>
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
Subject: Re: [PATCH 2/4] EDAC: Remove unnecessary cast to char* in
edac_align_ptr() function
On Thu, Jan 13, 2022 at 10:06:20AM +0000, Eliav Farber wrote:
> 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;
>
> --
Applied, thanks.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists