<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hwmon/hwmon.c, branch linux-4.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-04-02T14:01:53Z</updated>
<entry>
<title>hwmon: Constify str parameter of hwmon_ops-&gt;read_string</title>
<updated>2017-04-02T14:01:53Z</updated>
<author>
<name>Jean Delvare</name>
</author>
<published>2017-03-07T14:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ba6bcbc335771c37d05b88cbfcad5441b57130b'/>
<id>urn:sha1:5ba6bcbc335771c37d05b88cbfcad5441b57130b</id>
<content type='text'>
The read_string callback is supposed to retrieve a pointer to a
constant string.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Reviewed-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: Register thermal zone only if 'dev' parameter was provided</title>
<updated>2017-01-31T11:56:08Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2017-01-31T11:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=319fe159889a06b47a2621a1201c813502b7a842'/>
<id>urn:sha1:319fe159889a06b47a2621a1201c813502b7a842</id>
<content type='text'>
Rgistering a thermal zone uses devm_kzalloc(), which requires
a pointer to the parent device.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: Relax name attribute validation for new APIs</title>
<updated>2017-01-31T11:52:15Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2017-01-28T03:35:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74d3b6419772e49563877b9a3c502b763d24b075'/>
<id>urn:sha1:74d3b6419772e49563877b9a3c502b763d24b075</id>
<content type='text'>
While invalid name attributes are really not desirable and do mess up
libsensors, enforcing valid names has the detrimental effect of driving
users away from using the new hardware monitoring API, especially those
registering name attributes violating the ABI restrictions. Another
undesirable side effect is that this violation and the resulting error
may only be discovered some time after a conversion to the new API,
which in turn may trigger a revert of that conversion.

To solve the problem, relax validation and only issue a warning instead
of returning an error if a name attribute violating the ABI is provided.
This lets callers continue to provide invalid name attributes while
notifying them about it.

Many thanks are due to Dmitry Torokhov for the idea.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: Make name attribute mandatory for new APIs</title>
<updated>2017-01-25T14:14:26Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2017-01-24T14:32:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8353863a52a82c7701d9d10433bea703fd24ec2d'/>
<id>urn:sha1:8353863a52a82c7701d9d10433bea703fd24ec2d</id>
<content type='text'>
It does not make sense to use one of the the new APIs when not
even providing a name attribute. Make it mandatory.

Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (core) use permission-specific DEVICE_ATTR variants</title>
<updated>2017-01-02T18:19:45Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2016-12-22T12:04:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ab0c6c55e6d2525282e7e3e2f62032847834342'/>
<id>urn:sha1:2ab0c6c55e6d2525282e7e3e2f62032847834342</id>
<content type='text'>
Use DEVICE_ATTR_RO for read-only 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: (core) Simplify sysfs attribute name allocation</title>
<updated>2016-12-10T05:54:24Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2016-10-16T17:52:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a412d5e4a1c831723d0aaf305f1cf9a78ad9c90'/>
<id>urn:sha1:3a412d5e4a1c831723d0aaf305f1cf9a78ad9c90</id>
<content type='text'>
Allocating the sysfs attribute name only if needed and only with the
required minimum length looks optimal, but does not take the additional
overhead for both devm_ data structures and the allocation header itself
into account. This also results in unnecessary memory fragmentation.
Move the sysfs name string into struct hwmon_device_attribute and give it
a sufficient length to reduce this overhead.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (core) Rename groups parameter in API to extra_groups</title>
<updated>2016-12-10T05:54:22Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2016-10-17T00:20:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=848ba0a2f20dc121a3ef5272a24641d2bd963d8b'/>
<id>urn:sha1:848ba0a2f20dc121a3ef5272a24641d2bd963d8b</id>
<content type='text'>
The 'groups' parameter of hwmon_device_register_with_info() and
devm_hwmon_device_register_with_info() is only necessary if extra
non-standard attributes need to be provided. Rename the parameter
to extra_groups and clarify the documentation.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (core) Explain why at least two attribute groups are allocated</title>
<updated>2016-12-10T05:54:21Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2016-10-17T00:11:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2a4cc3a060da0de17ab1e854cef89f5e74e2064'/>
<id>urn:sha1:b2a4cc3a060da0de17ab1e854cef89f5e74e2064</id>
<content type='text'>
A list of sysfs attribute groups is NULL-terminated, so we always need
to allocate data for at least two groups (the dynamically generated group
plus the NULL pointer). Add a comment to explain the situation.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (core) Make is_visible callback truly mandatory</title>
<updated>2016-12-10T05:54:20Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2016-10-17T00:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=239552f495b91fc8f3fba4b5094233e053d265cb'/>
<id>urn:sha1:239552f495b91fc8f3fba4b5094233e053d265cb</id>
<content type='text'>
The is_visible callback provides the sysfs attribute mode and is thus
truly mandatory as documented. Check it once at registration and remove
other checks for its existence.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (core) Deprecate hwmon_device_register()</title>
<updated>2016-12-10T05:54:19Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2016-10-16T18:31:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af1bd36c06b5fad33baa7ee16820226efbd96cd9'/>
<id>urn:sha1:af1bd36c06b5fad33baa7ee16820226efbd96cd9</id>
<content type='text'>
Inform the user that hwmon_device_register() is deprecated,
and suggest conversion to the newest API. Also remove
hwmon_device_register() from the kernel API documentation.

Note that hwmon_device_register() is not marked as __deprecated()
since doing so might result in build errors.

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