From patchwork Tue Feb 2 14:56:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick X-Patchwork-Id: 8191361 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 3418FBEEE5 for ; Tue, 2 Feb 2016 14:58:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD415202F2 for ; Tue, 2 Feb 2016 14:58:24 +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 D81AD202C8 for ; Tue, 2 Feb 2016 14:58:23 +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 1aQcO4-0000oM-OR; Tue, 02 Feb 2016 14:57:00 +0000 Received: from mail-ig0-x244.google.com ([2607:f8b0:4001:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQcO1-0000lK-NM for linux-arm-kernel@lists.infradead.org; Tue, 02 Feb 2016 14:56:58 +0000 Received: by mail-ig0-x244.google.com with SMTP id mw1so941292igb.2 for ; Tue, 02 Feb 2016 06:56:37 -0800 (PST) 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=qWh7V7iqeo4vNdtBoLdbPhcNeNtgAxeUBJJtw/qf2TOWVU07jheD68MjrjuwVwyGIn C7pghDzO2otAT7vhMU57B2z1PjGKnf3X4EOvmBDaJ/qwUIEc8iUQoHjbMMaXMsERsocf V01Il/hc7i1omnL/iZG3bBEDHX5d7Liw4BZ7led7l3r/0dZdH+pAkO1KUMgDfALYktpg etVugv54AIoVN5VxIRS+xDuAlARLVsNtTYqqjhdkQKgRF0QQn/uQqEHmxVzUeZq4ojZO CnEUMAn4wz1gmqeVemKJzhUyl/367RVn8ZEP+AkXrt/XQKf4stvs9USOdyfo+y4HiD5i Rslw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UDb6lnG+ezHsRQWT3sDTcOzboAHe7WsJfSJUn2CSUdc=; b=jgSmA8SQX+484wD9jf6BnFiA5UyOW892Mc20YKJMEMLTX8dDe0MZPvo4TfFrdc+AGm jUAo9qab1UoNJZCVrUyLzbuhjKFICNObfzJAJYAJxbgm/HEcbApo8yohCmd2kRDDgzqJ ZFICOZqh+00qmfx7mDcKJvYKNQx2tSg8Kejb2tikwT7uCRBSpXKr65cXJH6Z6CcQJ79i I3r8ucCyD6KDmGkrfwNM4O2vTpUp7DhP81996PUiGJ4vKQ74kRSjj53TquMf8hHrsnrZ yZKDuBwGJzajlXXNLb6BbV2Phg6iDaMkqmqOQedgiziv8qFRA8gL2GT39BTPagZ+A0qn FTeg== X-Gm-Message-State: AG10YOTwWDXliaJYyuWmWSDFWMpzJxLbOWRFOpj5pm95cIbCiZbSSWYa+ygf+n8wG4bjKw== X-Received: by 10.50.117.33 with SMTP id kb1mr18160041igb.89.1454424996705; Tue, 02 Feb 2016 06:56:36 -0800 (PST) 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 j94sm1221798iod.26.2016.02.02.06.56.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Feb 2016 06:56:35 -0800 (PST) From: Nicholas Krause To: kgene@kernel.org Subject: [PATCH RESEND RFC] mach:-s3c64xx:Output trace information with WARN_ON if calls for setting up gpio board configuration fail in s3c64xx_i2s_cfg_gpio Date: Tue, 2 Feb 2016 09:56:32 -0500 Message-Id: <1454424992-14619-1-git-send-email-xerofoify@gmail.com> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160202_065657_833152_AD9B3828 X-CRM114-Status: GOOD ( 12.33 ) 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.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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; }