From patchwork Wed Sep 30 02:07:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick X-Patchwork-Id: 7292251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 116399F32B for ; Wed, 30 Sep 2015 02:10:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2635A20634 for ; Wed, 30 Sep 2015 02:10:41 +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 5209320620 for ; Wed, 30 Sep 2015 02:10:40 +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 1Zh6pH-0002mx-DY; Wed, 30 Sep 2015 02:08:59 +0000 Received: from mail-ig0-x242.google.com ([2607:f8b0:4001:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zh6oa-0002iN-AD for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2015 02:08:16 +0000 Received: by igcpb10 with SMTP id pb10so2796338igc.2 for ; Tue, 29 Sep 2015 19:07:55 -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=Fqixs7LhC6fAqvrza1lq+roiN3pho9xMXbgrbuIV6DE=; b=XTLt2gzYMLKua0m2JWJt4YO9s0l6PobhG+dvutrArpqoz56ZNnZF7DYTuZ73PZaZnE WXL+Q2M/Ay7klzd4Ean27c9cLcbB2K76UDHaJa9GQMF8rBy4B7UqAWqdSJhBPR/LHNfC WYFEdrssRulsiSdDV0gX5y5Rhb3pgEFzFe+gPq7aJUU2oPpA3FTwRp4v4aAAMYSmjrTP 6zQgoCSmqFIbVyAUTPH1x00OHuxxM5WyML3R7Lk0gz3KNkGsNeNyJEIciTZ3G12ctCdL loQsUd4qCT38C62krdnKDOt7bbR5Oy9dx/tGhIPBgcaJKnWxVtkMTUoV3Hzk3edaru2n Ooeg== X-Received: by 10.50.60.100 with SMTP id g4mr24399684igr.41.1443578874918; Tue, 29 Sep 2015 19:07:54 -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 yq9sm11967878igb.6.2015.09.29.19.07.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Sep 2015 19:07:53 -0700 (PDT) From: Nicholas Krause To: kgene@kernel.org Subject: [PATCH RESENDv2] mach:-s3c64xx:Output trace information with WARN_ON if calls for setting up gpio board configuration fail in s3c64xx_i2s_cfg_gpio Date: Tue, 29 Sep 2015 22:07:50 -0400 Message-Id: <1443578870-14534-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-20150929_190816_432526_9C0DAE9F X-CRM114-Status: GOOD ( 11.53 ) 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. Therefore due to this output our failed calls by means of WARN_ON to the kernel log buffer for failed configuration of gpio devices using this driver file. v2:Fix Patch Wording as it was clearly confusing and incorrect Signed-off-by: Nicholas Krause --- 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..5e7538b 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; }