bmcsensors: Fix several compilation warnings.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4276 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-01-02 18:35:41 +00:00
1 parent 7bb9db17d8
commit 4a82f3e86c
2 files changed
+6 -10

No files matched your search

+1
View File
@@ -16,6 +16,7 @@ SVN HEAD
Add adm1029 support (Corentin Labbe)
Man page i2cdetect.8: Describe the output convention
Man page sensors.1: Update (option -c) and clean up
Module bmcsensors: Fix several warnings
Module i2c-i801: Add ICH9 support
Module f71805f: Fix the device address decoding (2.6 backport)
Module icspll: Delete. It was useless and dangerous.
+5 -10
View File
@@ -37,13 +37,6 @@
#define DEBUG 1
*/
static unsigned short normal_i2c[] = { SENSORS_I2C_END };
static unsigned short normal_i2c_range[] = { SENSORS_I2C_END };
static unsigned int normal_isa[] = { SENSORS_ISA_END };
static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
SENSORS_INSMOD_1(bmcsensors);
struct bmcsensors_data {
struct semaphore lock;
int sysctl_id;
@@ -218,8 +211,10 @@ static void ipmi_sprintf(u8 * to, u8 * from, u8 type, u8 length)
case 2: /* packed ascii */ /* if not a mult. of 3 this will run over */
for(i = 0; i < length; i += 3) {
*to++ = *from & 0x3f;
*to++ = *from++ >> 6 | ((*from & 0xf) << 2);
*to++ = *from++ >> 4 | ((*from & 0x3) << 4);
*to++ = *from >> 6 | ((*(from+1) & 0xf) << 2);
from++;
*to++ = *from >> 4 | ((*(from+1) & 0x3) << 4);
from++;
*to++ = (*from++ >> 2) & 0x3f;
}
*to = 0;
@@ -298,7 +293,7 @@ static void bmcsensors_select_thresholds(struct sdrdata * sd)
}
/* swap lim1/lim2 if m < 0 or function is 1/x (but not both!) */
if(sd->m < 0 && sd->linear != 7 || sd->m >= 0 && sd->linear == 7) {
if((sd->m < 0 && sd->linear != 7) || (sd->m >= 0 && sd->linear == 7)) {
tmp = sd->lim1;
sd->lim1 = sd->lim2;
sd->lim2 = tmp;