Hi,

Static analysis on linux-next has found a potential issue in commit:

commit 95ededc17e4e55a5fbb106f63cea06defc963a37
Author: AngeloGioacchino Del Regno <[email protected]>
Date:   Sat Oct 5 12:41:31 2019 +0200

    thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976


Namely in drivers/thermal/qcom/tsens-v1.c, function calibrate_8976().
The analysis is as follows:

        switch (mode) {
        case TWO_PT_CALIB:

CID 90463 (#1 of 1): Operands don't affect result
(CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: (qfprom_cdata[2] & 255) >> 8 is 0
regardless of the values of its operands. This occurs as the operand of
assignment.

                base1 = (qfprom_cdata[2] & MSM8976_BASE1_MASK) >>
MSM8976_BASE1_SHIFT;

This seems to indicate that the shift and/or mask is not correct as the
result will always be zero.

Colin

Reply via email to