Re: [lm-sensors] [PATCH 6/8] hwmon: applesmc: Dynamic creation offan files

From: Guenter Roeck
Date: Thu Nov 04 2010 - 23:00:24 EST


On Sun, Oct 31, 2010 at 03:50:32AM -0400, Henrik Rydberg wrote:
> With the dynamic temperature group in place, the setup of fans
> can be simplified. This patch sets up the fans dynamically, removing
> a hundred lines of code.
>
> Signed-off-by: Henrik Rydberg <rydberg@xxxxxxxxxxx>

Hi Henrik,

just one minor comment.

> ---
> drivers/hwmon/applesmc.c | 188 +++++++++++-----------------------------------
> 1 files changed, 43 insertions(+), 145 deletions(-)
>
> diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
> index abbff0b..4ba20ec 100644
> --- a/drivers/hwmon/applesmc.c
> +++ b/drivers/hwmon/applesmc.c
[ ... ]

> static int applesmc_init_smcreg_try(void)
> {
> struct applesmc_registers *s = &smcreg;
> + u8 tmp[4];

Why tmp[4] if you only read one byte ?

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/