All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: lee.jones@linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] intel_soc_pmic_mrfld: simplify the return expression of intel_scu_ipc_dev_iowrite8()
Date: Mon, 27 Jul 2020 15:09:08 +0300	[thread overview]
Message-ID: <20200727120908.GR3703480@smile.fi.intel.com> (raw)
In-Reply-To: <20200727030407.8820-1-vulab@iscas.ac.cn>

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@iscas.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



  reply	other threads:[~2020-07-27 12:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27  3:04 [PATCH] intel_soc_pmic_mrfld: simplify the return expression of intel_scu_ipc_dev_iowrite8() Xu Wang
2020-07-27 12:09 ` Andy Shevchenko [this message]
2020-07-27 12:53   ` Lee Jones
2020-07-27 13:00     ` Andy Shevchenko
2020-07-27 13:26       ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200727120908.GR3703480@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.