lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2302038.j7LN5nT5iO@vostro.rjw.lan>
Date:	Mon, 20 Jul 2015 23:49:56 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Pan Xinhui <xinhuix.pan@...el.com>
Cc:	Linux PM list <linux-pm@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	"yanmin_zhang@...ux.intel.com" <yanmin_zhang@...ux.intel.com>
Subject: Re: [PATCH 1/2] ACPI / processor: Drop an unused argument of a cleanup routine

On Monday, July 20, 2015 09:45:30 AM Pan Xinhui wrote:
> hi, Rafael
> 	thanks for your nice work :)
> On 2015年07月18日 09:14, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > 
> > acpi_processor_unregister_performance() actually doesn't use its
> > first argument, so drop it and update the callers accordingly.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > ---
> >  drivers/acpi/processor_perflib.c    |    4 +---
> >  drivers/cpufreq/acpi-cpufreq.c      |    5 ++---
> >  drivers/cpufreq/e_powersaver.c      |    2 +-
> >  drivers/cpufreq/ia64-acpi-cpufreq.c |    5 ++---
> >  drivers/cpufreq/powernow-k7.c       |    4 ++--
> >  drivers/cpufreq/powernow-k8.c       |    5 ++---
> >  drivers/xen/xen-acpi-processor.c    |    4 ++--
> >  include/acpi/processor.h            |    5 +----
> >  8 files changed, 13 insertions(+), 21 deletions(-)
> > 
> 
> I wish I can test this patch. However I only have x86 hardware, not all
> codes can be tested on my side.

Possible build errors should be sorted out by the 0-day testing and the
functional part will be OK if the name of the remaining argument is not
changed in any spot.


> > Index: linux-pm/drivers/xen/xen-acpi-processor.c
> > ===================================================================
> > --- linux-pm.orig/drivers/xen/xen-acpi-processor.c
> > +++ linux-pm/drivers/xen/xen-acpi-processor.c
> > @@ -563,7 +563,7 @@ err_unregister:
> >  	for_each_possible_cpu(i) {
> >  		struct acpi_processor_performance *perf;
> >  		perf = per_cpu_ptr(acpi_perf_data, i);
> > -		acpi_processor_unregister_performance(perf, i);
> > +		acpi_processor_unregister_performance(i);
> >  	}
> >  err_out:
> >  	/* Freeing a NULL pointer is OK: alloc_percpu zeroes. */
> > @@ -582,7 +582,7 @@ static void __exit xen_acpi_processor_ex
> >  	for_each_possible_cpu(i) {
> >  		struct acpi_processor_performance *perf;
> >  		perf = per_cpu_ptr(acpi_perf_data, i);
> > -		acpi_processor_unregister_performance(perf, i);
> > +		acpi_processor_unregister_performance(i);
> 
> 
> >  	}
> >  	free_acpi_perf_data();
> >  }
> > 
> 
> After a simple review, in functions above *perf* is not used anymore, can we just change the codes like below
> 	@@ -580,9 +580,7 @@ static void __exit xen_acpi_processor_exit(void)
>         kfree(acpi_id_present);
>         kfree(acpi_id_cst_present);
>         for_each_possible_cpu(i) {
> -               struct acpi_processor_performance *perf;
> -               perf = per_cpu_ptr(acpi_perf_data, i);
> -               acpi_processor_unregister_performance(perf, i);
> +               acpi_processor_unregister_performance(i);
>         }
>         free_acpi_perf_data();

You're right, thanks!

I'll send an update shortly.


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ