<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/thermal, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-01-02T08:33:19+00:00</updated>
<entry>
<title>tools/thermal/tmon: Fix compilation warning for wrong format</title>
<updated>2024-01-02T08:33:19+00:00</updated>
<author>
<name>Florian Eckert</name>
<email>fe@dev.tdt.de</email>
</author>
<published>2023-12-04T14:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9da39ef332c417ce52732564c1c682a6e1209302'/>
<id>urn:sha1:9da39ef332c417ce52732564c1c682a6e1209302</id>
<content type='text'>
The following warnings are shown during compilation:

tui.c: In function 'show_cooling_device':
 tui.c:216:40: warning: format '%d' expects argument of type 'int', but
argument 7 has type 'long unsigned int' [-Wformat=]
   216 |                         "%02d %12.12s%6d %6d",
       |                                      ~~^
       |                                        |
       |                                        int
       |                                      %6ld
 ......
   219 |                         ptdata.cdi[j].cur_state,
       |                         ~~~~~~~~~~~~~~~~~~~~~~~
       |                                      |
       |                                      long unsigned int
 tui.c:216:44: warning: format '%d' expects argument of type 'int', but
argument 8 has type 'long unsigned int' [-Wformat=]
   216 |                         "%02d %12.12s%6d %6d",
       |                                          ~~^
       |                                            |
       |                                            int
       |                                          %6ld
 ......
   220 |                         ptdata.cdi[j].max_state);
       |                         ~~~~~~~~~~~~~~~~~~~~~~~
       |                                      |
       |                                      long unsigned int

To fix this, the correct string format must be used for printing.

Signed-off-by: Florian Eckert &lt;fe@dev.tdt.de&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20231204141335.2798194-1-fe@dev.tdt.de
</content>
</entry>
<entry>
<title>tools/thermal: Remove unused 'mds' and 'nrhandler' variables</title>
<updated>2023-10-15T21:40:10+00:00</updated>
<author>
<name>Kuan-Wei Chiu</name>
<email>visitorckw@gmail.com</email>
</author>
<published>2023-09-26T17:37:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de84da588f35423c5c2e6a46f2bc8a07f8eaf793'/>
<id>urn:sha1:de84da588f35423c5c2e6a46f2bc8a07f8eaf793</id>
<content type='text'>
In the previous code, the 'mds' and 'nrhandler' variables were not
utilized in the codebase. Additionally, there was a potential NULL
pointer dereference and memory leak due to improper handling of memory
reallocation failure.

This patch removes the unused 'mds' and 'nrhandler' variables along with
the associated code, addressing the unused variable issue, NULL pointer
dereference issue and the memory leak issue.

Signed-off-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20230926173736.1142420-1-visitorckw@gmail.com
</content>
</entry>
<entry>
<title>tools/thermal: Fix possible path truncations</title>
<updated>2022-08-03T17:28:46+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2022-07-25T17:37:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c58cf40e3a1d2f47c09d3489857e9476316788a'/>
<id>urn:sha1:6c58cf40e3a1d2f47c09d3489857e9476316788a</id>
<content type='text'>
A build with -D_FORTIFY_SOURCE=2 enabled will produce the following warnings:

sysfs.c:63:30: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-truncation=]
  snprintf(filepath, 256, "%s/%s", path, filename);
                              ^~
Bump up the buffer to PATH_MAX which is the limit and account for all of
the possible NUL and separators that could lead to exceeding the
allocated buffer sizes.

Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal subsystem")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal/tools/tmon: Fix typo 'the the' in comment</title>
<updated>2022-07-28T15:29:52+00:00</updated>
<author>
<name>Slark Xiao</name>
<email>slark_xiao@163.com</email>
</author>
<published>2022-07-22T10:40:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a12f9188529d9529704b54ca51d3b6ef4a14094'/>
<id>urn:sha1:7a12f9188529d9529704b54ca51d3b6ef4a14094</id>
<content type='text'>
Replace 'the the' with 'the' in the comment.

Signed-off-by: Slark Xiao &lt;slark_xiao@163.com&gt;
Link: https://lore.kernel.org/r/20220722104047.83312-1-slark_xiao@163.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>thermal/tools/tmon: Include pthread and time headers in tmon.h</title>
<updated>2022-07-28T15:29:51+00:00</updated>
<author>
<name>Markus Mayer</name>
<email>mmayer@broadcom.com</email>
</author>
<published>2022-07-18T03:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0cf51bfe999524377fbb71becb583b4ca6d07cfc'/>
<id>urn:sha1:0cf51bfe999524377fbb71becb583b4ca6d07cfc</id>
<content type='text'>
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]: *** [&lt;builtin&gt;: 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]: *** [&lt;builtin&gt;: tui.o] Error 1
make[2]: *** [Makefile:83: tmon] Error 2

Signed-off-by: Markus Mayer &lt;mmayer@broadcom.com&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Reviewed-by: Sumeet Pawnikar &lt;sumeet.r.pawnikar@intel.com&gt;
Acked-by: Alejandro González &lt;alejandro.gonzalez.correo@gmail.com&gt;
Tested-by: Alejandro González &lt;alejandro.gonzalez.correo@gmail.com&gt;
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 &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>tools/thermal: remove unneeded semicolon</title>
<updated>2022-05-19T10:11:52+00:00</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2022-04-27T03:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb4487d2b4043bbe98f60f2628387b40fa4896f8'/>
<id>urn:sha1:cb4487d2b4043bbe98f60f2628387b40fa4896f8</id>
<content type='text'>
Fix the following coccicheck warnings:

./tools/thermal/thermometer/thermometer.c:147:3-4: Unneeded semicolon.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20220427030619.81556-2-jiapeng.chong@linux.alibaba.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>tools/thermal: Add thermal daemon skeleton</title>
<updated>2022-05-19T10:11:52+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2022-04-20T16:09:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=077df623c8344e4b50a7ba6c433f9d6857a94d6b'/>
<id>urn:sha1:077df623c8344e4b50a7ba6c433f9d6857a94d6b</id>
<content type='text'>
This change provides a simple daemon skeleton. It is an example of how
to use the thermal library which wraps all the complex code related to
the netlink and transforms it into a callback oriented code.

The goal of this skeleton is to give a base brick for anyone
interested in writing its own thermal engine or as an example to rely
on to write its own thermal monitoring implementation.

In the future, it will evolve with more features and hopefully more
logic.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Tested-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220420160933.347088-5-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>tools/thermal: Add a temperature capture tool</title>
<updated>2022-05-19T10:11:52+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2022-04-20T16:09:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=110acbc6a4518145db3a1a9c0686d730bb258bf1'/>
<id>urn:sha1:110acbc6a4518145db3a1a9c0686d730bb258bf1</id>
<content type='text'>
The 'thermometer' tool allows to capture the temperature of a set of
thermal zones defined in a configuration file at a specified rate.

It is designed to have the lowest possible overhead. It will write the
captured temperature per thermal zone per file so making easier to
write a gnuplot script.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Tested-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220420160933.347088-4-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>tools/thermal: Add util library</title>
<updated>2022-05-19T10:11:51+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2022-04-20T16:09:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3b7c5e8adf9ca64f8dd70279076de085ea6369d7'/>
<id>urn:sha1:3b7c5e8adf9ca64f8dd70279076de085ea6369d7</id>
<content type='text'>
The next changes will provide a couple of tools using some common
functions provided by this library.

It provides basic wrappers for:

 - mainloop
 - logging
 - timestamp

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Tested-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220420160933.347088-3-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>thermal: tools: tmon: remove unneeded local variable</title>
<updated>2021-11-24T16:26:13+00:00</updated>
<author>
<name>ran jianping</name>
<email>ran.jianping@zte.com.cn</email>
</author>
<published>2021-11-12T09:09:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d7fbdc575b33c374ce88ccfe3ab364f7eb240f8a'/>
<id>urn:sha1:d7fbdc575b33c374ce88ccfe3ab364f7eb240f8a</id>
<content type='text'>
Fix the following coccicheck review:
/tools/thermal/tmon/pid.c:57:5-8: Unneeded variable

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot &lt;zealci@zte.com.cn&gt;
Signed-off-by: ran jianping &lt;ran.jianping@zte.com.cn&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
