From: Stephen Boyd Date: Fri, 28 Aug 2015 19:31:10 +0000 (-0700) Subject: spmi: pmic-arb: u8 <= 0xff is always true X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b76968db6869666c9b30ea99894e9dd88a0ab13;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git spmi: pmic-arb: u8 <= 0xff is always true Silences this static checker warning: drivers/spmi/spmi-pmic-arb.c:363 pmic_arb_write_cmd() warn: always true condition '(opc <= 255) => (0-255 <= 255)' Cc: Andy Gross Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index fce5c0d9e3bd..96615d807694 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -360,7 +360,7 @@ static int pmic_arb_write_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, opc = PMIC_ARB_OP_EXT_WRITE; else if (opc >= 0x30 && opc <= 0x37) opc = PMIC_ARB_OP_EXT_WRITEL; - else if (opc >= 0x80 && opc <= 0xFF) + else if (opc >= 0x80) opc = PMIC_ARB_OP_ZERO_WRITE; else return -EINVAL;