<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/hwmon/gl520sm.c, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-01-10T16:59:35+00:00</updated>
<entry>
<title>hwmon: (gl520sm) Fix overflows and crash seen when writing into limit attributes</title>
<updated>2017-01-10T16:59:35+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-12-27T22:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87cdfa9d60f4f40e6d71b04b10b36d9df3c89282'/>
<id>urn:sha1:87cdfa9d60f4f40e6d71b04b10b36d9df3c89282</id>
<content type='text'>
Writes into limit attributes can overflow due to multplications and
additions with unbound input values. Writing into fan limit attributes
can result in a crash with a division by zero if very large values are
written and the fan divider is larger than 1.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (gl520sm) use permission-specific DEVICE_ATTR variants</title>
<updated>2017-01-02T18:19:45+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-12-22T12:04:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2579b7ff0804929b798c4040c703f24a01df192a'/>
<id>urn:sha1:2579b7ff0804929b798c4040c703f24a01df192a</id>
<content type='text'>
Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for
read/write attributes. This simplifies the source code, improves
readbility, and reduces the chance of inconsistencies.

The conversion was done automatically using coccinelle. It was validated
by compiling both the old and the new source code and comparing its text,
data, and bss size.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
[groeck: Updated description]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (gl520sm) Convert to devm_hwmon_device_register_with_groups</title>
<updated>2014-08-04T14:01:36+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2014-07-03T01:50:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d1b9c3f50304376f365e305ff61c3ae9a358e2f9'/>
<id>urn:sha1:d1b9c3f50304376f365e305ff61c3ae9a358e2f9</id>
<content type='text'>
Use ATTRIBUTE_GROUPS macro and devm_hwmon_device_register_with_groups() to
simplify the code a bit.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (gl520sm) Avoid forward declaration</title>
<updated>2014-08-04T14:01:36+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2014-07-03T01:49:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df51f2d7bc8bf99a7f9c29b2f334e412613c2efc'/>
<id>urn:sha1:df51f2d7bc8bf99a7f9c29b2f334e412613c2efc</id>
<content type='text'>
Reorder functions to avoid forward declaration.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: Replace SENSORS_LIMIT with clamp_val</title>
<updated>2013-01-26T05:03:54+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2013-01-09T16:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2a844c148e1f714ebf42cb96e1b172ce394c36c9'/>
<id>urn:sha1:2a844c148e1f714ebf42cb96e1b172ce394c36c9</id>
<content type='text'>
SENSORS_LIMIT and the generic clamp_val have the same functionality,
and clamp_val is more efficient.

This patch reduces text size by 9052 bytes and bss size by 11624 bytes
for x86_64 builds.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: George Joseph &lt;george.joseph@fairview5.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (gl520sm) Convert to use devm_ functions</title>
<updated>2012-07-22T04:48:40+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2012-06-02T16:58:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=647ff514d8a099fcce029283c1ecc38519b218d6'/>
<id>urn:sha1:647ff514d8a099fcce029283c1ecc38519b218d6</id>
<content type='text'>
Convert to use devm_ functions to reduce code size and simplify the code.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (gl520sm) Fix: do not use assignment in if condition</title>
<updated>2012-03-19T01:27:23+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2012-01-17T00:56:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f445a9af939a6989e356a25ca97ea691d98bc336'/>
<id>urn:sha1:f445a9af939a6989e356a25ca97ea691d98bc336</id>
<content type='text'>
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Replace repeated calls to device_create_file() with calls to sysfs_create_group.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (gl520sm) Fix checkpatch issues</title>
<updated>2012-03-19T01:27:23+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2012-01-14T21:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=43da3d123a6ec556a2e1b69a3b9c7d33af965fa0'/>
<id>urn:sha1:43da3d123a6ec556a2e1b69a3b9c7d33af965fa0</id>
<content type='text'>
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '&lt;=' (ctx:VxV)
ERROR: spaces required around that '&lt;' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxV)
ERROR: trailing statements should be on next line
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not always fixed (complexity):
ERROR: do not use assignment in if condition

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: convert drivers/hwmon/* to use module_i2c_driver()</title>
<updated>2012-03-19T01:26:50+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-01-20T07:38:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f0967eea80ec2a19a4fe1ad27e3ff1b22c79a3c7'/>
<id>urn:sha1:f0967eea80ec2a19a4fe1ad27e3ff1b22c79a3c7</id>
<content type='text'>
This patch converts the drivers in drivers/hwmon/* to use the
module_i2c_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Corentin Labbe &lt;corentin.labbe@geomatys.fr&gt;
Cc: Dirk Eibach &lt;eibach@gdsys.de&gt;
Cc: "Mark M. Hoffman" &lt;mhoffman@lightlink.com&gt;
Cc: Steve Glendinning &lt;steve.glendinning@smsc.com&gt;
Cc: Riku Voipio &lt;riku.voipio@iki.fi&gt;
Cc: Guillaume Ligneul &lt;guillaume.ligneul@gmail.com&gt;
Cc: David George &lt;david.george@ska.ac.za&gt;
Cc: "Hans J. Koch" &lt;hjk@hansjkoch.de&gt;
Cc: Marc Hulsman &lt;m.hulsman@tudelft.nl&gt;
Cc: Rudolf Marek &lt;r.marek@assembler.cz&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
</entry>
<entry>
<title>hwmon: Use i2c_smbus_{read,write}_word_swapped</title>
<updated>2011-11-04T11:00:47+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-11-04T11:00:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=90f4102ce59226954edbe960b2434d8b3da5f086'/>
<id>urn:sha1:90f4102ce59226954edbe960b2434d8b3da5f086</id>
<content type='text'>
Make use of the new i2c_smbus_{read,write}_word_swapped functions.
This makes the driver code more compact and readable. It also ensures
proper error handling.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Acked-by: Jonathan Cameron &lt;jic23@cam.ac.uk&gt;
Acked-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Dirk Eibach &lt;eibach@gdsys.de&gt;
Cc: "Mark M. Hoffman" &lt;mhoffman@lightlink.com&gt;
Cc: Guillaume Ligneul &lt;guillaume.ligneul@gmail.com&gt;
</content>
</entry>
</feed>
