From patchwork Tue Feb 14 23:00:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3246584wrn; Tue, 14 Feb 2023 15:04:04 -0800 (PST) X-Google-Smtp-Source: AK7set+Q3CAc1DyogaWu4WfPdM9rtwUJkB/dHEiGNUyV0Crq6c/IJtxRBKT01RsyBu665ZrqsAbT X-Received: by 2002:a17:907:2cf6:b0:8ae:e30f:4091 with SMTP id hz22-20020a1709072cf600b008aee30f4091mr510253ejc.30.1676415844475; Tue, 14 Feb 2023 15:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415844; cv=none; d=google.com; s=arc-20160816; b=aNL6CHdmy35T1NAo3GFqIY0QadZYukOsLKmRhxO3cifIGUm3WLZ+clKLRAC16uIcoQ crU66kGDs6I6MhZjXDEjM7YtIEnsrTQKWwG/TI5HnjPO2v/oVAtO2s3wAzeMJECkBnWS BT6q2/AcnxougBraMn34nMk+pCkjI5HH4Td8zeZpHYlZ38uNmJNHc+bfbada3xwrhb6O AucsDP9WexomdmDpdZptukc4ld7guDkLkukN+EQcdUZMGDgsnkK9eL94G92A7xXLOiwy zCSeEkMZFiScvhqrv9otYarFaEFCSlTrVS63DI5ohh0RvNz/yF8fAmhgUDWuYuxcrDJc KDGA== 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=fk9z1URj10rPqbcR633oev/ClDp2e/RQUiLaQzEJ7gI3XAhf2m7V++I1/fl+FJ/nW2 n4/E57DnZQ13Gil291FHWBXdTu8neyiBwlr91GWoyrvLxNPHvQg0Q7tmB7fka/rk44tD 2Rghuqae+PXIAXFUeHfNEX+cH2MQkXyyfySfPFdjZAhsUAK6sY8TFTlid3VvgIepuK/l uoDyxvl87DANYgdJo6wNXSyTvgvlWMOj2HsxzoYDGj9ytdHIiAlHCc/dXVdJduUEfO+g 5cnWXzdpcK0JxNtPQ+jHNcGPmU4C3e8kURBfoAr17EBjDMvlm+KNeLJqt20SzEFgmm9B l1Cg== 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 ft31-20020a170907801f00b008aa0feeee9esi17800263ejc.936.2023.02.14.15.03.22; Tue, 14 Feb 2023 15:04:04 -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 S232844AbjBNXAx (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232482AbjBNXAc (ORCPT ); Tue, 14 Feb 2023 18:00:32 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7546123862; Tue, 14 Feb 2023 15:00:25 -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 66D0C7A0708; Wed, 15 Feb 2023 00:00:20 +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 00:00:04 +0100 Message-Id: <20230214230010.20318-13-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-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?1757849420635873955?= X-GMAIL-MSGID: =?utf-8?q?1757849420635873955?= 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])); }