powerpc/pseries: cleanup error logs in plpks driver
authorNayna Jain <nayna@linux.ibm.com>
Sun, 6 Nov 2022 20:58:37 +0000 (15:58 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2022 12:31:50 +0000 (23:31 +1100)
Logging H_CALL return codes in PLPKS driver are easy to confuse with
Linux error codes.

Let the caller of the function log the converted linux error code.

Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221106205839.600442-5-nayna@linux.ibm.com
arch/powerpc/platforms/pseries/plpks.c

index cbea447..72d9deb 100644 (file)
@@ -312,10 +312,6 @@ int plpks_write_var(struct plpks_var var)
        if (!rc)
                rc = plpks_confirm_object_flushed(label, auth);
 
-       if (rc)
-               pr_err("Failed to write variable %s for component %s with error %d\n",
-                      var.name, var.component, rc);
-
        rc = pseries_status_to_err(rc);
        kfree(label);
 out:
@@ -350,10 +346,6 @@ int plpks_remove_var(char *component, u8 varos, struct plpks_var_name vname)
        if (!rc)
                rc = plpks_confirm_object_flushed(label, auth);
 
-       if (rc)
-               pr_err("Failed to remove variable %s for component %s with error %d\n",
-                      vname.name, component, rc);
-
        rc = pseries_status_to_err(rc);
        kfree(label);
 out:
@@ -395,8 +387,6 @@ static int plpks_read_var(u8 consumer, struct plpks_var *var)
                         maxobjsize);
 
        if (rc != H_SUCCESS) {
-               pr_err("Failed to read variable %s for component %s with error %d\n",
-                      var->name, var->component, rc);
                rc = pseries_status_to_err(rc);
                goto out_free_output;
        }