linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spmi: pmic-arb: u8 <= 0xff is always true
@ 2015-08-28 19:31 Stephen Boyd
  2015-08-28 19:55 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2015-08-28 19:31 UTC (permalink / raw)
  To: linux-arm-kernel

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>
Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Stephen Boyd <sboyd@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 5e834bd23c09..c7aa6f1a898e 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;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] spmi: pmic-arb: u8 <= 0xff is always true
  2015-08-28 19:31 [PATCH] spmi: pmic-arb: u8 <= 0xff is always true Stephen Boyd
@ 2015-08-28 19:55 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2015-08-28 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri 28 Aug 12:31 PDT 2015, Stephen Boyd wrote:

> 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>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-28 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-28 19:31 [PATCH] spmi: pmic-arb: u8 <= 0xff is always true Stephen Boyd
2015-08-28 19:55 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).