lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A9E308E.60505@geomatys.fr>
Date:	Wed, 02 Sep 2009 10:45:02 +0200
From:	"corentin.labbe" <corentin.labbe@...matys.fr>
To:	tomaz.mertelj@...st.arnes.si
CC:	lm-sensors@...sensors.org, linux-kernel@...r.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: Driver for Texas Instruments amc6821
 chip

tomaz.mertelj@...st.arnes.si a écrit :
> I have crafted a hwmon driver for Texas Instruments amc6821 SMB-bus 2-
> channel temperature sensor, pwm controller. This is my first linux project 
> so some corrections will be necessary.
> 
> T. Mertelj

Hello

I have some warnings

  CC      drivers/hwmon/amc6821.o
drivers/hwmon/amc6821.c: In function `set_temp1_auto_point_temp':
drivers/hwmon/amc6821.c:390: warning: comparison is always true due to limited range of data type
drivers/hwmon/amc6821.c: In function `set_temp2_auto_point_temp':
drivers/hwmon/amc6821.c:391: warning: comparison is always true due to limited range of data type
drivers/hwmon/amc6821.c: In function `set_pwm1_auto_point_pwm':
drivers/hwmon/amc6821.c:408: warning: comparison is always true due to limited range of data type
drivers/hwmon/amc6821.c:419: warning: comparison is always true due to limited range of data type

you use tmp as a unsigned 8 bit so it is always >= 0 (it can't be below 0)
Prefer use:
s8 tmp;


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ