Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6035981ybc; Wed, 27 Nov 2019 13:50:22 -0800 (PST) X-Google-Smtp-Source: APXvYqzr+KOLN+nLulK5Z8TJj330TYEAZAeccccr+JGeHSL+yGjALF793Rj46Acx54MMEuCUh4Rn X-Received: by 2002:a17:906:6006:: with SMTP id o6mr51220424ejj.51.1574891422484; Wed, 27 Nov 2019 13:50:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574891422; cv=none; d=google.com; s=arc-20160816; b=b8L57Euh8xoWpLcr4QAgBUEcoW/0bquq6W04bqpmBRmeG2jJ3l27oG2oqVt1Cw1WWC bItqMzhnlvtUCq4FExCOq/YGVIOj4hi2ifSec19/9k1bDQERx88p0k8FqLtiIlC3XI3O 5Nez0bs7vpae9VUsA6x1JY5I+Hphg88NGBxcRIlaqC0UenAaBMs7AiYDppAUErv1uBuk vdwXfU1QLIJDxoO2lWvuqzjyD9S2dyHqa2yO/Gje+Ua5QSWpTq7ZjUN0WujxqXryyaad nA+NaEHK64S1rtC0h7J7dLy6BmWTgaZnHFDbFB6qr9nv6AwxKkM+CSj+EehhAWj9IO6o ayFg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AsapvXTuY133hAm8S8o9VCXHAzJ98/V0AE9QyCZqEp8=; b=fEvcfXCE7hGaDsmlooRk5i0TtX125Ut1czINARwNdim7DUL+9d7rHOPpvepSGoLjoW PVcF/VRIj3ILr8wIJVohWF95R0TX2r6qq94uHDsNNYUzW/di43EDC5vZFinn2ul9CM99 U6RFgoRHQfyBTjWXa1e0sETat2ShYZKOBje6f7pFT14QK72g8jQN62UEZJif7LoX59ot KD7roHVQHAuMiTGvgu11sIDyQrQo/aSzfGVaPLK7EUC7/K7RquIgiwZJ9pPtTCf15s0X SFCvyjhDp6HJUaQTHX3BQO3zRBg6yNrMd6tXsUXSod1FqLsm34G9UlSAxEeF2J8AgmSv fG/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SfZSWbH+; 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 h5si12505444edd.401.2019.11.27.13.49.59; Wed, 27 Nov 2019 13:50:22 -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=SfZSWbH+; 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 S1727874AbfK0Uf1 (ORCPT + 99 others); Wed, 27 Nov 2019 15:35:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:36562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727857AbfK0UfY (ORCPT ); Wed, 27 Nov 2019 15:35:24 -0500 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 7849E20866; Wed, 27 Nov 2019 20:35:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574886923; bh=tGyuerj4tgHb0qQhYD5ienk8WW7ZV2NkS0UB4aqLey4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SfZSWbH+0E1TxCwI9ys5sPsFJhPYG5kAGaM5HXhS4ilNq4pLoafG9z0W4GH/mix/k aSCzkqQfentPBr8oRyBysM70pMtbMEvXIC/HfK909OvaVuAeTaEqlWayQImpRUpq6u epv73lbc8SIOCCMmAp4SU0fjBDRuZH2fPuwqD7sw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Herrenschmidt , Michael Ellerman , Sasha Levin Subject: [PATCH 4.4 045/132] macintosh/windfarm_smu_sat: Fix debug output Date: Wed, 27 Nov 2019 21:30:36 +0100 Message-Id: <20191127202942.155515778@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127202857.270233486@linuxfoundation.org> References: <20191127202857.270233486@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 ad6223e883404..3d310dd60a0be 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