Thank you Krzysztof for your review. This 2nd rev does: - rebases on Marks GIT tree (thought I had, sorry) - fixes all 80-column probs in last, plus a few others - adopts new fashion int nr = to_sensor_dev_attr(devattr)->index; - folds many one-caller functions into the caller - converts remaining fn-generating macros to plain old functions WRT types and conversions in the *_FROM/TO_REG macros, thanks for the detailed review, tracing thru the conversions is time consuming, and feels error prone.. - I dropped the (long) casts in some cases, - and pushed them down into the macros in others - Im disappointed that sparse/C=1 didnt identify these things Im reluctant to do more here (Do No Harm, leave well enough alone). It seems that a full review, and conversion to static inline functions is warranted, and probably should be done separately. Ive now seen Jean's comments, and have manually (I hope fully) backed out the three 'types and conversions' fixes above, reverting to original form. I have a set of interim diffs, so I *could* go back and reconstruct things, but I would *really* like to avoid doing so; its tedious and error prone. FWIW - the patch results in a smaller object. 14627 2464 36 17127 42e7 lx-git-hwmon/drivers/hwmon/w83627hf.ko 12895 2676 36 15607 3cf7 lx-git-hwmon-demacro/drivers/hwmon/w83627hf.ko --- Convert hwmon/w83627hf to use dynamic sysfs callbacks, replacing the function-generating macros. Signed-off-by: Jim Cromie