2020-04-07 10:35:00

by Light Hsieh (謝明燈)

[permalink] [raw]
Subject: [PATCH v1 1/1] pinctrl: mediatek: remove shadow variable declaration

From: Light Hsieh <[email protected]>

Remove shadow declaration of variable 'pullup' in mtk_pinconf_get()

Signed-off-by: Light Hsieh <[email protected]>
---
drivers/pinctrl/mediatek/pinctrl-paris.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
index 83bf29c..8f75115 100644
--- a/drivers/pinctrl/mediatek/pinctrl-paris.c
+++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
@@ -164,8 +164,6 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
case MTK_PIN_CONFIG_PU_ADV:
case MTK_PIN_CONFIG_PD_ADV:
if (hw->soc->adv_pull_get) {
- bool pullup;
-
pullup = param == MTK_PIN_CONFIG_PU_ADV;
err = hw->soc->adv_pull_get(hw, desc, pullup, &ret);
} else
--
1.8.1.1.dirty


2020-04-07 13:39:26

by Stanley Chu

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] pinctrl: mediatek: remove shadow variable declaration

Hi Light,

On Tue, 2020-04-07 at 18:33 +0800, [email protected] wrote:
> From: Light Hsieh <[email protected]>
>
> Remove shadow declaration of variable 'pullup' in mtk_pinconf_get()
>
> Signed-off-by: Light Hsieh <[email protected]>
> ---
> drivers/pinctrl/mediatek/pinctrl-paris.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
> index 83bf29c..8f75115 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-paris.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
> @@ -164,8 +164,6 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
> case MTK_PIN_CONFIG_PU_ADV:
> case MTK_PIN_CONFIG_PD_ADV:
> if (hw->soc->adv_pull_get) {
> - bool pullup;
> -
> pullup = param == MTK_PIN_CONFIG_PU_ADV;
> err = hw->soc->adv_pull_get(hw, desc, pullup, &ret);
> } else

Reviewed-by: Stanley Chu <[email protected]>

2020-04-07 13:42:54

by Yingjoe Chen

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] pinctrl: mediatek: remove shadow variable declaration

On Tue, 2020-04-07 at 18:33 +0800, [email protected] wrote:
> From: Light Hsieh <[email protected]>
>
> Remove shadow declaration of variable 'pullup' in mtk_pinconf_get()
>
> Signed-off-by: Light Hsieh <[email protected]>
> ---
> drivers/pinctrl/mediatek/pinctrl-paris.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c
> index 83bf29c..8f75115 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-paris.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c
> @@ -164,8 +164,6 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
> case MTK_PIN_CONFIG_PU_ADV:
> case MTK_PIN_CONFIG_PD_ADV:
> if (hw->soc->adv_pull_get) {
> - bool pullup;
> -
> pullup = param == MTK_PIN_CONFIG_PU_ADV;
> err = hw->soc->adv_pull_get(hw, desc, pullup, &ret);
> } else

Hi, Light,

What is this based on?
The code in v5.6 doesn't looks like this.

Joe.C


2020-04-16 08:08:27

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] pinctrl: mediatek: remove shadow variable declaration

On Tue, Apr 7, 2020 at 12:34 PM <[email protected]> wrote:

> From: Light Hsieh <[email protected]>
>
> Remove shadow declaration of variable 'pullup' in mtk_pinconf_get()
>
> Signed-off-by: Light Hsieh <[email protected]>

Patch applied for fixes, thanks for fixing this!

Yours,
Linus Walleij