Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp798746img; Fri, 22 Mar 2019 08:48:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyipD3DFt0omfZx7b5j2AMNE4X/LhWMFrVswTm2Wu9fEBnhU3TydRiGkSdc2XdtnRAgmsqa X-Received: by 2002:a17:902:2848:: with SMTP id e66mr10442127plb.181.1553269692754; Fri, 22 Mar 2019 08:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269692; cv=none; d=google.com; s=arc-20160816; b=imnhBw2nugpfX9c/rJysYMIsocPnYGvoGO3kT3QsSshS8mK5XbXFr0SBXTkauYd+X6 0f0eERB/InS7pllX0GlvCKRDzKcCV8beZPbL2rsDxc8zpM5b2wyMcSMqLDgHNlu+DwmU q+KAIdscTA6NrN7ksqWFj3bQs8oqrBnKUbvVdXvIPNc8x9YOrk3pCKeO4VAidTFxdqLY +7THjNQRskwkCe34IB2NFwmB9cpzwMJSWfHHd0HV4HdhLMcq1I8lq0SDrSvk9y0PeRtu slQdK8LeK8TF62tFTvZ4GZxMxCemPmgRcwYllSqQgBQOdmKlGOuJdF/+2kzRj/BkjsCT NNhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LwlWtvw3mSZmz7DfG+n1f/tygamI0iJSKOTVGs2j12k=; b=I6DZHkYA+GTofyuZEokvaRNgbrv1WifiwhJLgkWvV8YJwxcOYdQkssyxVTs1mVcsIF Q/+wuiTQ07I+jPigCVF2REdCis13MN4qdnyLj4yVm5G2YpI14bjVSqRROFgTpb8lHOlN JmxjRmVuuK2l4anq08ao0vnt6NHvgqwa4Yncyj/epM94dGvOcWC2J1YqaXREhuUKgDWk 3j3HqL14d1FNHuV4YATS2JcddAkCgPNdSOvlC6wsT1pdqllSa63xo3kZpbEy/0ZosZMX 8MGz6I19j6cgshtCun0USugy0B7aXIO5B0dbXUJa8OWy60UrcRv5aQs+BwqxY9AufIbC anUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si6679972pgq.343.2019.03.22.08.47.57; Fri, 22 Mar 2019 08:48:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727824AbfCVPq5 (ORCPT + 99 others); Fri, 22 Mar 2019 11:46:57 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:52233 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727363AbfCVPqy (ORCPT ); Fri, 22 Mar 2019 11:46:54 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1N1whr-1h0jYs2B7R-012LGN; Fri, 22 Mar 2019 16:46:39 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, Ulf Hansson , Avri Altman , Shawn Lin Cc: Russell King , Arnd Bergmann , Ritesh Harjani , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Jiong Wu , Martin Hicks , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 08/25] mmc: core: shut up "voltage-ranges unspecified" pr_info() Date: Fri, 22 Mar 2019 16:43:59 +0100 Message-Id: <20190322154425.3852517-9-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190322154425.3852517-1-arnd@arndb.de> References: <20190322154425.3852517-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:xKzkjcZ9sdwnDMJpHCbZubw9iVQy1Q+3iwt6jMNhxhxj57MfM1U KRwERkSOzuQyLrMuc4JjyBHg6PY1SETZcdz+006q7Dc70RQE1RiwoOtEQGGXuDaAfz7mky2 mZeRU+KuQZel2C+oRNwwEdzxN/C5X0WLsn63h3lX6tvI+A43BgcHGqEoaPimxWyspzoS/x9 jYrL+tBnVbxtFEYisI4Xg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:8UOTv7lvoss=:sYhAnRI77z0j8XUghrTEtS LJz3BkBZP4wJHmpsn4c0dIw7NeC4IKcR/UzN86DL9VkqWHu+seWOfst8bslpwRsD23LcWx3f/ NBZATyxs9JP9mdJp8G3dGa98HbopsnUlz6cjpEHarLKpyPJLWwMxv6NStlTkSdm/N9pnqwiSL oTVGmbfHgKTNWZvTRgIKSriRrMSBMLtH07NllhK/3lFXermaL+5E7gGp/Iexc4YDVeJaLSqnC bG+qztu94rEqhtDdVfnCxaPmozC77OHkOBlWKPYKdnLyRThlSz2zdBPPdRkJ9JwRDSvCNhtqP w38LeYAQHiX/fvztDnwA6GV9Q9d7apT4py6dURXQuX6AIX+8/MGSSgNjUO9UzS5TiRlS59yEt i/u4/L1vmQXKxeXwNy3VH9ANbMdrvMAQygA5NZHr1lh3OHgIqyQli6oWQbEnPLcC0gVmw0MvI VgTZ1AAcYbg+/uwFmChajj5evzLDVfNHRhz6t9V+Gc6D/WOwQglH2RGpRj5hDNBBffKA869gb JbYKJ6XS3nMyqgyEdyBos66HAdBPCiQ7EGq3lQNw5b811FRHpqmcfSk0W/knzaEXyPs3exvbi 8XmnaDq5vlfHK4gmJDJr3OLfmfYQoz/LI4QrF7Za6el4Hz2Ta/j3lZZAlZpRRc80iIpIvvg6u 8Ds6gcbpemgYDltBjj2U07LAZVD9LArwXGgqdspyUvTWn8quxi6Rkk5llHqGgchDwVZzWfN2v 1NibpG3Z0TF80gjUSH8itOi0UFeloxhliU3k/Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King 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 (cherry picked from commit 10a16a01d8f72e80f4780e40cf3122f4caffa411) Signed-off-by: Arnd Bergmann --- drivers/mmc/core/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index e2e927d1f7e4..df074f8c7cb7 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1220,8 +1220,12 @@ int mmc_of_parse_voltage(struct device_node *np, u32 *mask) 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; } -- 2.20.0