ocxl: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Tue, 6 Sep 2022 07:20:06 +0000 (07:20 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Sep 2022 09:22:14 +0000 (19:22 +1000)
Return the value opal_npu_spa_clear_cache() directly instead of storing
it in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220906072006.337099-1-ye.xingchen@zte.com.cn
arch/powerpc/platforms/powernv/ocxl.c

index 27c9360..6290677 100644 (file)
@@ -478,10 +478,8 @@ EXPORT_SYMBOL_GPL(pnv_ocxl_spa_release);
 int pnv_ocxl_spa_remove_pe_from_cache(void *platform_data, int pe_handle)
 {
        struct spa_data *data = (struct spa_data *) platform_data;
-       int rc;
 
-       rc = opal_npu_spa_clear_cache(data->phb_opal_id, data->bdfn, pe_handle);
-       return rc;
+       return opal_npu_spa_clear_cache(data->phb_opal_id, data->bdfn, pe_handle);
 }
 EXPORT_SYMBOL_GPL(pnv_ocxl_spa_remove_pe_from_cache);