Skip to content
Snippets Groups Projects
Commit 3a412d5e authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (core) Simplify sysfs attribute name allocation


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: default avatarGuenter Roeck <linux@roeck-us.net>
parent 848ba0a2
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment