From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07535C43381 for ; Mon, 1 Apr 2019 17:49:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8C6C2133D for ; Mon, 1 Apr 2019 17:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554140972; bh=jlr7iFa0Ds43YUHeZm5eBbGpa9g2r2DUyVeHG7IJcHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=xdpa9Ql4jnzP2TFHm7SXk79usGXpviJ72TZh7gCs/UyXQSbLQrIaU/ZHYA2U7+9hB TQsIoVgqtvQhq/kibol7uI7T6781zlPZoiEog0idu8y4tyxqNhnvw9IncEeb2ykjGk e5wHFE/Uf96BQ8dKiJc3IghkR/okrHXEb5eC15UY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732842AbfDARaE (ORCPT ); Mon, 1 Apr 2019 13:30:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:36776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732666AbfDARaD (ORCPT ); Mon, 1 Apr 2019 13:30:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6988920856; Mon, 1 Apr 2019 17:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554139802; bh=jlr7iFa0Ds43YUHeZm5eBbGpa9g2r2DUyVeHG7IJcHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZC7KPkctt/qiOWW2qMQKNwyqQeh6XjIxKyO95wgcsHTlkliFxe80eTXFN+pMcdN8O hAekjgYiBJJUkXXCG3bph4IAi5zUEitBX7q4zQ8kXqF/+Gk/QXbFoUzziYfLpOOxym il8dfTjj9paCYHkOn3Fa4N3UNxiAY2+gR0SYrENw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King , Ulf Hansson , Arnd Bergmann Subject: [PATCH 4.4 019/131] mmc: core: shut up "voltage-ranges unspecified" pr_info() Date: Mon, 1 Apr 2019 19:01:29 +0200 Message-Id: <20190401170053.595436540@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401170051.645954551@linuxfoundation.org> References: <20190401170051.645954551@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Russell King commit 10a16a01d8f72e80f4780e40cf3122f4caffa411 upstream. Each time a driver such as sdhci-esdhc-imx is probed, we get a info printk complaining that the DT voltage-ranges property has not been specified. However, the DT binding specifically says that the voltage-ranges property is optional. That means we should not be complaining that DT hasn't specified this property: by indicating that it's optional, it is valid not to have the property in DT. Silence the warning if the property is missing. Signed-off-by: Russell King Signed-off-by: Ulf Hansson Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1220,8 +1220,12 @@ int mmc_of_parse_voltage(struct device_n voltage_ranges = of_get_property(np, "voltage-ranges", &num_ranges); num_ranges = num_ranges / sizeof(*voltage_ranges) / 2; - if (!voltage_ranges || !num_ranges) { - pr_info("%s: voltage-ranges unspecified\n", np->full_name); + if (!voltage_ranges) { + pr_debug("%s: voltage-ranges unspecified\n", np->full_name); + return -EINVAL; + } + if (!num_ranges) { + pr_err("%s: voltage-ranges empty\n", np->full_name); return -EINVAL; }