Skip to contentSkip to conversation

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

PATCH Applied Li zeming 4 participants 4 messages Nov 13, 2023 – Dec 7, 2023

Subsystems (2)
lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 misc: ocxl: context: Remove unnecessary (void*) conversions

The ctx pointer does not need to cast the type.

---
 drivers/misc/ocxl/context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/ocxl/context.c +1 -1
index 7f83116ae11a6..cded7d1caf328 100644
@@ -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;
Signature · 1 line
2.18.2
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Li zeming

The ctx pointer does not need to cast the type.

---

Indeed, it's useless.

Quoted 16 lines
  drivers/misc/ocxl/context.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/ocxl/context.c +1 -1
index 7f83116ae11a6..cded7d1caf328 100644
@@ -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;
Acked-by on v1 1/1
#2 lore raw
In reply to Li zeming
Quoted 3 lines · Li zeming

The ctx pointer does not need to cast the type.

Quoted 18 lines

---
 drivers/misc/ocxl/context.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/ocxl/context.c +1 -1
index 7f83116ae11a6..cded7d1caf328 100644
@@ -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;

Signature · 2 lines
Andrew Donnellan    OzLabs, ADL Canberra
[email protected]   IBM Australia Limited