Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp990958ybg; Mon, 27 Jul 2020 05:12:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQ6AStmq/xPJDUqnL+Rol8/Wjjm35AakMpcLl2b6N217nOqawBJsd6y7CAJ2oNFmkGS2ut X-Received: by 2002:a17:906:aed4:: with SMTP id me20mr12478096ejb.141.1595851930622; Mon, 27 Jul 2020 05:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595851930; cv=none; d=google.com; s=arc-20160816; b=qCM3Loiuzatdd7PVY4NLaa1XUv2PHGNx/SFWFTEcB+OGpIMqdnWrWKn5us77wlZdue 9oG0r8ixvOlCXikHSlsCMy+WGC8nA/VPU0mV/AmYUgO/q5joMdAYFVBd42IXMmDNsVZs sZGWInBkw1UNocf8Ke9jQ+tGO27pLzop1wpnR7DSv3p5oJ2sG6lVvjYU3VU4Q3GEuEoT ak7sv7RHASn3CAnh6vY8bsAU9V5dRuBBcmI6jgQt6CTkfet/y5KNOwyT7tHJLUZeIx9V 5bfLy4I5eUMOqd1ZvjpwNWHiOc0GSFJETKLBS/7w9FZi8l6H+CwC9OBx0S+1s51KhD3n dbIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=l40NN2S4ycEGQQT0S7u7RkxHtpj4Aa2MTSB9rNDQLfA=; b=HBWeeaqXbtnw9OSqymp29D8S5IWjphrxKDkQVUg51cXF8K6kk6F/hNov3DUslsvpC/ CbJV6QGnqbYX+41KgwWe03gC9Uo1pQegwYFrtywLqVoZFWp2LHrGZEZbP/DOZqnT/WNp kdq2Ir73fGyl2mkFjG0nxXDgWLeE62+P5FEw3Wt4sPcr6eAkb8mtjzC8pkmMBY+lZb03 lJCjFv9jyuojO2bP3m1jjUd3uJrhSHSmCPU6IGC9hXDX9gfVH+se6MEmaFw1R1sKUrjv AoVNHVS43ztdpMQdxg9Rz7Thx+tzFoiUAIFo0tsEIfplMyStIu/GzPSMsYISKh9qUznm jlEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si2713472eds.546.2020.07.27.05.11.48; Mon, 27 Jul 2020 05:12:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727961AbgG0MJK (ORCPT + 99 others); Mon, 27 Jul 2020 08:09:10 -0400 Received: from mga11.intel.com ([192.55.52.93]:57475 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726620AbgG0MJJ (ORCPT ); Mon, 27 Jul 2020 08:09:09 -0400 IronPort-SDR: 2K7LhbcBJHcjX3jq1KhUL4KanAZEDFKE04d+qHNeLyuyVBfv1F/FtUu7YJre7nxvss/5K5vw06 rRK+z6XdlJbw== X-IronPort-AV: E=McAfee;i="6000,8403,9694"; a="148877489" X-IronPort-AV: E=Sophos;i="5.75,402,1589266800"; d="scan'208";a="148877489" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2020 05:09:09 -0700 IronPort-SDR: vG9ARVnVR0G3e8Hw4iGLpIChAYRf4SBYy2FFldqF9756jK6syneLqufm1YK5PdpvQ7AR+8p7vP zdNK+Bc8vKww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,402,1589266800"; d="scan'208";a="329659230" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga007.jf.intel.com with ESMTP; 27 Jul 2020 05:09:08 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1k01wK-004Gsx-8X; Mon, 27 Jul 2020 15:09:08 +0300 Date: Mon, 27 Jul 2020 15:09:08 +0300 From: Andy Shevchenko To: Xu Wang 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() Message-ID: <20200727120908.GR3703480@smile.fi.intel.com> References: <20200727030407.8820-1-vulab@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200727030407.8820-1-vulab@iscas.ac.cn> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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