LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Paul Mackerras <paulus@samba.org>,
	peterz@infradead.org
Cc: dev@codyps.com, <linux-kernel@vger.kernel.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v2 02/10] powerpc/hv24x7: Remove unnecessary parameter
Date: Mon, 30 Mar 2015 18:53:39 -0700	[thread overview]
Message-ID: <1427766828-771-3-git-send-email-sukadev@linux.vnet.ibm.com> (raw)
In-Reply-To: <1427766828-771-1-git-send-email-sukadev@linux.vnet.ibm.com>

Remove the 'success_expected' parameter and log the message unconditionally.

Changelog[v2]
	[Michael Ellerman]: Move the change to reduce log message priority
		into a separate patch.

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
 arch/powerpc/perf/hv-24x7.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 408e6e9..c185dcf 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -986,8 +986,7 @@ static const struct attribute_group *attr_groups[] = {
 };
 
 static unsigned long single_24x7_request(u8 domain, u32 offset, u16 ix,
-					 u16 lpar, u64 *count,
-					 bool success_expected)
+					 u16 lpar, u64 *count)
 {
 	unsigned long ret;
 
@@ -1028,8 +1027,7 @@ static unsigned long single_24x7_request(u8 domain, u32 offset, u16 ix,
 			virt_to_phys(result_buffer),  H24x7_DATA_BUFFER_SIZE);
 
 	if (ret) {
-		if (success_expected)
-			pr_err_ratelimited("hcall failed: %d %#x %#x %d => "
+		pr_err_ratelimited("hcall failed: %d %#x %#x %d => "
 				"0x%lx (%ld) detail=0x%x failing ix=%x\n",
 				domain, offset, ix, lpar, ret, ret,
 				result_buffer->detailed_rc,
@@ -1044,8 +1042,7 @@ out:
 	return ret;
 }
 
-static unsigned long event_24x7_request(struct perf_event *event, u64 *res,
-		bool success_expected)
+static unsigned long event_24x7_request(struct perf_event *event, u64 *res)
 {
 	u16 idx;
 	unsigned domain = event_get_domain(event);
@@ -1059,8 +1056,7 @@ static unsigned long event_24x7_request(struct perf_event *event, u64 *res,
 				event_get_offset(event),
 				idx,
 				event_get_lpar(event),
-				res,
-				success_expected);
+				res);
 }
 
 static int h_24x7_event_init(struct perf_event *event)
@@ -1130,7 +1126,7 @@ static int h_24x7_event_init(struct perf_event *event)
 	}
 
 	/* see if the event complains */
-	if (event_24x7_request(event, &ct, false)) {
+	if (event_24x7_request(event, &ct)) {
 		pr_devel("test hcall failed\n");
 		return -EIO;
 	}
@@ -1142,7 +1138,7 @@ static u64 h_24x7_get_value(struct perf_event *event)
 {
 	unsigned long ret;
 	u64 ct;
-	ret = event_24x7_request(event, &ct, true);
+	ret = event_24x7_request(event, &ct);
 	if (ret)
 		/* We checked this in event init, shouldn't fail here... */
 		return 0;
-- 
1.8.3.1


  parent reply	other threads:[~2015-03-31  1:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31  1:53 [PATCH v2 00/10] powerpc/hv-24x7: Reorganize single_24x7_request() Sukadev Bhattiprolu
2015-03-31  1:53 ` [PATCH v2 01/10] powerpc/hv-24x7: Modify definition of request and result buffers Sukadev Bhattiprolu
2015-03-31  1:53 ` Sukadev Bhattiprolu [this message]
2015-03-31  1:53 ` [PATCH v2 03/10] perf/hv24x7: Use pr_devel() to log message Sukadev Bhattiprolu
2015-03-31  1:53 ` [PATCH v2 04/10] powerpc/hv-24x7: Drop event_24x7_request() Sukadev Bhattiprolu
2015-03-31  1:53 ` [PATCH v2 05/10] powerpc/hv24x7: Move debug prints to separate function Sukadev Bhattiprolu
2015-03-31  1:53 ` [PATCH v2 06/10] powerpc/hv-24x7: Rename hv_24x7_event_update Sukadev Bhattiprolu
2015-03-31  1:53 ` [PATCH v2 07/10] powerpc/hv-24x7: Define add_event_to_24x7_request() Sukadev Bhattiprolu
2015-03-31  1:53 ` [PATCH v2 08/10] perf/hv24x7: Whitespace cleanup Sukadev Bhattiprolu
2015-03-31  3:08   ` Joe Perches
2015-04-01 18:26     ` Sukadev Bhattiprolu
2015-03-31  1:53 ` [PATCH v2 09/10] powerpc/hv-24x7: Define update_event_count() Sukadev Bhattiprolu
2015-03-31  1:53 ` [PATCH v2 10/10] powerpc/hv-24x7: Break up single_24x7_request Sukadev Bhattiprolu

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=1427766828-771-3-git-send-email-sukadev@linux.vnet.ibm.com \
    --to=sukadev@linux.vnet.ibm.com \
    --cc=dev@codyps.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --subject='Re: [PATCH v2 02/10] powerpc/hv24x7: Remove unnecessary parameter' \
    /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

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).