From patchwork Tue Aug 19 03:28:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 35548 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A4CE420523 for ; Tue, 19 Aug 2014 03:28:10 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id v10sf17636086qac.0 for ; Mon, 18 Aug 2014 20:28:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=leyh/7e1IjnwjqIZTQ60XPiysTsz3NF1V/mZtC2Nyfs=; b=Stinm0EK1rXx8DHJ13Yyx701j5jx/hhYKnuyuiygMh2JO4rwhe+Xw8khAAKfdYr24o TXVla8tWGBiFBoW1lxVElbtE0DVfZK0hThktA9nkr2GCyo1FHcU/bxE7Aijdffqz0oQR zdacGrdtvnDdIrl22S54SSuiwmG6j9K8jPWdPN8n915ksVOitSb3LgvdTOamBbMxNCt9 hSaxmj3Jt8HWSR2rxrnNUd+/tR5VjJfSDsLKltqHoAB3rGzgdHRuywxd6gLkz4ferySS 2RsdzlrDkpaA1yEd1+Mogy8XVvz2iTg64z6YL7lEz8WVmlP+FvslgP0SqU7Bo70oWfI5 gjLg== X-Gm-Message-State: ALoCoQkesgLYrtcTTLNjIT75sFEszxfBLL0bgxq2x9EcuaECf/mt78US6Q9Rbw49N8jOnuFUbrTz X-Received: by 10.236.117.141 with SMTP id j13mr17191635yhh.3.1408418890528; Mon, 18 Aug 2014 20:28:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.211 with SMTP id z77ls2572492qgz.54.gmail; Mon, 18 Aug 2014 20:28:10 -0700 (PDT) X-Received: by 10.220.44.136 with SMTP id a8mr3969826vcf.42.1408418890454; Mon, 18 Aug 2014 20:28:10 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id bb2si7222842vcb.54.2014.08.18.20.28.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Aug 2014 20:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so6790908vcb.2 for ; Mon, 18 Aug 2014 20:28:10 -0700 (PDT) X-Received: by 10.220.86.72 with SMTP id r8mr4603546vcl.36.1408418890340; Mon, 18 Aug 2014 20:28:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp205583vcb; Mon, 18 Aug 2014 20:28:09 -0700 (PDT) X-Received: by 10.70.23.101 with SMTP id l5mr46461771pdf.30.1408418889463; Mon, 18 Aug 2014 20:28:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rj6si24688141pdb.194.2014.08.18.20.28.09 for ; Mon, 18 Aug 2014 20:28:09 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488AbaHSD2I (ORCPT ); Mon, 18 Aug 2014 23:28:08 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:32836 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752505AbaHSD2H (ORCPT ); Mon, 18 Aug 2014 23:28:07 -0400 Received: by mail-ig0-f171.google.com with SMTP id l13so9377802iga.4 for ; Mon, 18 Aug 2014 20:28:05 -0700 (PDT) X-Received: by 10.51.17.2 with SMTP id ga2mr2161342igd.2.1408418885061; Mon, 18 Aug 2014 20:28:05 -0700 (PDT) Received: from localhost.localdomain.com (216-80-70-224.c3-0.alc-ubr4.chi-alc.il.cable.rcn.com. [216.80.70.224]) by mx.google.com with ESMTPSA id nn13sm51438985igb.7.2014.08.18.20.28.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Aug 2014 20:28:04 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Chris Ball , Ulf Hansson Cc: linux-gpio@vger.kernel.org, Linus Walleij , Simon Baatz Subject: [PATCH] mmc: slot-gpio: restore error reporting Date: Mon, 18 Aug 2014 22:28:00 -0500 Message-Id: <1408418880-10250-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch switching the MMC core to use GPIO descriptors depromoted errors to debug messages for unsuccessful attempt to get CD or WP GPIOs. This was because sometimes these are not specified, and that should not be an error. However that is not so helpful: explicitly check whether a GPIO is not specified (i.e. -ENOENT is returned) and if there is some other error, report it with dev_err(). Reported-by: Simon Baatz Cc: Simon Baatz Signed-off-by: Linus Walleij --- drivers/mmc/core/host.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 048c6d687cc9..6f7ed9c50346 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -368,9 +368,11 @@ int mmc_of_parse(struct mmc_host *host) if (ret) { if (ret == -EPROBE_DEFER) return ret; - dev_dbg(host->parent, - "Failed to request CD GPIO: %d\n", - ret); + if (ret != -ENOENT) { + dev_err(host->parent, + "Failed to request CD GPIO: %d\n", + ret); + } } else dev_info(host->parent, "Got CD GPIO\n"); } @@ -383,9 +385,11 @@ int mmc_of_parse(struct mmc_host *host) if (ret) { if (ret == -EPROBE_DEFER) goto out; - dev_dbg(host->parent, - "Failed to request WP GPIO: %d\n", - ret); + if (ret != -ENOENT) { + dev_err(host->parent, + "Failed to request WP GPIO: %d\n", + ret); + } } else dev_info(host->parent, "Got WP GPIO\n");