From patchwork Thu Oct 1 02:35:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick X-Patchwork-Id: 7303611 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1327CBEEA4 for ; Thu, 1 Oct 2015 02:38:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 189D6206C5 for ; Thu, 1 Oct 2015 02:38:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37615206BD for ; Thu, 1 Oct 2015 02:38:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZhTjC-000563-L4; Thu, 01 Oct 2015 02:36:14 +0000 Received: from mail-ig0-x243.google.com ([2607:f8b0:4001:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZhTjA-00053O-1L for linux-arm-kernel@lists.infradead.org; Thu, 01 Oct 2015 02:36:12 +0000 Received: by igcxw12 with SMTP id xw12so696132igc.3 for ; Wed, 30 Sep 2015 19:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=UDb6lnG+ezHsRQWT3sDTcOzboAHe7WsJfSJUn2CSUdc=; b=FOZd/zxNEWILnUnL2BVOMhqQF1UdhD1+fAklA3RFPpMrukDXIS6JclsbEAylI2UcGS t6QQr13YjhJPGbjSHZzT4zsn1VK0rQnOboJ4tREc+9VOw3bjJL1OQYdTuXXLK2xhl5sI OrzX0KrG38XlnW7eOcLhb2Oj3gXpan02/2Oy/GV38rjwW5ch2n850oXhsZ4ikxkUJzRk wibKA6pFtCtI9/3UPw0GSi/aX29aG9VEMRSHwjtbn2slc5mX9dsX11NxHlS3pxnqM02w K01M+3vbFIFNQ3zMCKPMyObaEZ1+fzAc6LdByaGCmFg8GHrmGSDjoh92aNMyGfzSGhn0 no8w== X-Received: by 10.50.82.71 with SMTP id g7mr690175igy.65.1443666951218; Wed, 30 Sep 2015 19:35:51 -0700 (PDT) Received: from nick-System-Product-Name.hitronhub.home (CPEbc4dfb2691f3-CMbc4dfb2691f0.cpe.net.cable.rogers.com. [99.231.110.121]) by smtp.googlemail.com with ESMTPSA id bd7sm320626igb.19.2015.09.30.19.35.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Sep 2015 19:35:50 -0700 (PDT) From: Nicholas Krause To: kgene@kernel.org Subject: [PATCH] mach:-s3c64xx:Output trace information with WARN_ON if calls for setting up gpio board configuration fail in s3c64xx_i2s_cfg_gpio Date: Wed, 30 Sep 2015 22:35:46 -0400 Message-Id: <1443666946-16400-1-git-send-email-xerofoify@gmail.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150930_193612_146627_0F05CCCE X-CRM114-Status: GOOD ( 12.82 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: k.kozlowski@samsung.com, linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This fixes the function s3c64xx_i2c_cfg_gpio to log output to the kernel log buff with WARN_ON if any of the calls to either s3c_gpio_cfgpin_range or s3c_gpio_cfgpin fail as we cannot exit from s3c64xx_i2s_cfg_gpio if any of these calls fail due to other intended function work being required to complete. Further more if a failure occurs allow the other users/devolopers of this driver to properly check the kernel log buffers for a kernel trace for when these calls failing to execute successfully arise. Signed-off-by: Nicholas Krause --- v3:Fix more wording issues and uncaught build failure with previous build test v2:Fix Patch Wording as it was clearly confusing and incorrect arch/arm/mach-s3c64xx/dev-audio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index ff780a8..796ac75 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c @@ -36,10 +36,10 @@ static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) base = S3C64XX_GPE(0); break; case 2: - s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5)); - s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5)); + WARN_ON(s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5))); + WARN_ON(s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5))); + WARN_ON(s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5))); + WARN_ON(s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5))); return 0; default: printk(KERN_DEBUG "Invalid I2S Controller number: %d\n", @@ -47,7 +47,7 @@ static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) return -EINVAL; } - s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3)); + WARN_ON(s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3))); return 0; }