linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpupower: speed up generating git version string
@ 2020-08-12  9:49 Martin Kaistra
  2020-08-20 10:27 ` Thomas Renninger
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Kaistra @ 2020-08-12  9:49 UTC (permalink / raw)
  To: shuah, trenn; +Cc: linux-pm, Martin Kaistra

The variable VERSION is expanded for every use of CFLAGS. This causes
"git describe" to get called multiple times on the kernel tree, which
can be quite slow.

The git revision does not change during build, so we can use simple
variable expansion to set VERSION.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
---
 tools/power/cpupower/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
index c8622497ef23..c7bcddbd486d 100644
--- a/tools/power/cpupower/Makefile
+++ b/tools/power/cpupower/Makefile
@@ -51,7 +51,7 @@ DESTDIR ?=
 # Package-related definitions. Distributions can modify the version
 # and _should_ modify the PACKAGE_BUGREPORT definition
 
-VERSION=			$(shell ./utils/version-gen.sh)
+VERSION:=			$(shell ./utils/version-gen.sh)
 LIB_MAJ=			0.0.1
 LIB_MIN=			0
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpupower: speed up generating git version string
  2020-08-12  9:49 [PATCH] cpupower: speed up generating git version string Martin Kaistra
@ 2020-08-20 10:27 ` Thomas Renninger
  2020-08-20 19:08   ` Shuah Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Renninger @ 2020-08-20 10:27 UTC (permalink / raw)
  To: shuah, Martin Kaistra; +Cc: linux-pm

Am Mittwoch, 12. August 2020, 11:49:12 CEST schrieb Martin Kaistra:
> The variable VERSION is expanded for every use of CFLAGS. This causes
> "git describe" to get called multiple times on the kernel tree, which
> can be quite slow.
> 
> The git revision does not change during build, so we can use simple
> variable expansion to set VERSION.

Good catch,  thanks!

Acked-by: Thomas Renninger <trenn@suse.de>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpupower: speed up generating git version string
  2020-08-20 10:27 ` Thomas Renninger
@ 2020-08-20 19:08   ` Shuah Khan
  0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2020-08-20 19:08 UTC (permalink / raw)
  To: Thomas Renninger, shuah, Martin Kaistra; +Cc: linux-pm, skhan

On 8/20/20 4:27 AM, Thomas Renninger wrote:
> Am Mittwoch, 12. August 2020, 11:49:12 CEST schrieb Martin Kaistra:
>> The variable VERSION is expanded for every use of CFLAGS. This causes
>> "git describe" to get called multiple times on the kernel tree, which
>> can be quite slow.
>>
>> The git revision does not change during build, so we can use simple
>> variable expansion to set VERSION.
> 
> Good catch,  thanks!
> 
> Acked-by: Thomas Renninger <trenn@suse.de>
> 
> 

Thanks. Applied to 
https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git cpupower 
branch for my next pull request to Rafael.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-20 19:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12  9:49 [PATCH] cpupower: speed up generating git version string Martin Kaistra
2020-08-20 10:27 ` Thomas Renninger
2020-08-20 19:08   ` Shuah Khan

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