diff mbox series

misc: ocxl: context: Remove unnecessary (void*) conversions

Message ID 20231113011543.6940-1-zeming@nfschina.com (mailing list archive)
State Accepted
Commit 82d30723d58fccbd2d7d707fab7649b541fafa1b
Headers show
Series misc: ocxl: context: Remove unnecessary (void*) conversions | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 23 jobs.

Commit Message

Li zeming Nov. 13, 2023, 1:15 a.m. UTC
The ctx pointer does not need to cast the type.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 drivers/misc/ocxl/context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Frederic Barrat Nov. 14, 2023, 12:52 p.m. UTC | #1
On 13/11/2023 02:15, Li zeming wrote:
> The ctx pointer does not need to cast the type.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>
> ---


Indeed, it's useless.
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com>


>   drivers/misc/ocxl/context.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c
> index 7f83116ae11a6..cded7d1caf328 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 Nov. 20, 2023, 4:06 a.m. UTC | #2
On Mon, 2023-11-13 at 09:15 +0800, Li zeming wrote:
> The ctx pointer does not need to cast the type.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Acked-by: Andrew Donnellan <ajd@linux.ibm.com>

> ---
>  drivers/misc/ocxl/context.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/ocxl/context.c
> b/drivers/misc/ocxl/context.c
> index 7f83116ae11a6..cded7d1caf328 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;
Michael Ellerman Dec. 7, 2023, 12:38 p.m. UTC | #3
On Mon, 13 Nov 2023 09:15:43 +0800, Li zeming wrote:
> The ctx pointer does not need to cast the type.
> 
> 

Applied to powerpc/next.

[1/1] misc: ocxl: context: Remove unnecessary (void*) conversions
      https://git.kernel.org/powerpc/c/82d30723d58fccbd2d7d707fab7649b541fafa1b

cheers
diff mbox series

Patch

diff --git a/drivers/misc/ocxl/context.c b/drivers/misc/ocxl/context.c
index 7f83116ae11a6..cded7d1caf328 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;