Re: [PATCH] i8k: Fix temperature bug handling in i8k_get_temp()
From: Pali RohÃr
Date: Sun Nov 30 2014 - 09:45:28 EST
On Sunday 30 November 2014 01:12:07 Guenter Roeck wrote:
> > diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
> > index 7272b08..e34a019 100644
> > --- a/drivers/char/i8k.c
> > +++ b/drivers/char/i8k.c
> > @@ -298,7 +298,7 @@ static int i8k_get_temp(int sensor)
> >
> > int temp;
> >
> > #ifdef I8K_TEMPERATURE_BUG
> >
> > - static int prev[4];
> > + static int prev[4] = { I8K_MAX_TEMP+1, I8K_MAX_TEMP+1,
> > I8K_MAX_TEMP+1, I8K_MAX_TEMP+1 };
>
> This results in a checkpatch warning. Please split, and add a
> space before and after '+'. Actually, I would suggest to use
> something something like
>
> #define I8K_INVALID_TEMP (I8K_MAX_TEMP + 1)
>
> and to use it instead of hard-coding "I8K_MAX_TEMP + 1" in the
> code.
I will define I8K_INVALID_TEMP and use it instead I8K_MAX_TEMP.
--
Pali RohÃr
pali.rohar@xxxxxxxxx
Attachment:
signature.asc
Description: This is a digitally signed message part.