From patchwork Fri Mar 22 15:43:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160923 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp961201jan; Fri, 22 Mar 2019 08:46:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqym+FRbgT9/Yv4b8gbNPEEZNK/QzjAf9De/RcUKOPjtRL5IpHZpuDUzX4mrTRh4nbxa7jJZ X-Received: by 2002:a63:e14e:: with SMTP id h14mr9361400pgk.184.1553269618545; Fri, 22 Mar 2019 08:46:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269618; cv=none; d=google.com; s=arc-20160816; b=Hbqeoc6fNrV280uyXvw5Q3fQ2vp7khXuTuZt0fRvzO3DfCLZe3jGlojJvm08xFIdWk PvVi8dhCbBvDZ8/097/iEev0SdcyqPnUGtqh4uEiSWBD5BkmpqpkGhGxnN8jtZNZgUyl CMxUjuNBVi0GZOXStXcT4f8WDLBZwQcKI1QIPWDudbeFbFC5DKLHmv8POuEm8ZsvJgB2 cqvmzNCQHiCoOVUyv+R72tlioiSPq4SYfHNA/A5dm3KtKxfZ/YT9Z3EwEnEiEa6B55iy X1k4sc+G9mXHoSVoBX/jg37++wBJR0waaQ/1ubZOBVinQuEIvHZB0du9I1pdp3Ht1BwZ q7nA== 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 w10si7235057plp.329.2019.03.22.08.46.58; Fri, 22 Mar 2019 08:46:58 -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 S1727839AbfCVPq5 (ORCPT + 31 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_S=C3=B6derl?= =?utf-8?q?und?= , 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 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(-) -- 2.20.0 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; }