From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Cc: boris.ostrovsky@oracle.com, konrad.wilk@oracle.com,
Juergen Gross <jgross@suse.com>
Subject: [PATCH 2/2] xen: make functions in xen-acpi-processor return void
Date: Fri, 31 Mar 2017 13:19:48 +0200 [thread overview]
Message-ID: <20170331111948.17539-3-jgross@suse.com> (raw)
In-Reply-To: <20170331111948.17539-1-jgross@suse.com>
The return value of xen_copy_pct_data() is always 0 and never checked.
xen_copy_psd_data() returns always 0, too, so checking the value is
kind of pointless.
Make the functions return void.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/xen/xen-acpi-processor.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c
index 3659ed3..8f01585 100644
--- a/drivers/xen/xen-acpi-processor.c
+++ b/drivers/xen/xen-acpi-processor.c
@@ -161,8 +161,8 @@ xen_copy_pss_data(struct acpi_processor *_pr,
}
return dst_states;
}
-static int xen_copy_psd_data(struct acpi_processor *_pr,
- struct xen_processor_performance *dst)
+static void xen_copy_psd_data(struct acpi_processor *_pr,
+ struct xen_processor_performance *dst)
{
struct acpi_psd_package *pdomain;
@@ -189,10 +189,9 @@ static int xen_copy_psd_data(struct acpi_processor *_pr,
}
memcpy(&(dst->domain_info), pdomain, sizeof(struct acpi_psd_package));
- return 0;
}
-static int xen_copy_pct_data(struct acpi_pct_register *pct,
- struct xen_pct_register *dst_pct)
+static void xen_copy_pct_data(struct acpi_pct_register *pct,
+ struct xen_pct_register *dst_pct)
{
/* It would be nice if you could just do 'memcpy(pct, dst_pct') but
* sadly the Xen structure did not have the proper padding so the
@@ -205,7 +204,6 @@ static int xen_copy_pct_data(struct acpi_pct_register *pct,
dst_pct->bit_offset = pct->bit_offset;
dst_pct->reserved = pct->reserved;
dst_pct->address = pct->address;
- return 0;
}
static int push_pxx_to_hypervisor(struct acpi_processor *_pr)
{
@@ -233,8 +231,8 @@ static int push_pxx_to_hypervisor(struct acpi_processor *_pr)
set_xen_guest_handle(dst_perf->states, dst_states);
dst_perf->flags |= XEN_PX_PSS;
}
- if (!xen_copy_psd_data(_pr, dst_perf))
- dst_perf->flags |= XEN_PX_PSD;
+ xen_copy_psd_data(_pr, dst_perf);
+ dst_perf->flags |= XEN_PX_PSD;
if (dst_perf->flags != (XEN_PX_PSD | XEN_PX_PSS | XEN_PX_PCT | XEN_PX_PPC)) {
pr_warn("ACPI CPU%u missing some P-state data (%x), skipping\n",
--
2.10.2
next prev parent reply other threads:[~2017-03-31 11:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 11:19 [PATCH 0/2] xen: fix and cleanup of xen-acpi-processor Juergen Gross
2017-03-31 11:19 ` [PATCH 1/2] xen: correct error handling in xen-acpi-processor Juergen Gross
2017-03-31 14:10 ` Boris Ostrovsky
2017-03-31 14:19 ` Juergen Gross
2017-03-31 11:19 ` Juergen Gross [this message]
2017-03-31 14:13 ` [PATCH 2/2] xen: make functions in xen-acpi-processor return void Boris Ostrovsky
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=20170331111948.17539-3-jgross@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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
all inboxes | Powered by JetHome®