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: <1365523237.6865.40.camel@joe-AO722>
Date:	Tue, 09 Apr 2013 09:00:37 -0700
From:	Joe Perches <joe@...ches.com>
To:	Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Platform Driver <platform-driver-x86@...r.kernel.org>,
	Matthew Garrett <matthew.garrett@...ula.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Zhang Rui <rui.zhang@...el.com>,
	Rafael Wysocki <rafael.j.wysocki@...el.com>,
	Len Brown <len.brown@...el.com>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	Arjan van de Ven <arjan@...ux.intel.com>
Subject: Re: [PATCH v3 1/1] Introduce Intel RAPL cooling device driver

On Tue, 2013-04-09 at 05:46 -0700, Jacob Pan wrote:
> RAPL(Running Average Power Limit) interface provides platform software
> with the ability to monitor, control, and get notifications on SOC
> power consumptions.

yet more trivia:

> diff --git a/drivers/platform/x86/intel_rapl.c b/drivers/platform/x86/intel_rapl.c
[]
> +static bool rapl_polling_should_cont(void)
> +{
> +	unsigned int all_state = 0;
[]
> +	return !!all_state;

The !! isn't needed.
!! should only be done when you are returning
int and you need to make sure it's 0 or 1.
It's not here.  The return is bool.

	return all_state;

The compiler, even icc, will do this internally.

> +static int start_periodic_polling(void)
> +{
> +	if (polling_started)
> +		goto out;
> +	schedule_delayed_work(&rapl_polling_work, 0);
> +	polling_started = true;

Should polling_started be device specific (in struct rapl_data ?)
instead of a single instance static?


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