[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200727120908.GR3703480@smile.fi.intel.com>
Date: Mon, 27 Jul 2020 15:09:08 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Xu Wang <vulab@...as.ac.cn>
Cc: lee.jones@...aro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] intel_soc_pmic_mrfld: simplify the return expression of
intel_scu_ipc_dev_iowrite8()
On Mon, Jul 27, 2020 at 03:04:07AM +0000, Xu Wang wrote:
> Simplify the return expression.
I understand your intention, but I would rather leave as is.
It's a bit more helpful in the original form in case to add some debugging.
It also keep it symmetrical with read() counterpart.
That said, I'm not objecting the change if Lee finds it good enough.
> Signed-off-by: Xu Wang <vulab@...as.ac.cn>
> ---
> drivers/mfd/intel_soc_pmic_mrfld.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/mfd/intel_soc_pmic_mrfld.c b/drivers/mfd/intel_soc_pmic_mrfld.c
> index bd94c989d232..71da861e8c27 100644
> --- a/drivers/mfd/intel_soc_pmic_mrfld.c
> +++ b/drivers/mfd/intel_soc_pmic_mrfld.c
> @@ -91,13 +91,8 @@ static int bcove_ipc_byte_reg_write(void *context, unsigned int reg,
> {
> struct intel_soc_pmic *pmic = context;
> u8 ipc_in = val;
> - int ret;
>
> - ret = intel_scu_ipc_dev_iowrite8(pmic->scu, reg, ipc_in);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return intel_scu_ipc_dev_iowrite8(pmic->scu, reg, ipc_in);
> }
>
> static const struct regmap_config bcove_regmap_config = {
> --
> 2.17.1
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists