2014-07-07 19:07:09

by Rickard Strandqvist

[permalink] [raw]
Subject: [PATCH v2] pinctrl: pinctrl-msm.c: Cleaning up variable that is never used

Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <[email protected]>
---
drivers/pinctrl/pinctrl-msm.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-msm.c b/drivers/pinctrl/pinctrl-msm.c
index df6dda4c..821c562 100644
--- a/drivers/pinctrl/pinctrl-msm.c
+++ b/drivers/pinctrl/pinctrl-msm.c
@@ -176,9 +176,6 @@ static void msm_pinmux_disable(struct pinctrl_dev *pctldev,

g = &pctrl->soc->groups[group];

- if (WARN_ON(g->mux_bit < 0))
- return;
-
spin_lock_irqsave(&pctrl->lock, flags);

/* Clear the mux bits to select gpio mode */
--
1.7.10.4


2014-07-09 10:20:50

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2] pinctrl: pinctrl-msm.c: Cleaning up variable that is never used

On Mon, Jul 7, 2014 at 9:08 PM, Rickard Strandqvist
<[email protected]> wrote:

> Variable ar assigned a value that is never used.
> I have also removed all the code that thereby serves no purpose.
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <[email protected]>

Aw sorry - the disable() functions were all deleted in another
patch set so this is no longer a problem.

I should have noticed at once, but my brain is a bit messy due
to too many things to think about :-/

Yours,
Linus Walleij