Message ID | 1499086338-19498-5-git-send-email-kgunda@codeaurora.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | Andy Gross |
Headers | show |
On 07/03, Kiran Gunda wrote: > From: Fenglin Wu <fenglinw@codeaurora.org> > > The opc parameter in pmic_arb_write_cmd() function is defined with type > u8 and it's always greater than or equal to 0. Checking that it's not > less than 0 is redundant and it can cause a forbidden warning during > compilation. Remove the check. > > Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org> > --- Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
On 07/03, Kiran Gunda wrote: > From: Fenglin Wu <fenglinw@codeaurora.org> > > The opc parameter in pmic_arb_write_cmd() function is defined with type > u8 and it's always greater than or equal to 0. Checking that it's not > less than 0 is redundant and it can cause a forbidden warning during > compilation. Remove the check. > > Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org> > --- You forgot your sign-off here.
On 2017-07-06 12:23, Stephen Boyd wrote: > On 07/03, Kiran Gunda wrote: >> From: Fenglin Wu <fenglinw@codeaurora.org> >> >> The opc parameter in pmic_arb_write_cmd() function is defined with >> type >> u8 and it's always greater than or equal to 0. Checking that it's not >> less than 0 is redundant and it can cause a forbidden warning during >> compilation. Remove the check. >> >> Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org> >> --- > > You forgot your sign-off here. yeah.. forgot. Will add it. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c index bc88c19..b49e77a 100644 --- a/drivers/spmi/spmi-pmic-arb.c +++ b/drivers/spmi/spmi-pmic-arb.c @@ -417,7 +417,7 @@ static int pmic_arb_write_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, /* Check the opcode */ if (opc >= 0x40 && opc <= 0x5F) opc = PMIC_ARB_OP_WRITE; - else if (opc >= 0x00 && opc <= 0x0F) + else if (opc <= 0x0F) opc = PMIC_ARB_OP_EXT_WRITE; else if (opc >= 0x30 && opc <= 0x37) opc = PMIC_ARB_OP_EXT_WRITEL;