From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753373AbbIQCFo (ORCPT ); Wed, 16 Sep 2015 22:05:44 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:63455 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752964AbbIQCFm (ORCPT ); Wed, 16 Sep 2015 22:05:42 -0400 X-AuditID: cbfec7f5-f794b6d000001495-44-55fa1ff337db Subject: Re: [PATCH] mach-s3c64xx:Fix error handling for certain calls to s3c_gpio_cfgpin_range in the file dev-audio.c To: Nicholas Krause , kgene@kernel.org References: <1442454673-26752-1-git-send-email-xerofoify@gmail.com> Cc: linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org From: Krzysztof Kozlowski Message-id: <55FA1FEE.5070506@samsung.com> Date: Thu, 17 Sep 2015 11:05:34 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-version: 1.0 In-reply-to: <1442454673-26752-1-git-send-email-xerofoify@gmail.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsVy+t/xa7qf5X+FGqzexGTx+oWhRf/j18wW mx5fY7W4vGsOm8WM8/uYLG5f5rX4NUXWgd2jpbmHzWPnrLvsHptWdbJ5bF5S79G3ZRWjx+dN cgFsUVw2Kak5mWWpRfp2CVwZ05c9YSu4L1Tx8tcKtgbGH3xdjBwcEgImEpfP1XYxcgKZYhIX 7q1n62Lk4hASWMoosfnnRWYI5wujxKkTTxhBqoQFKiUOnbjJDmKLCFhLzL9/EywuJOAssbGj hQmkgVmgmVGi++INsCI2AWOJzcuXsIHYvAJaEpvf/WUBsVkEVCVubzgHFhcViJA4dfYtVI2g xI/J98BqOAVcJE4euMcKcimzgJ7E/YtaIGFmAXmJzWveMk9gFJiFpGMWQtUsJFULGJlXMYqm liYXFCel5xrpFSfmFpfmpesl5+duYoQE+dcdjEuPWR1iFOBgVOLhdXj5I1SINbGsuDL3EKME B7OSCO9MgV+hQrwpiZVVqUX58UWlOanFhxilOViUxHln7nofIiSQnliSmp2aWpBaBJNl4uCU amCMuBRuZigydXHqPnt+6dS9iZUflPWNpZf9PnOzSfmR3eQoJ83dpmUbzizJvhPDZljeaROy d6mj7Nk1The71A7MWpTHOfvB+rmf2pampOkZ+z58ol6WqmJpfnXBXunzM9ZbrDkf7+kW+aZr dpaExzvP1IoExdSHsb+jHDkddhxlFLdYa+ajLKvEUpyRaKjFXFScCADoA9pqbgIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17.09.2015 10:51, Nicholas Krause wrote: > This fixes error handling for calls to the function > s3c_gpio_cfgpin_range in the file dev-audio.c that > assume calls to this particular function always run > successfully to properly check now if these calls > fail by returning a error code and if so return it > directly to the call of these functions in order for > the caller to be able to handle these failed calls in > its own error path(s). > > Signed-off-by: Nicholas Krause > --- > arch/arm/mach-s3c64xx/dev-audio.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) I am assuming (from the past events) that you did not test the patch and how returning the error condition affects rest of the code. In the same time you ignored my request to mark such patches with Request-For-Test. Please send it after testing. Commit message is hard to understand, please re-phrase so it would be easily to find how this affects upper layers. As you are banned on LKML, the patch needs thorough testing and review before applying. Best regards, Krzysztof > > diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c > index ff780a8..81fabdb 100644 > --- a/arch/arm/mach-s3c64xx/dev-audio.c > +++ b/arch/arm/mach-s3c64xx/dev-audio.c > @@ -27,6 +27,7 @@ > static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) > { > unsigned int base; > + int ret; > > switch (pdev->id) { > case 0: > @@ -47,9 +48,9 @@ static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) > return -EINVAL; > } > > - s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3)); > - > - return 0; > + ret = s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3)); > + > + return ret; > } > > static struct resource s3c64xx_iis0_resource[] = { > @@ -122,6 +123,7 @@ EXPORT_SYMBOL(s3c64xx_device_iisv4); > static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev) > { > unsigned int base; > + int ret; > > switch (pdev->id) { > case 0: > @@ -136,8 +138,8 @@ static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev) > return -EINVAL; > } > > - s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(2)); > - return 0; > + ret = s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(2)); > + return ret; > } > > static struct resource s3c64xx_pcm0_resource[] = { >