Re: [lm-sensors] [PATCH 3/8] hwmon: applesmc: Dynamic creation oftemperature files

From: Guenter Roeck
Date: Thu Nov 04 2010 - 22:24:52 EST


On Sun, Oct 31, 2010 at 03:50:29AM -0400, Henrik Rydberg wrote:
> The current driver creates temperature files based on a list
> of temperature keys given per device. Apart from slow adaption
> to new machine models, the number of sensors also depends on
> the number of processors. This patch looks up the temperature
> keys dynamically, thereby supporting all models.
>
> Signed-off-by: Henrik Rydberg <rydberg@xxxxxxxxxxx>

Hi Henrik,

Nice cleanup. Just a coule of minor comments.

> ---
> drivers/hwmon/applesmc.c | 498 +++++++++++-----------------------------------
> 1 files changed, 113 insertions(+), 385 deletions(-)
>
> diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
> index 7f030f0..0207618 100644
> --- a/drivers/hwmon/applesmc.c
> +++ b/drivers/hwmon/applesmc.c
[ ...]
>
> - pr_info("key=%d\n", s->key_count);
> + pr_info("key=%d temp=%d\n", s->key_count, s->temp_count);

Is this useful or just noisy ? How about pr_debug instead ?

>
> return 0;
> }

[ ... ]

> @@ -1429,13 +1122,66 @@ static int applesmc_dmi_match(const struct dmi_system_id *id)
> pr_info(" - Model %s light sensors and backlight\n",
> applesmc_light ? "with" : "without");
>
> - applesmc_temperature_set = dmi_data->temperature_set;
> - while (temperature_sensors_sets[applesmc_temperature_set][i] != NULL)
> - i++;
> - pr_info(" - Model with %d temperature sensors\n", i);
> +

This results in another double empty line.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/