kernel_optimize_test/drivers/w1
Ivan Zaentsev 1ad8f7fc4a w1: w1_therm: Fix conversion result for negative temperatures
commit 2f6055c26f1913763eabc66c7c27d0693561e966 upstream.

DS18B20 device driver returns an incorrect value for negative temperatures
due to a missing sign-extension in w1_DS18B20_convert_temp().

Fix by using s16 temperature value when converting to int.

Fixes: 9ace0b4dab (w1: w1_therm: Add support for GXCAS GX20MH01 device.)
Cc: stable <stable@vger.kernel.org>
Reported-by: Paweł Marciniak <sunwire@gmail.com>
Signed-off-by: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru>
Link: https://lore.kernel.org/r/20210121093021.224764-1-ivan.zaentsev@wirenboard.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-04 11:37:18 +01:00
..
masters w1: mxc_w1: Fix timeout resolution problem leading to bus error 2020-10-02 15:53:25 +02:00
slaves w1: w1_therm: Fix conversion result for negative temperatures 2021-03-04 11:37:18 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
w1_family.c
w1_int.c
w1_internal.h
w1_io.c
w1_netlink.c
w1_netlink.h w1: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
w1.c w1: Constify static w1_family_ops structs 2020-10-05 13:21:49 +02:00