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: 4739931 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2A704C0338 for ; Tue, 19 Aug 2014 03:28:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58E6320120 for ; Tue, 19 Aug 2014 03:28:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 24EBC20108 for ; Tue, 19 Aug 2014 03:28:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbaHSD2H (ORCPT ); Mon, 18 Aug 2014 23:28:07 -0400 Received: from mail-ig0-f175.google.com ([209.85.213.175]:53634 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752488AbaHSD2H (ORCPT ); Mon, 18 Aug 2014 23:28:07 -0400 Received: by mail-ig0-f175.google.com with SMTP id uq10so9384336igb.14 for ; Mon, 18 Aug 2014 20:28:05 -0700 (PDT) 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=OP2ab138lS7MqjGy5jctgfnK6ljAyXCgbMRhV/sVcaM=; b=P/bJNwDiLeIhgV/WTRlinsZvnu9qW6T0E8lEqGRLh9x7JP1ijUfBfW61Grzd6Mi4YQ rt+kri26BHwYMk4ulyjmJGzU3EVeffqaant85z2NqBjDNuCjhz7sNCiBuehgCwSODLiN G9lzjgk6h855r6t8hwu2IiU0MlBeLp4RqO1hFzJCV/ebFqyFAizeOaGeXzM79sQ2dduv NxJs/iWlY6c4MgO7hmW7H//5xwTIZUJGoyaU05WYBv4yo6HochlkGYMzIWts7xZa1jnT 7h5PjOIQub1PfdBDwZADM8CYb7qpjpI/by9zxM3+TwesXrj8TP7AZm3ZjK+eNwqFHtAx i1iA== X-Gm-Message-State: ALoCoQmOj9xOxCwtxELbeH8RBf+ADcgSK9kPdCKog8xQheAtCnKNvFzoO35jpkYd1g/jKX4JK16f 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-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 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");