aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spmi
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-08-28 12:31:10 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-04 13:03:15 +0100
commit9b76968db6869666c9b30ea99894e9dd88a0ab13 (patch)
treeaf431cbb3786c6e3bebe50b20e080e8268efc39f /drivers/spmi
parentd5144796db928b1f7a074c4be3575c50951c9569 (diff)
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 <agross@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spmi')
-rw-r--r--drivers/spmi/spmi-pmic-arb.c2
1 files changed, 1 insertions, 1 deletions
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;

Privacy Policy