Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614121
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] xen: make functions in xen-acpi-processor return void |
| Date | 2017-03-31 17:40 +0200 |
| Message-ID | <tr6OD-6qJ-29@gated-at.bofh.it> (permalink) |
| References | <tr62e-5Sb-5@gated-at.bofh.it> <tr6vg-6i4-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 31/03/17 17:13, Boris Ostrovsky wrote:
> On 03/31/2017 10:40 AM, Juergen Gross wrote:
>> There are several functions in xen-acpi-processor which either always
>> return the same value or where the returned value is never checked.
>>
>> Make the functions return void.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> drivers/xen/xen-acpi-processor.c | 51 +++++++++++++++-------------------------
>> 1 file changed, 19 insertions(+), 32 deletions(-)
>>
>> diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c
>> index 23e391d..45be017 100644
>> --- a/drivers/xen/xen-acpi-processor.c
>> +++ b/drivers/xen/xen-acpi-processor.c
>> @@ -54,7 +54,7 @@ static unsigned long *acpi_id_present;
>> /* And if there is an _CST definition (or a PBLK) for the ACPI IDs */
>> static unsigned long *acpi_id_cst_present;
>>
>> -static int push_cxx_to_hypervisor(struct acpi_processor *_pr)
>> +static void push_cxx_to_hypervisor(struct acpi_processor *_pr)
>> {
>> struct xen_platform_op op = {
>> .cmd = XENPF_set_processor_pminfo,
>> @@ -70,7 +70,7 @@ static int push_cxx_to_hypervisor(struct acpi_processor *_pr)
>> dst_cx_states = kcalloc(_pr->power.count,
>> sizeof(struct xen_processor_cx), GFP_KERNEL);
>> if (!dst_cx_states)
>> - return -ENOMEM;
>> + return;
>
> Maybe pr_warn(_once)()?
I don't think so. Memory shortage is probably detectable without that
message. Adding another (random) message will do more harm than good.
Juergen
>
> In any case:
>
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] xen: make functions in xen-acpi-processor return void Juergen Gross <jgross@suse.com> - 2017-03-31 16:50 +0200
Re: [PATCH v2] xen: make functions in xen-acpi-processor return void Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2017-03-31 17:20 +0200
Re: [PATCH v2] xen: make functions in xen-acpi-processor return void Juergen Gross <jgross@suse.com> - 2017-03-31 17:40 +0200
Re: [PATCH v2] xen: make functions in xen-acpi-processor return void Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-03-31 17:20 +0200
Re: [PATCH v2] xen: make functions in xen-acpi-processor return void Juergen Gross <jgross@suse.com> - 2017-03-31 17:40 +0200
csiph-web