Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1679975
| From | Kiran Gunda <kgunda@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V1 4/4] spmi: pmic-arb: Remove checking opc value not less than 0 |
| Date | 2017-07-03 15:00 +0200 |
| Message-ID | <tZ97j-1Az-9@gated-at.bofh.it> (permalink) |
| References | <tZ97j-1Az-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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> --- drivers/spmi/spmi-pmic-arb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH V1 4/4] spmi: pmic-arb: Remove checking opc value not less than 0 Kiran Gunda <kgunda@codeaurora.org> - 2017-07-03 15:00 +0200
Re: [PATCH V1 4/4] spmi: pmic-arb: Remove checking opc value not less than 0 Stephen Boyd <sboyd@codeaurora.org> - 2017-07-06 09:00 +0200
Re: [PATCH V1 4/4] spmi: pmic-arb: Remove checking opc value not less than 0 kgunda@codeaurora.org - 2017-07-06 12:30 +0200
csiph-web