<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/hwmon/lm80.c, branch linux-4.4.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-05-26T09:27:32+00:00</updated>
<entry>
<title>Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe"</title>
<updated>2021-05-26T09:27:32+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-05-03T11:56:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d068fef7a1ced8d35f03a3064c2873cad0bcfdec'/>
<id>urn:sha1:d068fef7a1ced8d35f03a3064c2873cad0bcfdec</id>
<content type='text'>
commit 99ae3417672a6d4a3bf68d4fc43d7c6ca074d477 upstream.

This reverts commit 9aa3aa15f4c2f74f47afd6c5db4b420fadf3f315.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, it was determined that this commit is not needed at all so
just revert it.  Also, the call to lm80_init_client() was not properly
handled, so if error handling is needed in the lm80_probe() function,
then it should be done properly, not half-baked like the commit being
reverted here did.

Cc: Kangjie Lu &lt;kjlu@umn.edu&gt;
Fixes: 9aa3aa15f4c2 ("hwmon: (lm80) fix a missing check of bus read in lm80 probe")
Cc: stable &lt;stable@vger.kernel.org&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20210503115736.2104747-5-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) Fix missing unlock on error in set_fan_div()</title>
<updated>2019-02-23T08:05:13+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2018-12-26T11:28:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27763b01a4ff6a7cd87ed388f317ac489631468b'/>
<id>urn:sha1:27763b01a4ff6a7cd87ed388f317ac489631468b</id>
<content type='text'>
[ Upstream commit 07bd14ccc3049f9c0147a91a4227a571f981601a ]

Add the missing unlock before return from function set_fan_div()
in the error handling case.

Fixes: c9c63915519b ("hwmon: (lm80) fix a missing check of the status of SMBus read")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) fix a missing check of bus read in lm80 probe</title>
<updated>2019-02-20T09:13:12+00:00</updated>
<author>
<name>Kangjie Lu</name>
<email>kjlu@umn.edu</email>
</author>
<published>2018-12-21T19:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=90beb6bbed6719bf5ee73dadebe6fd99cb57cc98'/>
<id>urn:sha1:90beb6bbed6719bf5ee73dadebe6fd99cb57cc98</id>
<content type='text'>
[ Upstream commit 9aa3aa15f4c2f74f47afd6c5db4b420fadf3f315 ]

In lm80_probe(), if lm80_read_value() fails, it returns a negative
error number which is stored to data-&gt;fan[f_min] and will be further
used. We should avoid using the data if the read fails.

The fix checks if lm80_read_value() fails, and if so, returns with the
error number.

Signed-off-by: Kangjie Lu &lt;kjlu@umn.edu&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) fix a missing check of the status of SMBus read</title>
<updated>2019-02-20T09:13:12+00:00</updated>
<author>
<name>Kangjie Lu</name>
<email>kjlu@umn.edu</email>
</author>
<published>2018-12-21T19:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=259c502d0a0fee860097ed5fa0061223a302003b'/>
<id>urn:sha1:259c502d0a0fee860097ed5fa0061223a302003b</id>
<content type='text'>
[ Upstream commit c9c63915519b1def7043b184680f33c24cd49d7b ]

If lm80_read_value() fails, it returns a negative number instead of the
correct read data. Therefore, we should avoid using the data if it
fails.

The fix checks if lm80_read_value() fails, and if so, returns with the
error number.

Signed-off-by: Kangjie Lu &lt;kjlu@umn.edu&gt;
[groeck: One variable for return values is enough]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) Rearrange code to avoid forward declarations</title>
<updated>2014-05-21T23:02:26+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-13T18:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c254ffdefc002b57f1e9eedddcb3569c0d80578f'/>
<id>urn:sha1:c254ffdefc002b57f1e9eedddcb3569c0d80578f</id>
<content type='text'>
Avoid need for forward declarations by rearranging code.

No functional change.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) Convert fan display function macros into functions</title>
<updated>2014-05-21T23:02:26+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-13T18:28:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=85b3ee07b986e90d5e9821dcb28bde340dfc7805'/>
<id>urn:sha1:85b3ee07b986e90d5e9821dcb28bde340dfc7805</id>
<content type='text'>
Convert fan display function macros into functions to reduce
code size and improve code readability.

Code size reduction is about 200 bytes on x86_64.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) Convert voltage display function macros into functions</title>
<updated>2014-05-21T23:02:26+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-13T17:53:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1adf3a3e1cf2ceb30c32642ff35cb05467dc7a75'/>
<id>urn:sha1:1adf3a3e1cf2ceb30c32642ff35cb05467dc7a75</id>
<content type='text'>
Convert voltage display function macros into functions to reduce
code size and improve code readability.

Code size reduction is about 600 bytes on x86_64.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) Convert temperature display function macros into functions</title>
<updated>2014-05-21T23:02:26+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-13T16:45:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9711bcddde206047415b2eb42c545ad2b1ac8b76'/>
<id>urn:sha1:9711bcddde206047415b2eb42c545ad2b1ac8b76</id>
<content type='text'>
Convert temperature display function macros into functions to reduce
code size and improve code readability.

Code size reduction is about 2k on x86_64.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) Normalize all temperature values to 16 bit</title>
<updated>2014-05-21T23:02:26+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-13T16:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=688a3174a2a0426a898dc641226249fa0df9e922'/>
<id>urn:sha1:688a3174a2a0426a898dc641226249fa0df9e922</id>
<content type='text'>
Normalize all stored temperature values to 16 bit to simplify
temperature calculations.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (lm80) Simplify TEMP_FROM_REG</title>
<updated>2014-05-21T23:02:26+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2014-04-13T16:15:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9028ff8e3dd207375d2459079f728322671069ac'/>
<id>urn:sha1:9028ff8e3dd207375d2459079f728322671069ac</id>
<content type='text'>
TEMP_FROM_REG gets 12 bits of temperature data in the upper 12 bit
of a signed 16 bit parameter, with the integer part (including sign)
in the upper 8 bit and the remainder in bit 4..7. The lower 4 bit of
the 16 bit data is always 0. We can use that information to convert
the temperature directly into display data (1/1000th of degree C).

Note that the stored temperature data is not shifted right as the
comment claimed, so remove that misleading comment.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
</feed>
