[lm-sensors] [patch] hwmon: w83781d - check return code of device_create_file
jim.cromie at gmail.com
Fri Sep 22 06:31:16 CEST 2006
Add 2 attr-file groups (for base and model-specific attrs respectively),
create the base group with single call to sysfs_create_group,
check the return code on individual calls to device_create_file for each
of the model-specific attr-files.
Signed-off-by: Jim Cromie <jim.cromie at gmail.com>
This is compile-tested only, needs validation on hardware, or
very thorough inspection.
w83781d.c | 292
1 files changed, 155 insertions(+), 137 deletions(-)
> Can you please get rid of all these macros while you're here? I didn't
> like them much before, but now it's even worse as they are never
> functions not constants but random code exerpts, which is quite
> misleading and could cause a lot of confusion later. This would also
> let you return the error values properly.
theyre gone. (the file_<foo> macros)
There are several distasteful macro-function-decl-expansions still there :
and also a compound one: This one in particular is crying for a
Ill do it (its my axe, Ill grind it some more ;-), IFF you find a tester
Anyway, thats not for 19.
#define sysfs_in_offsets(offset) \
sysfs_in_reg_offset(min, offset); \
These all addressed :
> No blank line here please.
> Nor here.
> And no comma here.
> Mark and I went for _group_opt and _attributes_opt suffixes. It's of
> course arbitrary, but maybe you can do the same for consistency?
> This should be inside the if (data) conditional - subclients have no
> sysfs files.
> Care to respin a patch? I'd like to have all these fixes in -mm soon.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15978 bytes
Desc: not available
More information about the lm-sensors