Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp773731ybc; Sat, 16 Nov 2019 08:26:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxxzpPmZ77oWVfUYKEeD/8TA6uxWycu1tVdDZj0vGOumGO77mne/EhRbMMl8ZnNCI0T8LYB X-Received: by 2002:a17:906:f0c9:: with SMTP id dk9mr11059234ejb.56.1573921602976; Sat, 16 Nov 2019 08:26:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921602; cv=none; d=google.com; s=arc-20160816; b=wDbLc8BkbiBbYE7AA4jYRTaB5EG5Iv4vvX+5U5NUaqSNQA1vjhZhwmtx/I/CL/Nmnx HfjtDIrFSXLqKojRe6O9W56SeANV81PcMqDq+Kp3fVnv7UvxZ8CZjwzvIYBdQLzgtuOH tWaR9PlXuPIHp55LmVL9cUWX39LN0VGZqWeCxtPkoR1MmWrgl4/JCeaW05qBUxxzgIWq jkBaC9v1O+eB3YRxYDqFSird522gVB+hJRwLFeEUjQ8gz65fdpnWn5nkGbF3yEaxarN1 l+S6Ja/DaThJnUtxzRvhDEzohv/6LaPS2ekM2rfb1K9h3NTkouOjWw3zYyKzf2w7pSyO 24nA== 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 :dkim-signature; bh=3c4vM7UaXAULDjmADIpeFRVzsdE6gYEuONWh46OFOy4=; b=Motcv9d89Hj+Dbt1sumaqFJbhJiAfMAap33KEheoSzeOkb3j55BR0BIbyXKpWwR7Ua 2V8uo8TFTiVwCF+JXrdXjGv09oprIfdVJ8SKvEUYq7HVI8Pi2Yt9d0Rbs3hGrAGIAkw0 GeZq7Gn7La7HeB0mMrJNIxA5OJ/nV0V0gTIXeRbQbwvUSIi87D6INZ7OUvGFZysmXzPQ MlHQO9bT3zqUjhfK6irD6JfPQ+V+MQrcE3448FiMAY3T3x3s2gVUx8v3x11q0zDUv6z3 2jor+5OCou0vcaDII8rS3I4OeJ1yozalNt6UxA1VJU4eK+m5JDKcVW3slXEeAy806fHq oOFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gC2B32sO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si7851812ejw.30.2019.11.16.08.26.17; Sat, 16 Nov 2019 08:26:42 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=gC2B32sO; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728441AbfKPPmq (ORCPT + 99 others); Sat, 16 Nov 2019 10:42:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:46332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728368AbfKPPmh (ORCPT ); Sat, 16 Nov 2019 10:42:37 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9E8C72086A; Sat, 16 Nov 2019 15:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573918956; bh=jTWzCOQwRiWhKbKWMLAjSFDku8KDuyLw1gEEl2r4qbs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gC2B32sO2rm4bVWXVglD9ZTSsKM+8S4L2WIeSa4ErNGULl5u/gMJMIoJ7DXB3WeKP 47YF245JtUfBNOqVjcptJjWkMWXyycFehbQ89UuznyHoloJjVWYzARmwkUQC7faXSj gxlDb0YhK8ys52poQti3F2IA2yiFNi8/qSyNuw/E= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Benjamin Herrenschmidt , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 4.19 075/237] macintosh/windfarm_smu_sat: Fix debug output Date: Sat, 16 Nov 2019 10:38:30 -0500 Message-Id: <20191116154113.7417-75-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Benjamin Herrenschmidt [ Upstream commit fc0c8b36d379a046525eacb9c3323ca635283757 ] There's some antiquated debug output that's trying to do a hand-made hexdump and turning into horrible 1-byte-per-line output these days. Use print_hex_dump() instead Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- drivers/macintosh/windfarm_smu_sat.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index da7f4fc1a51d1..a0f61eb853c55 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c @@ -22,14 +22,6 @@ #define VERSION "1.0" -#define DEBUG - -#ifdef DEBUG -#define DBG(args...) printk(args) -#else -#define DBG(args...) do { } while(0) -#endif - /* If the cache is older than 800ms we'll refetch it */ #define MAX_AGE msecs_to_jiffies(800) @@ -106,13 +98,10 @@ struct smu_sdbp_header *smu_sat_get_sdb_partition(unsigned int sat_id, int id, buf[i+2] = data[3]; buf[i+3] = data[2]; } -#ifdef DEBUG - DBG(KERN_DEBUG "sat %d partition %x:", sat_id, id); - for (i = 0; i < len; ++i) - DBG(" %x", buf[i]); - DBG("\n"); -#endif + printk(KERN_DEBUG "sat %d partition %x:", sat_id, id); + print_hex_dump(KERN_DEBUG, " ", DUMP_PREFIX_OFFSET, + 16, 1, buf, len, false); if (size) *size = len; return (struct smu_sdbp_header *) buf; @@ -132,13 +121,13 @@ static int wf_sat_read_cache(struct wf_sat *sat) if (err < 0) return err; sat->last_read = jiffies; + #ifdef LOTSA_DEBUG { int i; - DBG(KERN_DEBUG "wf_sat_get: data is"); - for (i = 0; i < 16; ++i) - DBG(" %.2x", sat->cache[i]); - DBG("\n"); + printk(KERN_DEBUG "wf_sat_get: data is"); + print_hex_dump(KERN_DEBUG, " ", DUMP_PREFIX_OFFSET, + 16, 1, sat->cache, 16, false); } #endif return 0; -- 2.20.1