From patchwork Wed Feb 15 19:45:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57697 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384124wrn; Wed, 15 Feb 2023 11:47:45 -0800 (PST) X-Google-Smtp-Source: AK7set844PcLBgXBS7Ldp7IkEyv0V7iBlxrNQEfSI3yaOoGmcGYj9FUD310G60HkvIue5NOCcrIR X-Received: by 2002:a05:6a21:2c86:b0:bc:ee95:dee with SMTP id ua6-20020a056a212c8600b000bcee950deemr2639284pzb.37.1676490464904; Wed, 15 Feb 2023 11:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490464; cv=none; d=google.com; s=arc-20160816; b=tl1sYCDj4JlDx8POdku/V+dfjYo9lq+l6ps1IZZ5scm5owcsAaZQDwnCyy0F7D5fx+ +M5Sj1HgNva75z+aMo+t2610qDfqLqiM2kagiiejw75Ch+UpFuhXmGNiiBMYrYCC1iOF lMpiyrXkncxsOVgpIEZavL0bhiSvRaP8s1zSzFUyjiDF5l2XFrh+CkJe0dqLDWbJGe8V qSXTVryEgKSVsPzr5hr8WmDRdNpNF6AXp1duHL0sbS9spQkd79MFgQnR8JsfuDetTVcU AgGGmjNYN1xOD/gUzK0bKGX1AnMUqu3w+Md+2Vvc4aiUDaR97yOOU8zQ7YbYxsPUV4He ID5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=N9/VNu+MAsRjYP3Mshu9QMWoLeSxAU6TsLEoJJka90w=; b=rmk0Tfz6AP/8vREfqb8MzuBbXlvynvWwg1kaviPBEBXOCSPleqPh8g93iZJF4+4Tme wB5Mkw8SAB+wAZQKjQrkRRG81Y5zg6vvSBE+yLHaq/21trCtdXV8FuirpnbUSVCj3NEv EaR8+uRMfa0ab77zMnalQ2LbfZS95rFpI55M5Z4sRF85dULPamENSuhPKFdT68TS6P2e DIFLwTbHWBWmfdxoasVLK62GzRl/I1lOONRHUbqX9q6j/AgZdrMRCIid7BcZrLc+e3Ar EjpcneV53kjXLu9kM5759jkl/rnuOSRAyUY6yja1ZkKK5A+qM0WkN9NbYjsAM8a0xtNb ZUJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m188-20020a633fc5000000b004cf4fcf9c15si9514132pga.52.2023.02.15.11.47.32; Wed, 15 Feb 2023 11:47:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbjBOTqc (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbjBOTqT (ORCPT ); Wed, 15 Feb 2023 14:46:19 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C98F4109F; Wed, 15 Feb 2023 11:46:11 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 9F2357A0708; Wed, 15 Feb 2023 20:46:05 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/18] pata_parport: use print_hex_* Date: Wed, 15 Feb 2023 20:45:48 +0100 Message-Id: <20230215194554.25632-13-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230215194554.25632-1-linux@zary.sk> References: <20230215194554.25632-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757927665843820983?= X-GMAIL-MSGID: =?utf-8?q?1757927665843820983?= Use print_hex_* for debug dumps. Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 22 ++++------------------ drivers/ata/pata_parport/epat.c | 2 +- drivers/ata/pata_parport/epia.c | 2 +- drivers/ata/pata_parport/friq.c | 2 +- drivers/ata/pata_parport/frpw.c | 2 +- 5 files changed, 8 insertions(+), 22 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 1cba098b4b82..dec24983d140 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -334,12 +334,9 @@ static int bpck_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } - if (verbose) { - printk("bpck: 0x%x unit %d mode %d: ", - pi->port, pi->unit, pi->mode); - for (i=0;idev, "bpck: 0x%x unit %d mode %d: ", + pi->port, pi->unit, pi->mode); + print_hex_dump_debug("bpck: ", DUMP_PREFIX_NONE, TEST_LEN, 1, buf, TEST_LEN, false); e = 0; for (i=0;i '~')) - scratch[i] = '.'; - printk("bpck EEPROM: %64.64s\n", scratch); - printk(" %64.64s\n", &scratch[64]); -#endif - + print_hex_dump_bytes("bpck EEPROM: ", DUMP_PREFIX_NONE, scratch, 128); dev_info(&pi->dev, "bpck %s, backpack %8.8s unit %d", BPCK_VERSION, &scratch[110], pi->unit); dev_info(&pi->dev, " at 0x%x, mode %d (%s), delay %d\n", pi->port, diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 389faa6ae49d..b08ed2f86668 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -280,7 +280,7 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) epat_disconnect(pi); dev_dbg(&pi->dev, "epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", - pi->port, pi->mode, cc, e[0], e[1], f); + pi->port, pi->mode, cc, e[0], e[1], f); return (e[0] && e[1]) || f; } diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 48d12f56c501..32bec3449338 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -263,7 +263,7 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) epia_disconnect(pi); dev_dbg(&pi->dev, "epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->port, pi->mode, e[0], e[1], f); + pi->port, pi->mode, e[0], e[1], f); return (e[0] && e[1]) || f; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index ec564e7cb930..9e3ec64896f2 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -208,7 +208,7 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) friq_disconnect(pi); dev_dbg(&pi->dev, "friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->port, pi->mode, e[0], e[1], r); + pi->port, pi->mode, e[0], e[1], r); return (r || (e[0] && e[1])); } diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 5ea16a247257..c12c8aa9707c 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -257,7 +257,7 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) frpw_disconnect(pi); dev_dbg(&pi->dev, "frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n", - pi->port, (pi->private%2), pi->mode, e[0], e[1], r); + pi->port, (pi->private%2), pi->mode, e[0], e[1], r); return (r || (e[0] && e[1])); }