From patchwork Fri Mar 22 15:43:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160922 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp961132jan; Fri, 22 Mar 2019 08:46:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlnnQX9l2g/KeAtn4/HQEeKnQCKamauCw8SBBPIxeOIk6Zg2lqA8HEpTp4i0Ip+KAAmxTo X-Received: by 2002:a17:902:eb84:: with SMTP id cx4mr581780plb.52.1553269614603; Fri, 22 Mar 2019 08:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269614; cv=none; d=google.com; s=arc-20160816; b=g41MurzFnns3pq2Qj9fWo3BpqHjJfV9mlFm8iSPVFcRLfTYA22hElR+2VhXyTewINx bcuSWckmsSgAQXwTLzHVS5H6UZvwqECIfkp5bDB3jr0JPv8KYZWmTXI6+zhjgBR2WxkQ dgL8/au6pXnEeZ3mq++6xVHh5dtEMZUN1BzHgGcVvx8YpLSHaGqv6e+R5h2OI4+BPYWu gvtCt4SORyCWefOqimEUirllvMNXSwx2ARCGNOEvj7hsOmMYp8L1HfHEL2ulaEWjM4hQ q/lukZpgMQDB94q4kl8lYXDejJcpnNsKYYw5szuB/A1TXl2McErKzzP0iosuLS7/HJou m3hg== 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=6LCEq5orkSi25bhFJIZFhZa+RwawfwSFf65ioXHTrkc=; b=Whn6hZMvg8Dxhx90dBYXlPqPfkMQO3VYNiOHZMEvB46TQKbHAZbX02BraLUqTUskfy giw0p2LV8Oae2U1k1k4LN0SVK+5OmM426msK1gbgZh1D+craNiVCYjbH5W5XXUteuR3k enGg7sObyFEZAXz17789gzqxDVym3RRS+jF7s5l1I6WduiVNDdyCsQ0MnUizdEKBVCQB vPaCfbet0P8Zn4rjvx0QI4v5c0CtBCrqACVIkzSA6AAOjDT4JsniDbqNAXlOkHbdsWGZ 5PToWxc4ad+OXy5Ex+5vA+1+xfgjQA62iUWBHSfXYsosGOwXNJ0qFjg+WeuBFofKhmQG Gcrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 g6si6745112pgk.478.2019.03.22.08.46.54; Fri, 22 Mar 2019 08:46:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727364AbfCVPqx (ORCPT + 14 others); Fri, 22 Mar 2019 11:46:53 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:57135 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727251AbfCVPqx (ORCPT ); Fri, 22 Mar 2019 11:46:53 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1Ml6du-1giFMn2xJs-00lUfW; Fri, 22 Mar 2019 16:46:21 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, Ulf Hansson , Avri Altman , Shawn Lin , Martin Hicks , =?utf-8?q?Niklas_S=C3=B6derlund?= , Wolfram Sang , Ritesh Harjani , Simon Horman , hongjiefang , Yinbo Zhu , Kyle Roeschley Cc: Arnd Bergmann , Jiong Wu , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 07/25] mmc: sanitize 'bus width' in debug output Date: Fri, 22 Mar 2019 16:43:58 +0100 Message-Id: <20190322154425.3852517-8-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:G768/5n7N+5yTCnRzLr3RNwvzu/HYJiMFqxjs0wDv/J34Szl14D ox4n6suF/EFsAqlzN5tGJcDQeBomC44kIT1Opy/9ltW98MuFx8iQOTAdh6V4Y4E8/Q04Vq8 zKSNVc3eiLey+XUBSjqgbkYVmQG8JrIq4aPEOmdNxWtaewmVNV6EnbbB2XDXz7HSHF+M7zI fr9ElsuIRW32OqLNzcnLA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:7T/GpsWXrRI=:gv5/lMUz3Skxdq2x4iCNw+ sU6OSLFoZYnZpQt1+S9bwibN8jBoon6VFG1qC2ImbUemPsECYLxT9ZbeHcnAjQZdkVEhLAmuF yl46ggRrpiFXEXk6uSO4gq5OUGeQ1nFglHQ38RK90n4tM3NAsnfEeFhT1Lujfm4OkcihFY8/v rxKppeDax2KUhokn2BvHVHYJQpTrh4/1mHiMY40D1xYJCbJL8fbwuE6Eqj4gdsnhF8NGCB/qR SG9Q4yYlCCWQ9WeY7DrxIf7NCm1RKKVjjMWckSuBFAXmj50m2tqem0nz4feDAt1Ymnh0sfbQ9 fM6X5f83+xxb5+8rpctpxiQqkIr26l4cFuX75SjGXKJ65WwiLomgjrx4LNABekiTAkKWS9ovr Ql5EUUAXC7eg9Ed8I9KHRPDWQiVDrjXbx94uxmrfRFENYG9r07lP97FfIP/yY4hZtYAGn0zPc 0n5aUm4jRlvdjwcGK0unpI07ivx+bdwpva4c2z5oBMxmTcaTSD3epFj1sgS94HIJGfr8mZpz3 ROwJRE+OqtgyL0rystPgFaybsfXd7Qnxp2JqQiTemf3C2btIakaa5188Ze44Bt7S+6uugRv6+ tWqxYxLQ2CBPxKIF5UhKlWlZ1XwZTUmo2uoq/1J+jypGgaV1YNHXyprhh/ozWzeveqkC9pwmA CvUw2pAabo/BSaXurlWmOUr3f5Yp66f0tarxnxo+W4cYj/karKv8VoSg3JVYFDKB2g52CUpWT IqJIqwl7naZsgWNi/FJgQ1vTRKxiz9OirC7rwA== Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Wolfram Sang The bus width is sometimes the actual bus width, and sometimes indices to different arrays encoding the bus width. In my debugging case "2" could mean 8-bit as well as 4-bit, which was extremly confusing. Let's use the human-readable actual bus width in all places. Signed-off-by: Wolfram Sang Signed-off-by: Ulf Hansson (cherry picked from commit ed9feec72fc1fa194ebfdb79e14561b35decce63) Signed-off-by: Arnd Bergmann --- drivers/mmc/core/core.c | 2 +- drivers/mmc/core/mmc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 299a83f1ad38..e2e927d1f7e4 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1039,7 +1039,7 @@ static inline void mmc_set_ios(struct mmc_host *host) "width %u timing %u\n", mmc_hostname(host), ios->clock, ios->bus_mode, ios->power_mode, ios->chip_select, ios->vdd, - ios->bus_width, ios->timing); + 1 << ios->bus_width, ios->timing); host->ops->set_ios(host, ios); } diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index adc3291e9d6a..7286d0d324e1 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -952,7 +952,7 @@ static int mmc_select_bus_width(struct mmc_card *card) break; } else { pr_warn("%s: switch to bus width %d failed\n", - mmc_hostname(host), ext_csd_bits[idx]); + mmc_hostname(host), 1 << bus_width); } }