diff mbox series

[-next] pinctrl: mediatek: simplify the return expression of mtk_pinconf_bias_disable_set_rev1()

Message ID 20200921131056.92848-1-miaoqinglang@huawei.com
State New
Headers show
Series [-next] pinctrl: mediatek: simplify the return expression of mtk_pinconf_bias_disable_set_rev1() | expand

Commit Message

Qinglang Miao Sept. 21, 2020, 1:10 p.m. UTC
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Sean Wang Sept. 27, 2020, 6:39 p.m. UTC | #1
On Mon, Sep 21, 2020 at 6:10 AM Qinglang Miao <miaoqinglang@huawei.com> wrote:
>
> Simplify the return expression.
>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>

Acked-by: Sean Wang <sean.wang@kernel.org>

> ---
>  drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> index 2f3dfb56c..16bb15226 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> @@ -479,14 +479,8 @@ EXPORT_SYMBOL_GPL(mtk_pinconf_bias_get);
>  int mtk_pinconf_bias_disable_set_rev1(struct mtk_pinctrl *hw,
>                                       const struct mtk_pin_desc *desc)
>  {
> -       int err;
> -
> -       err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_PULLEN,
> -                              MTK_DISABLE);
> -       if (err)
> -               return err;
> -
> -       return 0;
> +       return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_PULLEN,
> +                               MTK_DISABLE);
>  }
>  EXPORT_SYMBOL_GPL(mtk_pinconf_bias_disable_set_rev1);
>
> --
> 2.23.0
>
Linus Walleij Sept. 30, 2020, 8:53 a.m. UTC | #2
On Mon, Sep 21, 2020 at 3:10 PM Qinglang Miao <miaoqinglang@huawei.com> wrote:

> Simplify the return expression.
>
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>

This patch does not apply to the pinctrl "devel" branch, please
rebase and resend, include Sean's ACK.
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=devel

Yours,
Linus Walleij
Qinglang Miao Sept. 30, 2020, 9:39 a.m. UTC | #3
在 2020/9/30 16:53, Linus Walleij 写道:
> On Mon, Sep 21, 2020 at 3:10 PM Qinglang Miao <miaoqinglang@huawei.com> wrote:
> 
>> Simplify the return expression.
>>
>> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> 
> This patch does not apply to the pinctrl "devel" branch, please
> rebase and resend, include Sean's ACK.
> https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=devel
> 
> Yours,
> Linus Walleij
> .
> 
Hi Linus,

I tried to rebase this patch to the pinctrl "devel" branch but there's 
no conflict. Could you please try again or show me some details?

Thanks.
Linus Walleij Sept. 30, 2020, 9:47 a.m. UTC | #4
On Wed, Sep 30, 2020 at 11:39 AM miaoqinglang <miaoqinglang@huawei.com> wrote:

> I tried to rebase this patch to the pinctrl "devel" branch but there's
> no conflict. Could you please try again or show me some details?

If you used "git rebase" this might work for you because the git tree
can do a more intelligent rebase than me. I only have the patches
and they do not contain context.

However I actually want to apply it on a clean v5.9-rc1 (that's what
I actually tried, sorry for the confusion) but maybe it has some
dependencies so that does not work?

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
index 2f3dfb56c..16bb15226 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
@@ -479,14 +479,8 @@  EXPORT_SYMBOL_GPL(mtk_pinconf_bias_get);
 int mtk_pinconf_bias_disable_set_rev1(struct mtk_pinctrl *hw,
 				      const struct mtk_pin_desc *desc)
 {
-	int err;
-
-	err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_PULLEN,
-			       MTK_DISABLE);
-	if (err)
-		return err;
-
-	return 0;
+	return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_PULLEN,
+				MTK_DISABLE);
 }
 EXPORT_SYMBOL_GPL(mtk_pinconf_bias_disable_set_rev1);