2022-12-26 03:12:01

by Dong Chuanjian

[permalink] [raw]
Subject: [PATCH] drivers/misc/ocxl/context.c : eliminate unnecessary type conversions

remove unnecessary void* type casting.

Signed-off-by: Dong Chuanjian <[email protected]>

diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c
index 9eb0d93b01c6..d6e081812300 100644
--- a/drivers/misc/ocxl/context.c
+++ b/drivers/misc/ocxl/context.c
@@ -55,7 +55,7 @@ EXPORT_SYMBOL_GPL(ocxl_context_alloc);
*/
static void xsl_fault_error(void *data, u64 addr, u64 dsisr)
{
- struct ocxl_context *ctx = (struct ocxl_context *) data;
+ struct ocxl_context *ctx = data;

mutex_lock(&ctx->xsl_error_lock);
ctx->xsl_error.addr = addr;
--
2.18.2


2023-01-04 07:31:56

by Andrew Donnellan

[permalink] [raw]
Subject: Re: [PATCH] drivers/misc/ocxl/context.c : eliminate unnecessary type conversions

On Mon, 2022-12-26 at 10:51 +0800, Dong Chuanjian wrote:
> remove unnecessary void* type casting.
>
> Signed-off-by: Dong Chuanjian <[email protected]>


[+linuxppc-dev, which was misspelled in the original email]

Acked-by: Andrew Donnellan <[email protected]>

>
> diff --git a/drivers/misc/ocxl/context.c
> b/drivers/misc/ocxl/context.c
> index 9eb0d93b01c6..d6e081812300 100644
> --- a/drivers/misc/ocxl/context.c
> +++ b/drivers/misc/ocxl/context.c
> @@ -55,7 +55,7 @@ EXPORT_SYMBOL_GPL(ocxl_context_alloc);
>   */
>  static void xsl_fault_error(void *data, u64 addr, u64 dsisr)
>  {
> -       struct ocxl_context *ctx = (struct ocxl_context *) data;
> +       struct ocxl_context *ctx = data;
>  
>         mutex_lock(&ctx->xsl_error_lock);
>         ctx->xsl_error.addr = addr;

--
Andrew Donnellan OzLabs, ADL Canberra
[email protected] IBM Australia Limited

2023-01-04 08:49:20

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] drivers/misc/ocxl/context.c : eliminate unnecessary type conversions

On Mon, Dec 26, 2022 at 10:51:45AM +0800, Dong Chuanjian wrote:
> remove unnecessary void* type casting.

That says what you did, but not why you did it. Please read the
documentation for how to write good changelog texts.

thanks,

greg k-h