linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nayna Jain <nayna@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Andrew Donnellan <ajd@linux.ibm.com>,
	gjoyce@linux.vnet.ibm.com, Nayna Jain <nayna@linux.ibm.com>,
	npiggin@gmail.com, George Wilson <gcwilson@linux.ibm.com>,
	bjking1@us.ibmcom
Subject: [PATCH 4/6] powerpc/pseries: cleanup error logs in plpks driver
Date: Sun,  6 Nov 2022 15:58:37 -0500	[thread overview]
Message-ID: <20221106205839.600442-5-nayna@linux.ibm.com> (raw)
In-Reply-To: <20221106205839.600442-1-nayna@linux.ibm.com>

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>
---
 arch/powerpc/platforms/pseries/plpks.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/plpks.c b/arch/powerpc/platforms/pseries/plpks.c
index cbea447122ca..72d9debf18c0 100644
--- a/arch/powerpc/platforms/pseries/plpks.c
+++ b/arch/powerpc/platforms/pseries/plpks.c
@@ -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;
 	}
-- 
2.31.1


  parent reply	other threads:[~2022-11-06 21:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06 20:58 [PATCH 0/6] powerpc/pseries - bugfixes/cleanups for PLPKS driver Nayna Jain
2022-11-06 20:58 ` [PATCH 1/6] powerpc/pseries: fix the object owners enum value in plpks driver Nayna Jain
2022-11-25  3:54   ` Andrew Donnellan
2022-11-06 20:58 ` [PATCH 2/6] powerpc/pseries: Fix the H_CALL error code in PLPKS driver Nayna Jain
2022-11-25  5:17   ` Andrew Donnellan
2022-11-06 20:58 ` [PATCH 3/6] powerpc/pseries: Return -EIO instead of -EINTR for H_ABORTED error Nayna Jain
2022-11-30  2:55   ` Andrew Donnellan
2022-11-06 20:58 ` Nayna Jain [this message]
2022-11-06 20:58 ` [PATCH 5/6] powerpc/pseries: replace kmalloc with kzalloc in PLPKS driver Nayna Jain
2022-11-25  3:31   ` Andrew Donnellan
2022-11-06 20:58 ` [PATCH 6/6] powerpc/pseries: fix plpks_read_var() code for different consumers Nayna Jain
2022-11-30  9:24 ` [PATCH 0/6] powerpc/pseries - bugfixes/cleanups for PLPKS driver Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221106205839.600442-5-nayna@linux.ibm.com \
    --to=nayna@linux.ibm.com \
    --cc=ajd@linux.ibm.com \
    --cc=bjking1@us.ibmcom \
    --cc=gcwilson@linux.ibm.com \
    --cc=gjoyce@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).