All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] tools/thermal: tmon: include pthread and time headers in tmon.h
@ 2022-07-18  3:10 Florian Fainelli
  2022-07-19 16:11 ` Florian Fainelli
  2022-07-28 15:41 ` [thermal: thermal/next] thermal/tools/tmon: Include " thermal-bot for Markus Mayer
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Fainelli @ 2022-07-18  3:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Markus Mayer, Florian Fainelli, Sumeet Pawnikar,
	Alejandro González, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, Markus Mayer, open list:THERMAL

From: Markus Mayer <mmayer@broadcom.com>

Include sys/time.h and pthread.h in tmon.h, so that types
"pthread_mutex_t" and "struct timeval tv" are known when tmon.h
references them.

Without these headers, compiling tmon against musl-libc will fail with
these errors:

In file included from sysfs.c:31:0:
tmon.h:47:8: error: unknown type name 'pthread_mutex_t'
 extern pthread_mutex_t input_lock;
        ^~~~~~~~~~~~~~~
make[3]: *** [<builtin>: sysfs.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from tui.c:31:0:
tmon.h:54:17: error: field 'tv' has incomplete type
  struct timeval tv;
                 ^~
make[3]: *** [<builtin>: tui.o] Error 1
make[2]: *** [Makefile:83: tmon] Error 2

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Acked-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Tested-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
---
This patch was first submitted here:

https://lore.kernel.org/all/20200617235809.6817-1-mmayer@broadcom.com/

but never applied, meanwhile the issue is still present

 tools/thermal/tmon/tmon.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/thermal/tmon/tmon.h b/tools/thermal/tmon/tmon.h
index c9066ec104dd..44d16d778f04 100644
--- a/tools/thermal/tmon/tmon.h
+++ b/tools/thermal/tmon/tmon.h
@@ -27,6 +27,9 @@
 #define NR_LINES_TZDATA 1
 #define TMON_LOG_FILE "/var/tmp/tmon.log"
 
+#include <sys/time.h>
+#include <pthread.h>
+
 extern unsigned long ticktime;
 extern double time_elapsed;
 extern unsigned long target_temp_user;
-- 
2.25.1


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

* Re: [PATCH RESEND] tools/thermal: tmon: include pthread and time headers in tmon.h
  2022-07-18  3:10 [PATCH RESEND] tools/thermal: tmon: include pthread and time headers in tmon.h Florian Fainelli
@ 2022-07-19 16:11 ` Florian Fainelli
  2022-07-19 17:06   ` Daniel Lezcano
  2022-07-28 15:41 ` [thermal: thermal/next] thermal/tools/tmon: Include " thermal-bot for Markus Mayer
  1 sibling, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2022-07-19 16:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Markus Mayer, Sumeet Pawnikar, Alejandro González,
	Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Markus Mayer, open list:THERMAL



On 7/17/2022 8:10 PM, Florian Fainelli wrote:
> From: Markus Mayer <mmayer@broadcom.com>
> 
> Include sys/time.h and pthread.h in tmon.h, so that types
> "pthread_mutex_t" and "struct timeval tv" are known when tmon.h
> references them.
> 
> Without these headers, compiling tmon against musl-libc will fail with
> these errors:
> 
> In file included from sysfs.c:31:0:
> tmon.h:47:8: error: unknown type name 'pthread_mutex_t'
>   extern pthread_mutex_t input_lock;
>          ^~~~~~~~~~~~~~~
> make[3]: *** [<builtin>: sysfs.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> In file included from tui.c:31:0:
> tmon.h:54:17: error: field 'tv' has incomplete type
>    struct timeval tv;
>                   ^~
> make[3]: *** [<builtin>: tui.o] Error 1
> make[2]: *** [Makefile:83: tmon] Error 2
> 
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Reviewed-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
> Acked-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
> Tested-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
> ---
> This patch was first submitted here:
> 
> https://lore.kernel.org/all/20200617235809.6817-1-mmayer@broadcom.com/
> 
> but never applied, meanwhile the issue is still present

Daniel, Rafael, any chance to get that into v5.19-rc7? I should probably 
also have added:

Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal 
subsystem")

Thanks!
-- 
Florian

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

* Re: [PATCH RESEND] tools/thermal: tmon: include pthread and time headers in tmon.h
  2022-07-19 16:11 ` Florian Fainelli
@ 2022-07-19 17:06   ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2022-07-19 17:06 UTC (permalink / raw)
  To: Florian Fainelli, linux-kernel
  Cc: Markus Mayer, Sumeet Pawnikar, Alejandro González,
	Rafael J. Wysocki, Amit Kucheria, Zhang Rui, Markus Mayer,
	open list:THERMAL

On 19/07/2022 18:11, Florian Fainelli wrote:
> 
> 
> On 7/17/2022 8:10 PM, Florian Fainelli wrote:
>> From: Markus Mayer <mmayer@broadcom.com>
>>
>> Include sys/time.h and pthread.h in tmon.h, so that types
>> "pthread_mutex_t" and "struct timeval tv" are known when tmon.h
>> references them.
>>
>> Without these headers, compiling tmon against musl-libc will fail with
>> these errors:
>>
>> In file included from sysfs.c:31:0:
>> tmon.h:47:8: error: unknown type name 'pthread_mutex_t'
>>   extern pthread_mutex_t input_lock;
>>          ^~~~~~~~~~~~~~~
>> make[3]: *** [<builtin>: sysfs.o] Error 1
>> make[3]: *** Waiting for unfinished jobs....
>> In file included from tui.c:31:0:
>> tmon.h:54:17: error: field 'tv' has incomplete type
>>    struct timeval tv;
>>                   ^~
>> make[3]: *** [<builtin>: tui.o] Error 1
>> make[2]: *** [Makefile:83: tmon] Error 2
>>
>> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
>> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
>> Reviewed-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
>> Acked-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
>> Tested-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
>> ---
>> This patch was first submitted here:
>>
>> https://lore.kernel.org/all/20200617235809.6817-1-mmayer@broadcom.com/
>>
>> but never applied, meanwhile the issue is still present
> 
> Daniel, Rafael, any chance to get that into v5.19-rc7? I should probably 
> also have added:
> 
> Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal 
> subsystem")

Yes, I'll pick it up

Thanks for resending


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* [thermal: thermal/next] thermal/tools/tmon: Include pthread and time headers in tmon.h
  2022-07-18  3:10 [PATCH RESEND] tools/thermal: tmon: include pthread and time headers in tmon.h Florian Fainelli
  2022-07-19 16:11 ` Florian Fainelli
@ 2022-07-28 15:41 ` thermal-bot for Markus Mayer
  1 sibling, 0 replies; 4+ messages in thread
From: thermal-bot for Markus Mayer @ 2022-07-28 15:41 UTC (permalink / raw)
  To: linux-pm
  Cc: Markus Mayer, Florian Fainelli, Sumeet Pawnikar,
	alejandro.gonzalez.correo, Daniel Lezcano, rui.zhang, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     0cf51bfe999524377fbb71becb583b4ca6d07cfc
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//0cf51bfe999524377fbb71becb583b4ca6d07cfc
Author:        Markus Mayer <mmayer@broadcom.com>
AuthorDate:    Sun, 17 Jul 2022 20:10:39 -07:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 28 Jul 2022 17:29:51 +02:00

thermal/tools/tmon: Include pthread and time headers in tmon.h

Include sys/time.h and pthread.h in tmon.h, so that types
"pthread_mutex_t" and "struct timeval tv" are known when tmon.h
references them.

Without these headers, compiling tmon against musl-libc will fail with
these errors:

In file included from sysfs.c:31:0:
tmon.h:47:8: error: unknown type name 'pthread_mutex_t'
 extern pthread_mutex_t input_lock;
        ^~~~~~~~~~~~~~~
make[3]: *** [<builtin>: sysfs.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from tui.c:31:0:
tmon.h:54:17: error: field 'tv' has incomplete type
  struct timeval tv;
                 ^~
make[3]: *** [<builtin>: tui.o] Error 1
make[2]: *** [Makefile:83: tmon] Error 2

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Acked-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Tested-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal  subsystem")
Link: https://lore.kernel.org/r/20220718031040.44714-1-f.fainelli@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 tools/thermal/tmon/tmon.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/thermal/tmon/tmon.h b/tools/thermal/tmon/tmon.h
index c9066ec..44d16d7 100644
--- a/tools/thermal/tmon/tmon.h
+++ b/tools/thermal/tmon/tmon.h
@@ -27,6 +27,9 @@
 #define NR_LINES_TZDATA 1
 #define TMON_LOG_FILE "/var/tmp/tmon.log"
 
+#include <sys/time.h>
+#include <pthread.h>
+
 extern unsigned long ticktime;
 extern double time_elapsed;
 extern unsigned long target_temp_user;

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

end of thread, other threads:[~2022-07-28 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18  3:10 [PATCH RESEND] tools/thermal: tmon: include pthread and time headers in tmon.h Florian Fainelli
2022-07-19 16:11 ` Florian Fainelli
2022-07-19 17:06   ` Daniel Lezcano
2022-07-28 15:41 ` [thermal: thermal/next] thermal/tools/tmon: Include " thermal-bot for Markus Mayer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.