From patchwork Wed Feb 15 19:45:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57695 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384045wrn; Wed, 15 Feb 2023 11:47:32 -0800 (PST) X-Google-Smtp-Source: AK7set+FFPSB28HcEoiHyj/vzgLv38VlG4nukq82F4bRp/zJitzadEN/jq2PX6zyh/O5aQfPs/C7 X-Received: by 2002:a17:902:ecd0:b0:19a:9984:5586 with SMTP id a16-20020a170902ecd000b0019a99845586mr3625504plh.27.1676490452544; Wed, 15 Feb 2023 11:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490452; cv=none; d=google.com; s=arc-20160816; b=Rx6R1JczPJkjH51V3YwgsC3ZPdiPYYwkUbj15zWOcx0xossU0UBUTGxdJtwO1GHPU2 rINrFBW5W30o7S1TTmugHgihHl64yzqTz3fyZLptFZ/FfZoaVyGisJVHT00/7cRdgI3R R3NkG7xDeIAjZBJWFvvj9xvGQjcVpbAE7cPzugs4rj3Rh8ZoFUfZteHcKg8urWo56Ws5 V3GpoRESNn7mmzwI3gUdo1yH7XSlVeu4yqlfxLhpcGIW7wk7ZFUwNEk1HZJbudhJ8ncI uyuuTQwD/bzmTxwo9K8NrxNvdicefPrHsrQrzXPe5BeqbvnrsDDpQxiR+LoT0ap27I2C FRZA== 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=J042bp6UcXZuo/TCdZbT4kKR5gzxatLyvEnFvL9Wce0=; b=anFZxbucczf174BdK+45bQ8w/TZdWKihSzoqcOLNtrPwd58vhuRX9UbUxNR3GbvIBB YZtm9b9ES40R5R1TFGosFb1525yf09EA/SwFG1AiKdBpYAPOrtxvXN7NwO+5vtHkyNHY 5VsJE3yEc7Zn30irHHhDwReWM+9M40PSf9m5uoSu8yoF7o9m0oafeNn+CNkbLUnqJVmJ RXWSVrOZweWx+rhv1Cpjq2ELn8hyThDgImqAePwAkuZHvlO+ITpgS3Y0avS3y/fZf1nG x+SBnyehzOtVDQWqVyvLhaRAo73e4s7nkAqfX28DsMFDlV7lhCIBGxo1BkpKgG7Y2cX2 Aweg== 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 j13-20020a170903024d00b00198dae95f85si18408107plh.402.2023.02.15.11.47.19; Wed, 15 Feb 2023 11:47:32 -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 S229734AbjBOTqP (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbjBOTqK (ORCPT ); Wed, 15 Feb 2023 14:46:10 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D0AB741095; Wed, 15 Feb 2023 11:46:04 -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 BDA017A03DC; Wed, 15 Feb 2023 20:46:03 +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 01/18] pata_parport: fix EPAT C7/C8 Kconfig Date: Wed, 15 Feb 2023 20:45:37 +0100 Message-Id: <20230215194554.25632-2-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?1757927652840652538?= X-GMAIL-MSGID: =?utf-8?q?1757927652840652538?= CONFIG_PARIDE_EPATC8 was renamed to CONFIG_PATA_PARPORT_EPATC8 but epat.c was not updated to reflect that. Update it. Reported-by: Sergey Shtylyov Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/epat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 6ce2dee7657f..93ee91d9338b 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -324,7 +324,7 @@ static struct pi_protocol epat = { static int __init epat_init(void) { -#ifdef CONFIG_PARIDE_EPATC8 +#ifdef CONFIG_PATA_PARPORT_EPATC8 epatc8 = 1; #endif return paride_register(&epat); From patchwork Wed Feb 15 19:45:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57690 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383847wrn; Wed, 15 Feb 2023 11:47:10 -0800 (PST) X-Google-Smtp-Source: AK7set+oG313Bo1N77WIW0j3ifLZeFtfGoq8iV+TDK7Ya16eOotOlB4z1qBPgi2TIKlxeTVZFA3b X-Received: by 2002:a05:6a00:2884:b0:5a8:d438:c72 with SMTP id ch4-20020a056a00288400b005a8d4380c72mr566266pfb.5.1676490430676; Wed, 15 Feb 2023 11:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490430; cv=none; d=google.com; s=arc-20160816; b=jDNm8rS5rxweYlTktqRGBHB46HFaMVGbJ1xoN3jpnTf7mCu2z3uSTDRJeXUjy9NrYC XYoW4pV8xgbM3MEZjqKRnFFYv43Mm0B2UE1D1WRYwZb08dNdfBrpukDH7NVd9GgnN2zc v4GNVG+oBPI+F3r8RjPjEEw7gFdGbAY3ORWnFYnMID2PhMQSsho2Kq29/MpDkx4CSp5r xZVBgNBr7XujlNE80KgkBKW0MxUbgWdagUkYXuV4fhY3ff8i5zjm9HSo3X7acKthvk5k C5lhYpSJs/UmWXSsR9g8FuOoMSqeCgSkpGOzaNnE6+N0lKBxAepKWBKGGcJATzhE1hit 5ovQ== 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=kRiDqyVYAQ8H4eh1cAVCq8bgBhdu++B/LxbJiZhyjJ8=; b=cWHDBkAPeAkDJyWde9r7VIqfb8iwUPJh0zUOwSsgFDsWo69o59rLAjgVvHR9e1Syw9 DErItVWGhrFc0LFcd+hFIeS8uCzeAmlLG366iyjay714BQ+BvoDQhz6j+2Y0GyBKV5hM ZbdarQfG3k/X0vRnbSZe/jF/btgghprtiWGs8FpEhVgbjJeD0HZFDmCBFBeK0dBVmxuB Fi4fmUAfbfivUdowXubgUAoTlR74y0v2it2tphORL8jgs2mKzXznfs48WqR0F1y+08lH c1maA1zt3UUpidca+WrH0cI+EEjfCOXnBXmYvw6JFyxK1K6jwV85SjowUbSiikCNLqqY 6P4g== 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 y5-20020aa79e05000000b005a8d85904e1si5944496pfq.361.2023.02.15.11.46.58; Wed, 15 Feb 2023 11:47:10 -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 S229788AbjBOTqX (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjBOTqL (ORCPT ); Wed, 15 Feb 2023 14:46:11 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ECB5E410A0; Wed, 15 Feb 2023 11:46:04 -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 CDA817A04EF; Wed, 15 Feb 2023 20:46:03 +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 02/18] pata_parport: probe all units automatically Date: Wed, 15 Feb 2023 20:45:38 +0100 Message-Id: <20230215194554.25632-3-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?1757927629801595122?= X-GMAIL-MSGID: =?utf-8?q?1757927629801595122?= Only unit 0 is probed after registering a protocol driver or attaching a new parport. This causes bpck and bpck6 devices to be not detected automatically. Probe all units just like in manual device creation (using sysfs). Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/pata_parport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 294a266a0dda..49e99c9465fd 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -530,7 +530,7 @@ int pata_parport_register_driver(struct pi_protocol *pr) if (probe) { /* probe all parports using this protocol */ idr_for_each_entry(&parport_list, parport, port_num) - pi_init_one(parport, pr, -1, 0, -1); + pi_init_one(parport, pr, -1, -1, -1); } mutex_unlock(&pi_mutex); @@ -665,7 +665,7 @@ static void pata_parport_attach(struct parport *port) if (probe) { /* probe this port using all protocols */ idr_for_each_entry(&protocols, pr, pr_num) - pi_init_one(port, pr, -1, 0, -1); + pi_init_one(port, pr, -1, -1, -1); } mutex_unlock(&pi_mutex); } From patchwork Wed Feb 15 19:45:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57689 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383834wrn; Wed, 15 Feb 2023 11:47:09 -0800 (PST) X-Google-Smtp-Source: AK7set9DhRBV6jhy88oRyKXrQRpES18QkuhQambVQHXHxIdLyfLhZZUQrHNwOuTaEO3zxHJ0aIMv X-Received: by 2002:aa7:9dd1:0:b0:590:7616:41eb with SMTP id g17-20020aa79dd1000000b00590761641ebmr2663756pfq.30.1676490429627; Wed, 15 Feb 2023 11:47:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490429; cv=none; d=google.com; s=arc-20160816; b=LAZr0uTq/8pYGo9aRsUYRUhwFoJ86GfR6XHk2LFGj1Bop7vJUBPpICh/L9Kej5CCYA BKnxghfi44arNabQbJjXwGVna+vpdKrfAihPfe45iLVkIXoa+eloAwVEnroKa63mvhqr Gq4Wq2LXhOhx5vXlOdb6Req1Qq7r8q4MUnStA9vEGY5QZaqmD6QvWRZklUyksQdf4rV+ Ob1095AUSlA4TXJgPOFA4+w8KXpsyi+pE3ybhxySVL3SQQYbDbJg9fln627hak4bwX/x 8fxad1KC+pFc48YAlyv1zyGV+FjhTW4NlKDpeDXQ/EFJrSf7Lg8uqgiUxF92AYqO4z8m JXJw== 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=itaEl2/MV7NrB1NLxH/2G5OlmXYqlrvaP8KEI3d5iUU=; b=kFZeCZEVyORqbe0sGBsXEjUrcbBkZkIagi/WVhT4JwRtobHwBBN7/naRx6jAvGWOnb d1ApuItB+9DUTf1vGJ10QZQE3tBgOyGKDDH5LxDgMoSLefzT/sYrlQpg/rod/lArQdwz NWxXpcPkck6mLoCoW2GZKeuJXCAfPJ2fumAhfFVOatjmLb3MMmpumYtfm+hEIDqVO5CY zaiFI/iyHHvJdGOPe3YuPUvM0+FeJoAmt6Uo/85mgbwoXDQhG5Eq7/G+igi2d2IySRDP QPylFEDrPTGOsbcZnW5OsXYFBhzAgkh0IucAwhZDXUQKTT7vfcytO36V0e+wDdiLw0DC 2rRw== 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 77-20020a621950000000b005a8b2a0385bsi11084943pfz.241.2023.02.15.11.46.57; Wed, 15 Feb 2023 11:47:09 -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 S229768AbjBOTqV (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjBOTqK (ORCPT ); Wed, 15 Feb 2023 14:46:10 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 17D1941097; Wed, 15 Feb 2023 11:46:04 -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 E5F577A056B; Wed, 15 Feb 2023 20:46:03 +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 03/18] pata_parport: Remove pi_swab16 and pi_swab32 Date: Wed, 15 Feb 2023 20:45:39 +0100 Message-Id: <20230215194554.25632-4-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?1757927628733652063?= X-GMAIL-MSGID: =?utf-8?q?1757927628733652063?= Convert comm and kbic drivers to use standard swab16. Remove pi_swab16 and pi_swab32. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/comm.c | 7 +++++-- drivers/ata/pata_parport/kbic.c | 7 +++++-- include/linux/pata_parport.h | 17 ----------------- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 1775e7ed9336..11ed9fb57744 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -165,11 +165,14 @@ static void comm_write_block( PIA *pi, char * buf, int count ) break; case 3: w3(0x48); (void)r1(); - for (k=0;kport + 4)) #define r4l() (delay_p, inl(pi->port + 4)) -static inline u16 pi_swab16(char *b, int k) -{ - union { u16 u; char t[2]; } r; - - r.t[0] = b[2 * k + 1]; r.t[1] = b[2 * k]; - return r.u; -} - -static inline u32 pi_swab32(char *b, int k) -{ - union { u32 u; char f[4]; } r; - - r.f[0] = b[4 * k + 1]; r.f[1] = b[4 * k]; - r.f[2] = b[4 * k + 3]; r.f[3] = b[4 * k + 2]; - return r.u; -} - struct pi_protocol { char name[8]; From patchwork Wed Feb 15 19:45:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57686 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383762wrn; Wed, 15 Feb 2023 11:46:56 -0800 (PST) X-Google-Smtp-Source: AK7set9pxd7HgSbHBEJz8zb3sfcCNBFvHL1PskoSMtUJUXxIUyPkxaq3WFkGaE20Kp8NoRzuldC/ X-Received: by 2002:a05:6a20:a10a:b0:b6:8317:219b with SMTP id q10-20020a056a20a10a00b000b68317219bmr3894521pzk.8.1676490416077; Wed, 15 Feb 2023 11:46:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490416; cv=none; d=google.com; s=arc-20160816; b=tNSvFPf+GLaegHuX8weFYq5hkK4qZ9B7Kpa7pXPWXJyYAwAntfgOkSqE2LbLy5/pxq 5JjuCwMvJEa4P84ADldIeKy9ZObOhdawlZ+4wJRzLuUAnENYvTnVM4sCW23zuUstzGQO BhwGLiz9nkqDUWF4sCY7vWH1oL0WO1dz+l8sDcJxDKV39L7rlE0SDcTqYmpCJTvgqmEl Im6fbpkRG/3pXXFjRvKE3grHAROGEM/oIf0Lx71qDZdf+1eC0Z3pKaQuhDIxNs3j8IvB 9Jbp1V5vpKJN9HI4He+eiWsepIo9ES1EBhwz+vvlbef4k63MSOHYyZbSPiJ7HVe8+FXL kQpQ== 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=saTclBulbgfzPqXErdscvzTEkk2/6XiEMCfPh+oWCJo=; b=LMWoEFD+Oj29TOJAbUm1yoYkO2ZmM+h1hBSdunpwDPu+fI9DF7jv2AOFPKTdgHbQrc wzFTKYzkLanPS7SvhaOv2C/moGxDqSXo7uzcHGbfKOg0E//3xX3Bb+PZ8jxqjiYY2Hp4 tiCgNfALh9d8YJwRt3O3HpN/oUBv22mZ3kLtrhGXSEKomZmIPPGur9oYOPhCWXOCLzpH dSdmO5Z4aH/TNn3cRZLTQGpUcviiSnaIMdR9ZggIRXNLwvI6O/3yXuDl2xzPkpHvYrvT ooajtqDoPSdqahZ3fwH8760F5KLuo6MKtdDH2gkS6546ygAER1ADmok9hAeKIGS5UyPc Nwgg== 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 g28-20020a63375c000000b004fb2b144a42si12530996pgn.86.2023.02.15.11.46.43; Wed, 15 Feb 2023 11:46:56 -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 S229717AbjBOTqS (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjBOTqK (ORCPT ); Wed, 15 Feb 2023 14:46:10 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 18058410B0; Wed, 15 Feb 2023 11:46:04 -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 0EB237A0596; Wed, 15 Feb 2023 20:46:04 +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 04/18] pata_parport: remove useless printks at module_init of bpck6 Date: Wed, 15 Feb 2023 20:45:40 +0100 Message-Id: <20230215194554.25632-5-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?1757927614523893667?= X-GMAIL-MSGID: =?utf-8?q?1757927614523893667?= bpck6 prints some useless messages on module_init. Remove them. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/bpck6.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index d897e2a28efe..3b3a40e48b21 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -247,10 +247,6 @@ static struct pi_protocol bpck6 = { static int __init bpck6_init(void) { - printk(KERN_INFO "bpck6: BACKPACK Protocol Driver V"BACKPACK_VERSION"\n"); - printk(KERN_INFO "bpck6: Copyright 2001 by Micro Solutions, Inc., DeKalb IL. USA\n"); - if(verbose) - printk(KERN_DEBUG "bpck6: verbose debug enabled.\n"); return paride_register(&bpck6); } From patchwork Wed Feb 15 19:45:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57687 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383811wrn; Wed, 15 Feb 2023 11:47:05 -0800 (PST) X-Google-Smtp-Source: AK7set8BR8x+5fVDFH+K6rw7fzbwXypH5dxfbHsx1N2woD4a9tW9NZsoxylRsYorB+p635IHaIun X-Received: by 2002:a05:6a20:244d:b0:be:b8bd:83ad with SMTP id t13-20020a056a20244d00b000beb8bd83admr3482414pzc.0.1676490425197; Wed, 15 Feb 2023 11:47:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490425; cv=none; d=google.com; s=arc-20160816; b=iLoFIaGcvqrSNTTqgO6BhlUBSgtrTCs8TOLj82uC+5+c7Sl8RzhwyaWl8oOx4gc9pI cPN04SQwLFDA8bm59p8L766pK9GFJblyksnp1yasaBKtdoH4RpdZ15QLXnlo0CFfwrME /UnKDyVE4SpIfVbsbXG97m6ww80oghL8zZZUUtULJBgMJnshz5CUHhwwl0f00VHh6i9j CnMZKmfj0KySHMEnbAVKi89YtoN+3r+girJivEVJC4CARRY/wm//lvN8NV9uCSzKZzbf JbhoUbNiwtTQyA+NGstw8Gr3r/eP4vWo3OVTWw+w8OvYaK9ORZwl1slmLV31zAa5acoY QPxA== 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=5JNSi9b3ny8T84od/jhSxkdPc2PVg/a0OoLb7/a7UbA=; b=rqqyPNiXxK2o17i0vErh+5cho0wERPq9pcfmFqpY6On/bcWgbur0FFeUXogHTzd0/Z VbUFyvKeVMssgOHl0iA6IOHAqovOLlryuuPJe6Z3y3LKZhsuXek44BWOPN1xfPusS7Ri f5vdlddrMnFsVBydjuxNV+kpwzl0jPcBXRnS/AsqSdJG2goTpROgtuVlt24WLrZdgGzK Rv0C6oLZTfK8tFsUBewyo5/f9FnuCg714TRUbzazim9F+7D09HVMDLzqEWW7SJQTtcnl ooipGVH2FlVxruubP3IEZjSuk5S++ol/a9AK+YT3RI4SeEYRrMo/tKbzsSnO0cCykOwq UQpA== 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 h4-20020a170902748400b0019a826d304fsi12489661pll.635.2023.02.15.11.46.51; Wed, 15 Feb 2023 11:47:05 -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 S229818AbjBOTq0 (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbjBOTqS (ORCPT ); Wed, 15 Feb 2023 14:46:18 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 65C8C3C7A7; 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 23CB57A05F1; Wed, 15 Feb 2023 20:46:04 +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 05/18] pata_parport: Introduce module_pata_parport_driver macro Date: Wed, 15 Feb 2023 20:45:41 +0100 Message-Id: <20230215194554.25632-6-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?1757927624030781599?= X-GMAIL-MSGID: =?utf-8?q?1757927624030781599?= Introduce module_pata_parport_driver macro and use it in protocol drivers to reduce boilerplate code. Remove paride_(un)register compatibility defines. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/aten.c | 13 +------------ drivers/ata/pata_parport/bpck.c | 13 +------------ drivers/ata/pata_parport/bpck6.c | 13 +------------ drivers/ata/pata_parport/comm.c | 13 +------------ drivers/ata/pata_parport/dstr.c | 13 +------------ drivers/ata/pata_parport/epat.c | 4 ++-- drivers/ata/pata_parport/epia.c | 13 +------------ drivers/ata/pata_parport/fit2.c | 13 +------------ drivers/ata/pata_parport/fit3.c | 13 +------------ drivers/ata/pata_parport/friq.c | 13 +------------ drivers/ata/pata_parport/frpw.c | 13 +------------ drivers/ata/pata_parport/kbic.c | 10 +++++----- drivers/ata/pata_parport/ktti.c | 13 +------------ drivers/ata/pata_parport/on20.c | 13 +------------ drivers/ata/pata_parport/on26.c | 13 +------------ include/linux/pata_parport.h | 14 +++++++++++--- 16 files changed, 31 insertions(+), 166 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index b66508bedbd0..9e6098f90162 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -147,16 +147,5 @@ static struct pi_protocol aten = { .log_adapter = aten_log_adapter, }; -static int __init aten_init(void) -{ - return paride_register(&aten); -} - -static void __exit aten_exit(void) -{ - paride_unregister( &aten ); -} - MODULE_LICENSE("GPL"); -module_init(aten_init) -module_exit(aten_exit) +module_pata_parport_driver(aten); diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 5fb3cf9ba11d..b9174cf8863c 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -462,16 +462,5 @@ static struct pi_protocol bpck = { .log_adapter = bpck_log_adapter, }; -static int __init bpck_init(void) -{ - return paride_register(&bpck); -} - -static void __exit bpck_exit(void) -{ - paride_unregister(&bpck); -} - MODULE_LICENSE("GPL"); -module_init(bpck_init) -module_exit(bpck_exit) +module_pata_parport_driver(bpck); diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 3b3a40e48b21..3c358e66db25 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -245,19 +245,8 @@ static struct pi_protocol bpck6 = { .release_proto = bpck6_release_proto, }; -static int __init bpck6_init(void) -{ - return paride_register(&bpck6); -} - -static void __exit bpck6_exit(void) -{ - paride_unregister(&bpck6); -} - MODULE_LICENSE("GPL"); MODULE_AUTHOR("Micro Solutions Inc."); MODULE_DESCRIPTION("BACKPACK Protocol module, compatible with PARIDE"); module_param(verbose, bool, 0644); -module_init(bpck6_init) -module_exit(bpck6_exit) +module_pata_parport_driver(bpck6); diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 11ed9fb57744..47f0fbccc3aa 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -206,16 +206,5 @@ static struct pi_protocol comm = { .log_adapter = comm_log_adapter, }; -static int __init comm_init(void) -{ - return paride_register(&comm); -} - -static void __exit comm_exit(void) -{ - paride_unregister(&comm); -} - MODULE_LICENSE("GPL"); -module_init(comm_init) -module_exit(comm_exit) +module_pata_parport_driver(comm); diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index edf414d186a6..e733a2512e17 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -218,16 +218,5 @@ static struct pi_protocol dstr = { .log_adapter = dstr_log_adapter, }; -static int __init dstr_init(void) -{ - return paride_register(&dstr); -} - -static void __exit dstr_exit(void) -{ - paride_unregister(&dstr); -} - MODULE_LICENSE("GPL"); -module_init(dstr_init) -module_exit(dstr_exit) +module_pata_parport_driver(dstr); diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 93ee91d9338b..7583d07083a8 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -327,12 +327,12 @@ static int __init epat_init(void) #ifdef CONFIG_PATA_PARPORT_EPATC8 epatc8 = 1; #endif - return paride_register(&epat); + return pata_parport_register_driver(&epat); } static void __exit epat_exit(void) { - paride_unregister(&epat); + pata_parport_unregister_driver(&epat); } MODULE_LICENSE("GPL"); diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 417d5a3c7f72..2bcb18a6845a 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -301,16 +301,5 @@ static struct pi_protocol epia = { .log_adapter = epia_log_adapter, }; -static int __init epia_init(void) -{ - return paride_register(&epia); -} - -static void __exit epia_exit(void) -{ - paride_unregister(&epia); -} - MODULE_LICENSE("GPL"); -module_init(epia_init) -module_exit(epia_exit) +module_pata_parport_driver(epia); diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 3c7a1069b026..c63f0cd2ea52 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -136,16 +136,5 @@ static struct pi_protocol fit2 = { .log_adapter = fit2_log_adapter, }; -static int __init fit2_init(void) -{ - return paride_register(&fit2); -} - -static void __exit fit2_exit(void) -{ - paride_unregister(&fit2); -} - MODULE_LICENSE("GPL"); -module_init(fit2_init) -module_exit(fit2_exit) +module_pata_parport_driver(fit2); diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index cd95f4f0edc2..adbef142c88f 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -196,16 +196,5 @@ static struct pi_protocol fit3 = { .log_adapter = fit3_log_adapter, }; -static int __init fit3_init(void) -{ - return paride_register(&fit3); -} - -static void __exit fit3_exit(void) -{ - paride_unregister(&fit3); -} - MODULE_LICENSE("GPL"); -module_init(fit3_init) -module_exit(fit3_exit) +module_pata_parport_driver(fit3); diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index da1d0cb016d6..e740fe933e20 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -261,16 +261,5 @@ static struct pi_protocol friq = { .release_proto = friq_release_proto, }; -static int __init friq_init(void) -{ - return paride_register(&friq); -} - -static void __exit friq_exit(void) -{ - paride_unregister(&friq); -} - MODULE_LICENSE("GPL"); -module_init(friq_init) -module_exit(friq_exit) +module_pata_parport_driver(friq); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 7bc8fa16d5d8..8c8681812bed 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -298,16 +298,5 @@ static struct pi_protocol frpw = { .log_adapter = frpw_log_adapter, }; -static int __init frpw_init(void) -{ - return paride_register(&frpw); -} - -static void __exit frpw_exit(void) -{ - paride_unregister(&frpw); -} - MODULE_LICENSE("GPL"); -module_init(frpw_init) -module_exit(frpw_exit) +module_pata_parport_driver(frpw); diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 93430ca32a52..b120597043cc 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -288,19 +288,19 @@ static int __init kbic_init(void) { int rv; - rv = paride_register(&k951); + rv = pata_parport_register_driver(&k951); if (rv < 0) return rv; - rv = paride_register(&k971); + rv = pata_parport_register_driver(&k971); if (rv < 0) - paride_unregister(&k951); + pata_parport_unregister_driver(&k951); return rv; } static void __exit kbic_exit(void) { - paride_unregister(&k951); - paride_unregister(&k971); + pata_parport_unregister_driver(&k951); + pata_parport_unregister_driver(&k971); } MODULE_LICENSE("GPL"); diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index fc4f707fed1f..15463cd18968 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -113,16 +113,5 @@ static struct pi_protocol ktti = { .log_adapter = ktti_log_adapter, }; -static int __init ktti_init(void) -{ - return paride_register(&ktti); -} - -static void __exit ktti_exit(void) -{ - paride_unregister(&ktti); -} - MODULE_LICENSE("GPL"); -module_init(ktti_init) -module_exit(ktti_exit) +module_pata_parport_driver(ktti); diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 995fc41e3122..f2a601e77842 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -138,16 +138,5 @@ static struct pi_protocol on20 = { .log_adapter = on20_log_adapter, }; -static int __init on20_init(void) -{ - return paride_register(&on20); -} - -static void __exit on20_exit(void) -{ - paride_unregister(&on20); -} - MODULE_LICENSE("GPL"); -module_init(on20_init) -module_exit(on20_exit) +module_pata_parport_driver(on20); diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 35f1c481a782..66f04015f19a 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -304,16 +304,5 @@ static struct pi_protocol on26 = { .log_adapter = on26_log_adapter, }; -static int __init on26_init(void) -{ - return paride_register(&on26); -} - -static void __exit on26_exit(void) -{ - paride_unregister(&on26); -} - MODULE_LICENSE("GPL"); -module_init(on26_init) -module_exit(on26_exit) +module_pata_parport_driver(on26); diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 458544fe5e6c..9614ce53470a 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -87,8 +87,16 @@ struct pi_protocol { int pata_parport_register_driver(struct pi_protocol *pr); void pata_parport_unregister_driver(struct pi_protocol *pr); -/* defines for old paride protocol modules */ -#define paride_register pata_parport_register_driver -#define paride_unregister pata_parport_unregister_driver + +/** + * module_pata_parport_driver() - Helper macro for registering a pata_parport driver + * @__pi_protocol: pi_protocol struct + * + * Helper macro for pata_parport drivers which do not do anything special in module + * init/exit. This eliminates a lot of boilerplate. Each module may only + * use this macro once, and calling it replaces module_init() and module_exit() + */ +#define module_pata_parport_driver(__pi_protocol) \ + module_driver(__pi_protocol, pata_parport_register_driver, pata_parport_unregister_driver) #endif /* LINUX_PATA_PARPORT_H */ From patchwork Wed Feb 15 19:45:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57691 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383870wrn; Wed, 15 Feb 2023 11:47:13 -0800 (PST) X-Google-Smtp-Source: AK7set80rX7mQ1gDOxOVkUqFGpzCMiksehku3NP1fG6FDybBycHDYgtWXJZYOGH4Z9Hb314BWQ6w X-Received: by 2002:a17:902:e80d:b0:19a:c65d:fa0 with SMTP id u13-20020a170902e80d00b0019ac65d0fa0mr4281209plg.55.1676490432922; Wed, 15 Feb 2023 11:47:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490432; cv=none; d=google.com; s=arc-20160816; b=sGOoaeH85SIauu1UXQcI8baKLbJvQQTxjYl+/qnmnB6DIcyf6IQbry7+PjGO0+Yml0 J6yZqiUGP7e5VZKlfw+0OIt56Z4n/U2l1iNIZZ47qMbSmR1ImbnrZcwQ8qZME5DME5sG 8RqWA1sU3wnAM/y/4nx6cwQZe+kTL8QwlaNR64sgrkxkPFfy67/bF4SpqzJbQ9q3T/Vp nPx1bRpVzOWNxPcbldrrBuCL5yuynoFt55Eq7fTdttLXmGjyN0IijViWeVM1ib+Vq2QO YkD4J28lu24f/kOMrPHmhPNDo27WeyJ09eBr2uAqOt6rIl8e4FRRW6X97jjnDvxhRNuW +Vww== 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=LPK+T+mK5rsIXbeHCKvYS/sdYiS3NMkWiGYJC9DXm5c=; b=Trt2ZQL6yNG7anvG9ctfIK452R/Im0QyhGrBzudu7FHgM4OPQla2n7yZ14e+XTt4wR cfMbRH3Y77KmfVjlNyO0tvoZ23EnL9Dz8J9ry28hg8m49XhtzxJ6NzY4W1NA3Y8GFASQ mmakoC5383X+QinjEPVVDRyeBAYlNeFrYfbJfdTixWtm4Fci6TlXhRit36cP4bYjVwUr nJk7GKqXv/kVxZDrGvxGhtsa6dsYyR6SJwc2sIvLS6sC9sXsOxm1XTC5+MJXAdX54OSF jqcL4nZZlT/0JwpjFkY2voo23CyQ72MBHivqZLY+Z8+ajI+Jw5TtPm0dzHVeeAT4kyKl wxEA== 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 k4-20020a170902694400b0019a730571dfsi14349837plt.394.2023.02.15.11.47.00; Wed, 15 Feb 2023 11:47:12 -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 S229736AbjBOTqf (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbjBOTqT (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 1CA6E410A0; 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 46D7B7A05F3; Wed, 15 Feb 2023 20:46:04 +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 06/18] pata_parport: remove devtype from struct pi_adapter Date: Wed, 15 Feb 2023 20:45:42 +0100 Message-Id: <20230215194554.25632-7-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?1757927632046372984?= X-GMAIL-MSGID: =?utf-8?q?1757927632046372984?= Only bpck driver uses devtype but it never gets set in pata_parport. Remove it. As most bpck devices are CD-ROMs, always run the code that depends on devtype == PI_PCD. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/bpck.c | 4 ++-- include/linux/pata_parport.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index b9174cf8863c..96386a10c22f 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -241,14 +241,14 @@ static void bpck_connect ( PIA *pi ) WR(5,8); - if (pi->devtype == PI_PCD) { +/* if (pi->devtype == PI_PCD) { possibly wrong, purpose unknown */ WR(0x46,0x10); /* fiddle with ESS logic ??? */ WR(0x4c,0x38); WR(0x4d,0x88); WR(0x46,0xa0); WR(0x41,0); WR(0x4e,8); - } +/* }*/ } static void bpck_disconnect ( PIA *pi ) diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 9614ce53470a..3fc6b002c7c8 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -11,15 +11,12 @@ #include -#define PI_PCD 1 /* dummy for paride protocol modules */ - struct pi_adapter { struct device dev; struct pi_protocol *proto; /* adapter protocol */ int port; /* base address of parallel port */ int mode; /* transfer mode in use */ int delay; /* adapter delay setting */ - int devtype; /* dummy for paride protocol modules */ char *device; /* dummy for paride protocol modules */ int unit; /* unit number for chained adapters */ int saved_r0; /* saved port state */ From patchwork Wed Feb 15 19:45:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57698 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384159wrn; Wed, 15 Feb 2023 11:47:49 -0800 (PST) X-Google-Smtp-Source: AK7set87ii8VCWbvK/ipSO26BgM91MImsjxaLgljzxN4LBtHJMLgHkNHAjr/4Lwd01iNOd8nRCig X-Received: by 2002:a17:90a:1c5:b0:233:fa78:7c90 with SMTP id 5-20020a17090a01c500b00233fa787c90mr4224213pjd.11.1676490469592; Wed, 15 Feb 2023 11:47:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490469; cv=none; d=google.com; s=arc-20160816; b=UpxupK84ZJX/EhKp7Ftc+kbrz3mac39e3Ff64qh8n3ny2M8Wlly3387tYN3LERevb1 ioS0s+v9zeDPlljcn39PxpQwLH2UG4myXpdlXJQ/5SCozD+VsF8Tdhl4nP6Qgh4erPR9 ppTN+NRIza5F+CJgT4/KzukvM7haWBOs5S5VoWx9Eb/77K6+RUOZj6EbcU69faFtZxmF IwlBqVaV52/J7KxoqkQfWde8yZ2/TwWrJPJUB6xZdFf5wQkgz9Z8ZNAE/AALHrhfcYXv Eh74Igal5I4FbseaVySjRzV98ANRXrvadQwk6BkpjxcG4B4D3k7lQ11uv0iBrxzlq0w0 blcw== 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=5yepV14SIjKeyL3bg6jP1x0VpulfICd1ui4YKvdOHqo=; b=aXrfR8GZ1ibaFSnC858k6i1gjYcUnwfdZ/rQqKM9uLEdsHrARzIiTuUlJfdljzUYoZ iNQwsDi93BcTrM3Hz+PCH24nd0N+AmGjDBBkTnH8WyqtkW3IsmipAbbKkX4F2r3R142a Ok0dfdih9dI/rR2fero5OpQGJPPUE1plrdYu0E7DYBRB4JJLLi32Z11jYAOE3FTG61fy h7yWIraKy3c/SAzyNO6IPQvXh1UM7xOvaOrx2u2yDyX4Oq9bYfSN/M8xOnIEaS1fwuV+ VIQjNbP+G98KmHDClqgFX1QDQlM2HLyp9TU57WG3W08OBcGjX/Cbx8YyJcgWnQ40dEbb n+NQ== 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 x5-20020a654145000000b004fbb651b03dsi558274pgp.71.2023.02.15.11.47.36; Wed, 15 Feb 2023 11:47:49 -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 S229924AbjBOTqt (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbjBOTqX (ORCPT ); Wed, 15 Feb 2023 14:46:23 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 36D17410B0; 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 590FA7A06EB; Wed, 15 Feb 2023 20:46:04 +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 07/18] pata_parport: remove device from struct pi_adapter Date: Wed, 15 Feb 2023 20:45:43 +0100 Message-Id: <20230215194554.25632-8-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?1757927670427031690?= X-GMAIL-MSGID: =?utf-8?q?1757927670427031690?= device is never set in pata_parport, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 3 +-- drivers/ata/pata_parport/bpck.c | 12 ++++++------ drivers/ata/pata_parport/bpck6.c | 10 ++++------ drivers/ata/pata_parport/comm.c | 3 +-- drivers/ata/pata_parport/dstr.c | 3 +-- drivers/ata/pata_parport/epat.c | 8 ++++---- drivers/ata/pata_parport/epia.c | 7 +++---- drivers/ata/pata_parport/fit2.c | 5 +++-- drivers/ata/pata_parport/fit3.c | 4 ++-- drivers/ata/pata_parport/friq.c | 6 +++--- drivers/ata/pata_parport/frpw.c | 12 +++++------- drivers/ata/pata_parport/kbic.c | 3 +-- drivers/ata/pata_parport/ktti.c | 5 +++-- drivers/ata/pata_parport/on20.c | 3 +-- drivers/ata/pata_parport/on26.c | 3 +-- include/linux/pata_parport.h | 1 - 16 files changed, 39 insertions(+), 49 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 9e6098f90162..bf83e4188c23 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -124,8 +124,7 @@ static void aten_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[2] = {"4-bit","8-bit"}; - printk("%s: aten %s, ATEN EH-100 at 0x%x, ", - pi->device,ATEN_VERSION,pi->port); + printk("aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 96386a10c22f..c33ca1cb72ac 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -335,8 +335,8 @@ static int bpck_test_proto( PIA *pi, char * scratch, int verbose ) } if (verbose) { - printk("%s: bpck: 0x%x unit %d mode %d: ", - pi->device,pi->port,pi->unit,pi->mode); + printk("bpck: 0x%x unit %d mode %d: ", + pi->port, pi->unit, pi->mode); for (i=0;i '~')) scratch[i] = '.'; - printk("%s: bpck EEPROM: %64.64s\n",pi->device,scratch); - printk("%s: %64.64s\n",pi->device,&scratch[64]); + printk("bpck EEPROM: %64.64s\n", scratch); + printk(" %64.64s\n", &scratch[64]); } #endif - printk("%s: bpck %s, backpack %8.8s unit %d", - pi->device,BPCK_VERSION,&scratch[110],pi->unit); + printk("bpck %s, backpack %8.8s unit %d", + BPCK_VERSION, &scratch[110], pi->unit); printk(" at 0x%x, mode %d (%s), delay %d\n",pi->port, pi->mode,mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 3c358e66db25..13bfd60655dd 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -200,11 +200,9 @@ static void bpck6_log_adapter( PIA *pi, char * scratch, int verbose ) char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - printk("%s: BACKPACK Protocol Driver V"BACKPACK_VERSION"\n",pi->device); - printk("%s: Copyright 2001 by Micro Solutions, Inc., DeKalb IL.\n",pi->device); - printk("%s: BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", - pi->device,BACKPACK_VERSION,pi->port); - printk("%s: Unit: %d Mode:%d (%s) Delay %d\n",pi->device, + printk("BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", + BACKPACK_VERSION, pi->port); + printk("Unit: %d Mode:%d (%s) Delay %d\n", pi->unit,pi->mode,mode_string[pi->mode],pi->delay); } @@ -217,7 +215,7 @@ static int bpck6_init_proto(PIA *pi) return 0; } - printk(KERN_ERR "%s: ERROR COULDN'T ALLOCATE MEMORY\n", pi->device); + printk(KERN_ERR "ERROR COULDN'T ALLOCATE MEMORY\n"); return -1; } diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 47f0fbccc3aa..908f6c44548b 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -183,8 +183,7 @@ static void comm_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - printk("%s: comm %s, DataStor Commuter at 0x%x, ", - pi->device,COMM_VERSION,pi->port); + printk("comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index e733a2512e17..3732e9b79429 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -195,8 +195,7 @@ static void dstr_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - printk("%s: dstr %s, DataStor EP2000 at 0x%x, ", - pi->device,DSTR_VERSION,pi->port); + printk("dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 7583d07083a8..59720daa9c19 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -280,8 +280,8 @@ static int epat_test_proto( PIA *pi, char * scratch, int verbose ) epat_disconnect(pi); if (verbose) { - printk("%s: epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", - pi->device,pi->port,pi->mode,cc,e[0],e[1],f); + printk("epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", + pi->port, pi->mode, cc, e[0], e[1], f); } return (e[0] && e[1]) || f; @@ -298,8 +298,8 @@ static void epat_log_adapter( PIA *pi, char * scratch, int verbose ) ver = RR(0xb); epat_disconnect(pi); - printk("%s: epat %s, Shuttle EPAT chip %x at 0x%x, ", - pi->device,EPAT_VERSION,ver,pi->port); + printk("epat %s, Shuttle EPAT chip %x at 0x%x, ", + EPAT_VERSION, ver, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 2bcb18a6845a..610269083441 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -263,8 +263,8 @@ static int epia_test_proto( PIA *pi, char * scratch, int verbose ) epia_disconnect(pi); if (verbose) { - printk("%s: epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->device,pi->port,pi->mode,e[0],e[1],f); + printk("epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", + pi->port, pi->mode, e[0], e[1], f); } return (e[0] && e[1]) || f; @@ -277,8 +277,7 @@ static void epia_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; - printk("%s: epia %s, Shuttle EPIA at 0x%x, ", - pi->device,EPIA_VERSION,pi->port); + printk("epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index c63f0cd2ea52..28de8e4e41c3 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -115,8 +115,9 @@ static void fit2_disconnect ( PIA *pi ) static void fit2_log_adapter( PIA *pi, char * scratch, int verbose ) -{ printk("%s: fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", - pi->device,FIT2_VERSION,pi->port,pi->delay); +{ + printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", + FIT2_VERSION, pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index adbef142c88f..0366f3123508 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -173,9 +173,9 @@ static void fit3_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; - printk("%s: fit3 %s, FIT 3000 adapter at 0x%x, " + printk("fit3 %s, FIT 3000 adapter at 0x%x, " "mode %d (%s), delay %d\n", - pi->device,FIT3_VERSION,pi->port, + FIT3_VERSION, pi->port, pi->mode,mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index e740fe933e20..9306a2c78d90 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -208,8 +208,8 @@ static int friq_test_proto( PIA *pi, char * scratch, int verbose ) friq_disconnect(pi); if (verbose) { - printk("%s: friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->device,pi->port,pi->mode,e[0],e[1],r); + printk("friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", + pi->port, pi->mode, e[0], e[1], r); } return (r || (e[0] && e[1])); @@ -221,7 +221,7 @@ static void friq_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; - printk("%s: friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", pi->device, + printk("friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", FRIQ_VERSION,pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 8c8681812bed..63f2165fec63 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -231,15 +231,13 @@ static int frpw_test_proto( PIA *pi, char * scratch, int verbose ) if (((pi->private%2) == 0) && (pi->mode > 2)) { if (verbose) - printk("%s: frpw: Xilinx does not support mode %d\n", - pi->device, pi->mode); + printk("frpw: Xilinx does not support mode %d\n", pi->mode); return 1; } if (((pi->private%2) == 1) && (pi->mode == 2)) { if (verbose) - printk("%s: frpw: ASIC does not support mode 2\n", - pi->device); + printk("frpw: ASIC does not support mode 2\n"); return 1; } @@ -261,8 +259,8 @@ static int frpw_test_proto( PIA *pi, char * scratch, int verbose ) frpw_disconnect(pi); if (verbose) { - printk("%s: frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n", - pi->device,pi->port,(pi->private%2),pi->mode,e[0],e[1],r); + printk("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); } return (r || (e[0] && e[1])); @@ -274,7 +272,7 @@ static void frpw_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; - printk("%s: frpw %s, Freecom (%s) adapter at 0x%x, ", pi->device, + printk("frpw %s, Freecom (%s) adapter at 0x%x, ", FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index b120597043cc..9a99b9e35d41 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -235,8 +235,7 @@ static void kbic_log_adapter( PIA *pi, char * scratch, { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; - printk("%s: kbic %s, KingByte %s at 0x%x, ", - pi->device,KBIC_VERSION,chip,pi->port); + printk("kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index 15463cd18968..d87eb3c139bc 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -92,8 +92,9 @@ static void ktti_disconnect ( PIA *pi ) static void ktti_log_adapter( PIA *pi, char * scratch, int verbose ) -{ printk("%s: ktti %s, KT adapter at 0x%x, delay %d\n", - pi->device,KTTI_VERSION,pi->port,pi->delay); +{ + printk("ktti %s, KT adapter at 0x%x, delay %d\n", + KTTI_VERSION, pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index f2a601e77842..0a1e60e20656 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -115,8 +115,7 @@ static void on20_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[2] = {"4-bit","8-bit"}; - printk("%s: on20 %s, OnSpec 90c20 at 0x%x, ", - pi->device,ON20_VERSION,pi->port); + printk("on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 66f04015f19a..ceb5018caeec 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -280,8 +280,7 @@ static void on26_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - printk("%s: on26 %s, OnSpec 90c26 at 0x%x, ", - pi->device,ON26_VERSION,pi->port); + printk("on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 3fc6b002c7c8..dcab769aa639 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -17,7 +17,6 @@ struct pi_adapter { int port; /* base address of parallel port */ int mode; /* transfer mode in use */ int delay; /* adapter delay setting */ - char *device; /* dummy for paride protocol modules */ int unit; /* unit number for chained adapters */ int saved_r0; /* saved port state */ int saved_r2; /* saved port state */ From patchwork Wed Feb 15 19:45:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57699 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384244wrn; Wed, 15 Feb 2023 11:48:05 -0800 (PST) X-Google-Smtp-Source: AK7set+qyxmQAjbPDYUFVx6XGVh5BWj3YKqRaDjojVeMp1DG7qeD1DA+pVTK+2OqsJqtvRyYwUfz X-Received: by 2002:a05:6a20:7f98:b0:bc:a96b:c7f7 with SMTP id d24-20020a056a207f9800b000bca96bc7f7mr4149874pzj.9.1676490485121; Wed, 15 Feb 2023 11:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490485; cv=none; d=google.com; s=arc-20160816; b=qYHahZ8vhGfr7Ez8yz3wyLT9NYI1sX0Jal0jsj/bNoGWqxlIRp3es+afCacgtSOPBt C+db5eUGy2XKarenQn2FzWif0mtOGtj54fyT8VwGogssZhWfD4Rp4lRTRuuIgSP1h/Dp EoqE9c7mBwG+zbYq7+oE4eeV3XOoEv3GvREMDmQi6hy92PsT2yVCasK9ZdJSNejOBtHO sUC64jz8mYBtclEpAPUa7x/SCLJoe833cCALV4HkN0EICECLUQO2aoc4bJbxri3PbUrk WC0XZc9NvZV/KgiMJQu7eW1WUHBdDK7JMeQvdF7sy8zqiReU9iEjX9D/OFCCCPiAo0nx MoZw== 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=MSbK1bg2ANXTTBqrKnFhUz49EqngzKbWQzSpEOhTJQk=; b=WRPAyaE0zaWlsb8vaseTm5kB67OXqfmXalQfKqxkB/kkZV0SStHnJiYIpEZPWoJR6k vxYG7VHbY8zd836gh1+F4zvm5Y9+Vq2NsGhFHW3sygEjvWLJhQKSjxKJxkvuaduXX2Xp Wp0hhMFTsFKscaT0ehXGxLqcl8+ZzkZlrT6yZMCRFN5iFBBEzKvR3Wu8ZsmbNA2A5S4C qAdiErUgvPMG8KjpecPMJ6Mj4qGNHC5lYyEWDzJiybR9huJ1uuk/d57C+LDi5umOE37n 1Urj0+Una+2IEwohErzB98ZFMeqHElj6e+dSIuBb2Obq4cbTCIzD5cJaJBGnNEoIJS1d 13+g== 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 v24-20020a63f218000000b004cf7904ba60si17000222pgh.25.2023.02.15.11.47.52; Wed, 15 Feb 2023 11:48:05 -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 S229936AbjBOTqx (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbjBOTqX (ORCPT ); Wed, 15 Feb 2023 14:46:23 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C7D341095; 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 86A127A06EC; Wed, 15 Feb 2023 20:46:04 +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 08/18] pata_parport: remove typedef struct PIA Date: Wed, 15 Feb 2023 20:45:44 +0100 Message-Id: <20230215194554.25632-9-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?1757927686986966626?= X-GMAIL-MSGID: =?utf-8?q?1757927686986966626?= Remove typedef struct PIA and use struct pi_adapter directly. Fix formatting (excessive spaces) while at it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 14 +++++++------- drivers/ata/pata_parport/bpck.c | 24 ++++++++++++------------ drivers/ata/pata_parport/bpck6.c | 22 +++++++++++----------- drivers/ata/pata_parport/comm.c | 14 +++++++------- drivers/ata/pata_parport/dstr.c | 14 +++++++------- drivers/ata/pata_parport/epat.c | 16 ++++++++-------- drivers/ata/pata_parport/epia.c | 16 ++++++++-------- drivers/ata/pata_parport/fit2.c | 14 +++++++------- drivers/ata/pata_parport/fit3.c | 14 +++++++------- drivers/ata/pata_parport/friq.c | 20 ++++++++++---------- drivers/ata/pata_parport/frpw.c | 20 ++++++++++---------- drivers/ata/pata_parport/kbic.c | 24 ++++++++++++------------ drivers/ata/pata_parport/ktti.c | 14 +++++++------- drivers/ata/pata_parport/on20.c | 14 +++++++------- drivers/ata/pata_parport/on26.c | 16 ++++++++-------- include/linux/pata_parport.h | 2 -- 16 files changed, 128 insertions(+), 130 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index bf83e4188c23..4579e554fbad 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -35,7 +35,7 @@ static int cont_map[2] = { 0x08, 0x20 }; -static void aten_write_regr( PIA *pi, int cont, int regr, int val) +static void aten_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -44,7 +44,7 @@ static void aten_write_regr( PIA *pi, int cont, int regr, int val) w0(r); w2(0xe); w2(6); w0(val); w2(7); w2(6); w2(0xc); } -static int aten_read_regr( PIA *pi, int cont, int regr ) +static int aten_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -67,7 +67,7 @@ static int aten_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void aten_read_block( PIA *pi, char * buf, int count ) +static void aten_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b, c, d; @@ -95,7 +95,7 @@ static void aten_read_block( PIA *pi, char * buf, int count ) } } -static void aten_write_block( PIA *pi, char * buf, int count ) +static void aten_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -107,20 +107,20 @@ static void aten_write_block( PIA *pi, char * buf, int count ) w2(0xc); } -static void aten_connect ( PIA *pi ) +static void aten_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(0xc); } -static void aten_disconnect ( PIA *pi ) +static void aten_disconnect(struct pi_adapter *pi) { w0(pi->saved_r0); w2(pi->saved_r2); } -static void aten_log_adapter( PIA *pi, char * scratch, int verbose ) +static void aten_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index c33ca1cb72ac..46805c584730 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -46,7 +46,7 @@ static int cont_map[3] = { 0x40, 0x48, 0 }; -static int bpck_read_regr( PIA *pi, int cont, int regr ) +static int bpck_read_regr(struct pi_adapter *pi, int cont, int regr) { int r, l, h; @@ -77,7 +77,7 @@ static int bpck_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void bpck_write_regr( PIA *pi, int cont, int regr, int val ) +static void bpck_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -106,7 +106,7 @@ static void bpck_write_regr( PIA *pi, int cont, int regr, int val ) #define WR(r,v) bpck_write_regr(pi,2,r,v) #define RR(r) (bpck_read_regr(pi,2,r)) -static void bpck_write_block( PIA *pi, char * buf, int count ) +static void bpck_write_block(struct pi_adapter *pi, char *buf, int count) { int i; @@ -147,7 +147,7 @@ static void bpck_write_block( PIA *pi, char * buf, int count ) } } -static void bpck_read_block( PIA *pi, char * buf, int count ) +static void bpck_read_block(struct pi_adapter *pi, char *buf, int count) { int i, l, h; @@ -194,7 +194,7 @@ static void bpck_read_block( PIA *pi, char * buf, int count ) } } -static int bpck_probe_unit ( PIA *pi ) +static int bpck_probe_unit(struct pi_adapter *pi) { int o1, o0, f7, id; int t, s; @@ -217,7 +217,7 @@ static int bpck_probe_unit ( PIA *pi ) return 1; } -static void bpck_connect ( PIA *pi ) +static void bpck_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); w0(0xff-pi->unit); w2(4); w0(pi->unit); @@ -251,14 +251,14 @@ static void bpck_connect ( PIA *pi ) /* }*/ } -static void bpck_disconnect ( PIA *pi ) +static void bpck_disconnect(struct pi_adapter *pi) { w0(0); if (pi->mode >= 2) { w2(9); w2(0); } else t2(2); w2(0x4c); w0(pi->saved_r0); } -static void bpck_force_spp ( PIA *pi ) +static void bpck_force_spp(struct pi_adapter *pi) /* This fakes the EPP protocol to turn off EPP ... */ @@ -276,7 +276,7 @@ static void bpck_force_spp ( PIA *pi ) #define TEST_LEN 16 -static int bpck_test_proto( PIA *pi, char * scratch, int verbose ) +static int bpck_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int i, e, l, h, om; char buf[TEST_LEN]; @@ -346,7 +346,7 @@ static int bpck_test_proto( PIA *pi, char * scratch, int verbose ) return e; } -static void bpck_read_eeprom ( PIA *pi, char * buf ) +static void bpck_read_eeprom(struct pi_adapter *pi, char *buf) { int i, j, k, p, v, f, om, od; @@ -397,7 +397,7 @@ static void bpck_read_eeprom ( PIA *pi, char * buf ) pi->mode = om; pi->delay = od; } -static int bpck_test_port ( PIA *pi ) /* check for 8-bit port */ +static int bpck_test_port(struct pi_adapter *pi) /* check for 8-bit port */ { int i, r, m; @@ -416,7 +416,7 @@ static int bpck_test_port ( PIA *pi ) /* check for 8-bit port */ return 5; } -static void bpck_log_adapter( PIA *pi, char * scratch, int verbose ) +static void bpck_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5] = { "4-bit","8-bit","EPP-8", "EPP-16","EPP-32" }; diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 13bfd60655dd..8ed3cf3b627e 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -56,7 +56,7 @@ static bool verbose; /* set this to 1 to see debugging messages and whatnot */ #define ATAPI_DEVICE_CONTROL 0x0e /* device control (write) */ /****************************************************************/ -static int bpck6_read_regr(PIA *pi, int cont, int reg) +static int bpck6_read_regr(struct pi_adapter *pi, int cont, int reg) { unsigned int out; @@ -69,7 +69,7 @@ static int bpck6_read_regr(PIA *pi, int cont, int reg) return(out); } -static void bpck6_write_regr(PIA *pi, int cont, int reg, int val) +static void bpck6_write_regr(struct pi_adapter *pi, int cont, int reg, int val) { /* check for bad settings */ if (reg>=0 && reg<=7 && cont>=0 && cont<=1) @@ -78,17 +78,17 @@ static void bpck6_write_regr(PIA *pi, int cont, int reg, int val) } } -static void bpck6_write_block( PIA *pi, char * buf, int len ) +static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len) { ppc6_wr_port16_blk(PPCSTRUCT(pi),ATAPI_DATA,buf,(u32)len>>1); } -static void bpck6_read_block( PIA *pi, char * buf, int len ) +static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len) { ppc6_rd_port16_blk(PPCSTRUCT(pi),ATAPI_DATA,buf,(u32)len>>1); } -static void bpck6_connect ( PIA *pi ) +static void bpck6_connect(struct pi_adapter *pi) { if(verbose) { @@ -112,7 +112,7 @@ static void bpck6_connect ( PIA *pi ) ppc6_wr_extout(PPCSTRUCT(pi),0x3); } -static void bpck6_disconnect ( PIA *pi ) +static void bpck6_disconnect(struct pi_adapter *pi) { if(verbose) { @@ -122,7 +122,7 @@ static void bpck6_disconnect ( PIA *pi ) ppc6_close(PPCSTRUCT(pi)); } -static int bpck6_test_port ( PIA *pi ) /* check for 8-bit port */ +static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */ { if(verbose) { @@ -154,7 +154,7 @@ static int bpck6_test_port ( PIA *pi ) /* check for 8-bit port */ } } -static int bpck6_probe_unit ( PIA *pi ) +static int bpck6_probe_unit(struct pi_adapter *pi) { int out; @@ -195,7 +195,7 @@ static int bpck6_probe_unit ( PIA *pi ) } } -static void bpck6_log_adapter( PIA *pi, char * scratch, int verbose ) +static void bpck6_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; @@ -206,7 +206,7 @@ static void bpck6_log_adapter( PIA *pi, char * scratch, int verbose ) pi->unit,pi->mode,mode_string[pi->mode],pi->delay); } -static int bpck6_init_proto(PIA *pi) +static int bpck6_init_proto(struct pi_adapter *pi) { Interface *p = kzalloc(sizeof(Interface), GFP_KERNEL); @@ -219,7 +219,7 @@ static int bpck6_init_proto(PIA *pi) return -1; } -static void bpck6_release_proto(PIA *pi) +static void bpck6_release_proto(struct pi_adapter *pi) { kfree((void *)(pi->private)); } diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 908f6c44548b..06c6fa29295b 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -42,7 +42,7 @@ static int cont_map[2] = { 0x08, 0x10 }; -static int comm_read_regr( PIA *pi, int cont, int regr ) +static int comm_read_regr(struct pi_adapter *pi, int cont, int regr) { int l, h, r; @@ -68,7 +68,7 @@ static int comm_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void comm_write_regr( PIA *pi, int cont, int regr, int val ) +static void comm_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -87,7 +87,7 @@ static void comm_write_regr( PIA *pi, int cont, int regr, int val ) } } -static void comm_connect ( PIA *pi ) +static void comm_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -98,14 +98,14 @@ static void comm_connect ( PIA *pi ) w2(4); w0(0xe0); w2(0xc); w2(0xc); w2(4); } -static void comm_disconnect ( PIA *pi ) +static void comm_disconnect(struct pi_adapter *pi) { w2(0); w2(0); w2(0); w2(4); w0(pi->saved_r0); w2(pi->saved_r2); } -static void comm_read_block( PIA *pi, char * buf, int count ) +static void comm_read_block(struct pi_adapter *pi, char *buf, int count) { int i, l, h; @@ -146,7 +146,7 @@ static void comm_read_block( PIA *pi, char * buf, int count ) /* NB: Watch out for the byte swapped writes ! */ -static void comm_write_block( PIA *pi, char * buf, int count ) +static void comm_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -179,7 +179,7 @@ static void comm_write_block( PIA *pi, char * buf, int count ) } } -static void comm_log_adapter( PIA *pi, char * scratch, int verbose ) +static void comm_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 3732e9b79429..8cac71eb9c03 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -44,7 +44,7 @@ static int cont_map[2] = { 0x20, 0x40 }; -static int dstr_read_regr( PIA *pi, int cont, int regr ) +static int dstr_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -71,7 +71,7 @@ static int dstr_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void dstr_write_regr( PIA *pi, int cont, int regr, int val ) +static void dstr_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -98,21 +98,21 @@ static void dstr_write_regr( PIA *pi, int cont, int regr, int val ) w0(0xaa);w0(0x55);w0(0);w0(0xff);w0(0x87);w0(0x78);\ w0(x);w2(5);w2(4); -static void dstr_connect ( PIA *pi ) +static void dstr_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(4); CCP(0xe0); w0(0xff); } -static void dstr_disconnect ( PIA *pi ) +static void dstr_disconnect(struct pi_adapter *pi) { CCP(0x30); w0(pi->saved_r0); w2(pi->saved_r2); } -static void dstr_read_block( PIA *pi, char * buf, int count ) +static void dstr_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b; @@ -154,7 +154,7 @@ static void dstr_read_block( PIA *pi, char * buf, int count ) } } -static void dstr_write_block( PIA *pi, char * buf, int count ) +static void dstr_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -190,7 +190,7 @@ static void dstr_write_block( PIA *pi, char * buf, int count ) } -static void dstr_log_adapter( PIA *pi, char * scratch, int verbose ) +static void dstr_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 59720daa9c19..9276dcb261d8 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -44,7 +44,7 @@ MODULE_PARM_DESC(epatc8, "support for the Shuttle EP1284 chip, " static int cont_map[3] = { 0x18, 0x10, 0 }; -static void epat_write_regr( PIA *pi, int cont, int regr, int val) +static void epat_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -65,7 +65,7 @@ static void epat_write_regr( PIA *pi, int cont, int regr, int val) } } -static int epat_read_regr( PIA *pi, int cont, int regr ) +static int epat_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -94,7 +94,7 @@ static int epat_read_regr( PIA *pi, int cont, int regr ) return -1; /* never gets here */ } -static void epat_read_block( PIA *pi, char * buf, int count ) +static void epat_read_block(struct pi_adapter *pi, char *buf, int count) { int k, ph, a, b; @@ -159,7 +159,7 @@ static void epat_read_block( PIA *pi, char * buf, int count ) } } -static void epat_write_block( PIA *pi, char * buf, int count ) +static void epat_write_block(struct pi_adapter *pi, char *buf, int count) { int ph, k; @@ -210,7 +210,7 @@ static void epat_write_block( PIA *pi, char * buf, int count ) #define CPP(x) w2(4);w0(0x22);w0(0xaa);w0(0x55);w0(0);w0(0xff);\ w0(0x87);w0(0x78);w0(x);w2(4);w2(5);w2(4);w0(0xff); -static void epat_connect ( PIA *pi ) +static void epat_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -242,13 +242,13 @@ static void epat_connect ( PIA *pi ) } } -static void epat_disconnect (PIA *pi) +static void epat_disconnect(struct pi_adapter *pi) { CPP(0x30); w0(pi->saved_r0); w2(pi->saved_r2); } -static int epat_test_proto( PIA *pi, char * scratch, int verbose ) +static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int k, j, f, cc; int e[2] = {0,0}; @@ -287,7 +287,7 @@ static int epat_test_proto( PIA *pi, char * scratch, int verbose ) return (e[0] && e[1]) || f; } -static void epat_log_adapter( PIA *pi, char * scratch, int verbose ) +static void epat_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { int ver; char *mode_string[6] = diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 610269083441..85b1aba995e1 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -46,7 +46,7 @@ static int cont_map[2] = { 0, 0x80 }; -static int epia_read_regr( PIA *pi, int cont, int regr ) +static int epia_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -79,7 +79,7 @@ static int epia_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void epia_write_regr( PIA *pi, int cont, int regr, int val) +static void epia_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -110,7 +110,7 @@ static void epia_write_regr( PIA *pi, int cont, int regr, int val) 2048 byte reads (the last two being used in the CDrom drivers. */ -static void epia_connect ( PIA *pi ) +static void epia_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -124,7 +124,7 @@ static void epia_connect ( PIA *pi ) WR(0x86,8); } -static void epia_disconnect ( PIA *pi ) +static void epia_disconnect(struct pi_adapter *pi) { /* WR(0x84,0x10); */ w0(pi->saved_r0); @@ -133,7 +133,7 @@ static void epia_disconnect ( PIA *pi ) w2(pi->saved_r2); } -static void epia_read_block( PIA *pi, char * buf, int count ) +static void epia_read_block(struct pi_adapter *pi, char *buf, int count) { int k, ph, a, b; @@ -193,7 +193,7 @@ static void epia_read_block( PIA *pi, char * buf, int count ) } } -static void epia_write_block( PIA *pi, char * buf, int count ) +static void epia_write_block(struct pi_adapter *pi, char *buf, int count) { int ph, k, last, d; @@ -234,7 +234,7 @@ static void epia_write_block( PIA *pi, char * buf, int count ) } -static int epia_test_proto( PIA *pi, char * scratch, int verbose ) +static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int j, k, f; int e[2] = {0,0}; @@ -272,7 +272,7 @@ static int epia_test_proto( PIA *pi, char * scratch, int verbose ) } -static void epia_log_adapter( PIA *pi, char * scratch, int verbose ) +static void epia_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 28de8e4e41c3..67e095d6a718 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -37,13 +37,13 @@ devices. */ -static void fit2_write_regr( PIA *pi, int cont, int regr, int val) +static void fit2_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { if (cont == 1) return; w2(0xc); w0(regr); w2(4); w0(val); w2(5); w0(0); w2(4); } -static int fit2_read_regr( PIA *pi, int cont, int regr ) +static int fit2_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -61,7 +61,7 @@ static int fit2_read_regr( PIA *pi, int cont, int regr ) } -static void fit2_read_block( PIA *pi, char * buf, int count ) +static void fit2_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b, c, d; @@ -87,7 +87,7 @@ static void fit2_read_block( PIA *pi, char * buf, int count ) } -static void fit2_write_block( PIA *pi, char * buf, int count ) +static void fit2_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -100,20 +100,20 @@ static void fit2_write_block( PIA *pi, char * buf, int count ) w2(4); } -static void fit2_connect ( PIA *pi ) +static void fit2_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(0xcc); } -static void fit2_disconnect ( PIA *pi ) +static void fit2_disconnect(struct pi_adapter *pi) { w0(pi->saved_r0); w2(pi->saved_r2); } -static void fit2_log_adapter( PIA *pi, char * scratch, int verbose ) +static void fit2_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index 0366f3123508..01e862a94b96 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -39,7 +39,7 @@ */ -static void fit3_write_regr( PIA *pi, int cont, int regr, int val) +static void fit3_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { if (cont == 1) return; @@ -59,7 +59,7 @@ static void fit3_write_regr( PIA *pi, int cont, int regr, int val) } } -static int fit3_read_regr( PIA *pi, int cont, int regr ) +static int fit3_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b; @@ -92,7 +92,7 @@ static int fit3_read_regr( PIA *pi, int cont, int regr ) } -static void fit3_read_block( PIA *pi, char * buf, int count ) +static void fit3_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b, c, d; @@ -131,7 +131,7 @@ static void fit3_read_block( PIA *pi, char * buf, int count ) } } -static void fit3_write_block( PIA *pi, char * buf, int count ) +static void fit3_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -152,7 +152,7 @@ static void fit3_write_block( PIA *pi, char * buf, int count ) } } -static void fit3_connect ( PIA *pi ) +static void fit3_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -162,14 +162,14 @@ static void fit3_connect ( PIA *pi ) } } -static void fit3_disconnect ( PIA *pi ) +static void fit3_disconnect(struct pi_adapter *pi) { w2(0xc); w0(0xa); w2(0x8); w2(0xc); w0(pi->saved_r0); w2(pi->saved_r2); } -static void fit3_log_adapter( PIA *pi, char * scratch, int verbose ) +static void fit3_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 9306a2c78d90..9f8f4e6b1a7c 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -48,7 +48,7 @@ static int cont_map[2] = { 0x08, 0x10 }; -static int friq_read_regr( PIA *pi, int cont, int regr ) +static int friq_read_regr(struct pi_adapter *pi, int cont, int regr) { int h,l,r; @@ -63,7 +63,7 @@ static int friq_read_regr( PIA *pi, int cont, int regr ) } -static void friq_write_regr( PIA *pi, int cont, int regr, int val) +static void friq_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -74,7 +74,7 @@ static void friq_write_regr( PIA *pi, int cont, int regr, int val) w2(5);w2(7);w2(5);w2(4); } -static void friq_read_block_int( PIA *pi, char * buf, int count, int regr ) +static void friq_read_block_int(struct pi_adapter *pi, char *buf, int count, int regr) { int h, l, k, ph; @@ -129,12 +129,12 @@ static void friq_read_block_int( PIA *pi, char * buf, int count, int regr ) } } -static void friq_read_block( PIA *pi, char * buf, int count) +static void friq_read_block(struct pi_adapter *pi, char *buf, int count) { friq_read_block_int(pi,buf,count,0x08); } -static void friq_write_block( PIA *pi, char * buf, int count ) +static void friq_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -166,21 +166,21 @@ static void friq_write_block( PIA *pi, char * buf, int count ) } } -static void friq_connect ( PIA *pi ) +static void friq_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(4); } -static void friq_disconnect ( PIA *pi ) +static void friq_disconnect(struct pi_adapter *pi) { CMD(0x20); w0(pi->saved_r0); w2(pi->saved_r2); } -static int friq_test_proto( PIA *pi, char * scratch, int verbose ) +static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int j, k, r; int e[2] = {0,0}; @@ -216,7 +216,7 @@ static int friq_test_proto( PIA *pi, char * scratch, int verbose ) } -static void friq_log_adapter( PIA *pi, char * scratch, int verbose ) +static void friq_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; @@ -233,7 +233,7 @@ static void friq_log_adapter( PIA *pi, char * scratch, int verbose ) } -static void friq_release_proto( PIA *pi) +static void friq_release_proto(struct pi_adapter *pi) { if (pi->private) { /* turn off the power */ friq_connect(pi); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 63f2165fec63..e93570190dab 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -44,7 +44,7 @@ static int cont_map[2] = { 0x08, 0x10 }; -static int frpw_read_regr( PIA *pi, int cont, int regr ) +static int frpw_read_regr(struct pi_adapter *pi, int cont, int regr) { int h,l,r; @@ -60,7 +60,7 @@ static int frpw_read_regr( PIA *pi, int cont, int regr ) } -static void frpw_write_regr( PIA *pi, int cont, int regr, int val) +static void frpw_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -71,7 +71,7 @@ static void frpw_write_regr( PIA *pi, int cont, int regr, int val) w2(5);w2(7);w2(5);w2(4); } -static void frpw_read_block_int( PIA *pi, char * buf, int count, int regr ) +static void frpw_read_block_int(struct pi_adapter *pi, char *buf, int count, int regr) { int h, l, k, ph; @@ -132,12 +132,12 @@ static void frpw_read_block_int( PIA *pi, char * buf, int count, int regr ) } } -static void frpw_read_block( PIA *pi, char * buf, int count) +static void frpw_read_block(struct pi_adapter *pi, char *buf, int count) { frpw_read_block_int(pi,buf,count,0x08); } -static void frpw_write_block( PIA *pi, char * buf, int count ) +static void frpw_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -170,14 +170,14 @@ static void frpw_write_block( PIA *pi, char * buf, int count ) } } -static void frpw_connect ( PIA *pi ) +static void frpw_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(4); } -static void frpw_disconnect ( PIA *pi ) +static void frpw_disconnect(struct pi_adapter *pi) { w2(4); w0(0x20); cec4; w0(pi->saved_r0); @@ -188,7 +188,7 @@ static void frpw_disconnect ( PIA *pi ) between the Xilinx and ASIC implementations of the Freecom adapter. */ -static int frpw_test_pnp ( PIA *pi ) +static int frpw_test_pnp(struct pi_adapter *pi) /* returns chip_type: 0 = Xilinx, 1 = ASIC */ @@ -221,7 +221,7 @@ static int frpw_test_pnp ( PIA *pi ) a hack :-( */ -static int frpw_test_proto( PIA *pi, char * scratch, int verbose ) +static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int j, k, r; int e[2] = {0,0}; @@ -267,7 +267,7 @@ static int frpw_test_proto( PIA *pi, char * scratch, int verbose ) } -static void frpw_log_adapter( PIA *pi, char * scratch, int verbose ) +static void frpw_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 9a99b9e35d41..fffb79054144 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -42,7 +42,7 @@ static int cont_map[2] = { 0x80, 0x40 }; -static int kbic_read_regr( PIA *pi, int cont, int regr ) +static int kbic_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, s; @@ -72,7 +72,7 @@ static int kbic_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void kbic_write_regr( PIA *pi, int cont, int regr, int val) +static void kbic_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int s; @@ -96,14 +96,14 @@ static void kbic_write_regr( PIA *pi, int cont, int regr, int val) } } -static void k951_connect ( PIA *pi ) +static void k951_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(4); } -static void k951_disconnect ( PIA *pi ) +static void k951_disconnect(struct pi_adapter *pi) { w0(pi->saved_r0); w2(pi->saved_r2); @@ -112,7 +112,7 @@ static void k951_disconnect ( PIA *pi ) #define CCP(x) w2(0xc4);w0(0xaa);w0(0x55);w0(0);w0(0xff);w0(0x87);\ w0(0x78);w0(x);w2(0xc5);w2(0xc4);w0(0xff); -static void k971_connect ( PIA *pi ) +static void k971_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -120,7 +120,7 @@ static void k971_connect ( PIA *pi ) w2(4); } -static void k971_disconnect ( PIA *pi ) +static void k971_disconnect(struct pi_adapter *pi) { CCP(0x30); w0(pi->saved_r0); @@ -131,7 +131,7 @@ static void k971_disconnect ( PIA *pi ) have this property. */ -static void kbic_read_block( PIA *pi, char * buf, int count ) +static void kbic_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b; @@ -189,7 +189,7 @@ static void kbic_read_block( PIA *pi, char * buf, int count ) } } -static void kbic_write_block( PIA *pi, char * buf, int count ) +static void kbic_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -229,8 +229,8 @@ static void kbic_write_block( PIA *pi, char * buf, int count ) } -static void kbic_log_adapter( PIA *pi, char * scratch, - int verbose, char * chip ) +static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, + int verbose, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; @@ -241,12 +241,12 @@ static void kbic_log_adapter( PIA *pi, char * scratch, } -static void k951_log_adapter( PIA *pi, char * scratch, int verbose ) +static void k951_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { kbic_log_adapter(pi,scratch,verbose,"KBIC-951A"); } -static void k971_log_adapter( PIA *pi, char * scratch, int verbose ) +static void k971_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { kbic_log_adapter(pi,scratch,verbose,"KBIC-971A"); } diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index d87eb3c139bc..ffb2af0ce045 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -29,7 +29,7 @@ static int cont_map[2] = { 0x10, 0x08 }; -static void ktti_write_regr( PIA *pi, int cont, int regr, int val) +static void ktti_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -39,7 +39,7 @@ static void ktti_write_regr( PIA *pi, int cont, int regr, int val) w0(val); w2(3); w0(0); w2(6); w2(0xb); } -static int ktti_read_regr( PIA *pi, int cont, int regr ) +static int ktti_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -51,7 +51,7 @@ static int ktti_read_regr( PIA *pi, int cont, int regr ) } -static void ktti_read_block( PIA *pi, char * buf, int count ) +static void ktti_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b; @@ -64,7 +64,7 @@ static void ktti_read_block( PIA *pi, char * buf, int count ) } } -static void ktti_write_block( PIA *pi, char * buf, int count ) +static void ktti_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -76,21 +76,21 @@ static void ktti_write_block( PIA *pi, char * buf, int count ) } } -static void ktti_connect ( PIA *pi ) +static void ktti_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(0xb); w2(0xa); w0(0); w2(3); w2(6); } -static void ktti_disconnect ( PIA *pi ) +static void ktti_disconnect(struct pi_adapter *pi) { w2(0xb); w2(0xa); w0(0xa0); w2(3); w2(4); w0(pi->saved_r0); w2(pi->saved_r2); } -static void ktti_log_adapter( PIA *pi, char * scratch, int verbose ) +static void ktti_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { printk("ktti %s, KT adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 0a1e60e20656..fb3399329fb6 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -33,7 +33,7 @@ cont = 1 - access the IDE command set */ -static int on20_read_regr( PIA *pi, int cont, int regr ) +static int on20_read_regr(struct pi_adapter *pi, int cont, int regr) { int h,l, r ; @@ -56,7 +56,7 @@ static int on20_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void on20_write_regr( PIA *pi, int cont, int regr, int val ) +static void on20_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -67,7 +67,7 @@ static void on20_write_regr( PIA *pi, int cont, int regr, int val ) op(0); vl(val); } -static void on20_connect ( PIA *pi) +static void on20_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -77,14 +77,14 @@ static void on20_connect ( PIA *pi) else { op(2); vl(0); op(2); vl(8); } } -static void on20_disconnect ( PIA *pi ) +static void on20_disconnect(struct pi_adapter *pi) { w2(4);w0(7);w2(4);w2(0xc);w2(4); w0(pi->saved_r0); w2(pi->saved_r2); } -static void on20_read_block( PIA *pi, char * buf, int count ) +static void on20_read_block(struct pi_adapter *pi, char *buf, int count) { int k, l, h; @@ -101,7 +101,7 @@ static void on20_read_block( PIA *pi, char * buf, int count ) w2(4); } -static void on20_write_block( PIA *pi, char * buf, int count ) +static void on20_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -111,7 +111,7 @@ static void on20_write_block( PIA *pi, char * buf, int count ) w2(4); } -static void on20_log_adapter( PIA *pi, char * scratch, int verbose ) +static void on20_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index ceb5018caeec..7e5fc499fcc5 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -44,7 +44,7 @@ cont = 1 - access the IDE command set */ -static int on26_read_regr( PIA *pi, int cont, int regr ) +static int on26_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -73,7 +73,7 @@ static int on26_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void on26_write_regr( PIA *pi, int cont, int regr, int val ) +static void on26_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -99,7 +99,7 @@ static void on26_write_regr( PIA *pi, int cont, int regr, int val ) #define CCP(x) w0(0xfe);w0(0xaa);w0(0x55);w0(0);w0(0xff);\ w0(0x87);w0(0x78);w0(x);w2(4);w2(5);w2(4);w0(0xff); -static void on26_connect ( PIA *pi ) +static void on26_connect(struct pi_adapter *pi) { int x; @@ -113,7 +113,7 @@ static void on26_connect ( PIA *pi ) w0(2); P1; w0(x); P2; } -static void on26_disconnect ( PIA *pi ) +static void on26_disconnect(struct pi_adapter *pi) { if (pi->mode >= 2) { w3(4); w3(4); w3(4); w3(4); } else { w0(4); P1; w0(4); P1; } @@ -124,7 +124,7 @@ static void on26_disconnect ( PIA *pi ) #define RESET_WAIT 200 -static int on26_test_port( PIA *pi) /* hard reset */ +static int on26_test_port(struct pi_adapter *pi) /* hard reset */ { int i, m, d, x=0, y=0; @@ -183,7 +183,7 @@ static int on26_test_port( PIA *pi) /* hard reset */ } -static void on26_read_block( PIA *pi, char * buf, int count ) +static void on26_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b; @@ -232,7 +232,7 @@ static void on26_read_block( PIA *pi, char * buf, int count ) } } -static void on26_write_block( PIA *pi, char * buf, int count ) +static void on26_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -275,7 +275,7 @@ static void on26_write_block( PIA *pi, char * buf, int count ) } -static void on26_log_adapter( PIA *pi, char * scratch, int verbose ) +static void on26_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index dcab769aa639..381b4d0e3574 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -24,8 +24,6 @@ struct pi_adapter { struct pardevice *pardev; /* pointer to pardevice */ }; -typedef struct pi_adapter PIA; /* for paride protocol modules */ - /* registers are addressed as (cont,regr) * cont: 0 for command register file, 1 for control register(s) * regr: 0-7 for register number. From patchwork Wed Feb 15 19:45:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57694 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383998wrn; Wed, 15 Feb 2023 11:47:25 -0800 (PST) X-Google-Smtp-Source: AK7set8fM3sZIOR+jflAPADK95F47sBYS5FDosxpWfbfa1WIye2BW0z7tZhZhWrwRRfltkftwQuQ X-Received: by 2002:a17:902:d152:b0:19a:a9d8:e489 with SMTP id t18-20020a170902d15200b0019aa9d8e489mr2772544plt.18.1676490445306; Wed, 15 Feb 2023 11:47:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490445; cv=none; d=google.com; s=arc-20160816; b=mCBKelylNKuS+Z1DNxQcIWvscQp/IRADci5cqhmT40c8IFb0LuydVuMOUmj6TEq4Hx vNT68FN5bsznYoxa9jiqtEO3CeXWl7/jq7vCv+9nfZsKvLJqdyNdLS5qMAuTlyXk2vFn CnMC9mXZ4/y4IVYjPsKtwwWX/KshGFung5Xcz9PBcckCskeE5PYzFXNPyhgmv2JYVh4/ ctReoewWN+keWhHJ5AZDynzOkbOcL+FUs7ePOxrN6pd2izPEQ4d1dnzqjKfp6RANReYD 6zxE/F5fmZPDhRwGDV4cMhg1WQzRQUuf/zZsqnDXPH2gdi8GVZt0Rlr/gT1dEDt9a3M+ Tn6A== 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=tjle7aCzLPGcZBOU5+rgi448S7VGlfsTUS/fQJrxBe0=; b=wqu+nCW0OaDNGL7XBONdD5awIrA60qhT2nLH+hpJ5gDNF9IFkSfgLNdvoqoLBrpNO0 tDrRnas+HgE6oVYQO2gQV8xPDi40MDRv10XnWTHgjIUeOLkLmVvBhwEdP73ZFPmaQvG1 sN0zo5zn+ogipO17SrUDojpttg7Y03zzT44lqdRoDMNL/thd9TTdyq2N8Bp7QWfGylzL 5/LvNUsn0/FIpYt89sOygHpWUZDL4EH7/m6jay1tMQorqWp+hKjGFj/IjJB/MEZeRAfN BvETiAuvRoXfxtmYX422XyVbiSQ5tnL64SFdWOxEl75BwcEf4M/UeMg0dliXZMVZJiGR kBiw== 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 i8-20020a63a848000000b004e13a7b5036si17475829pgp.755.2023.02.15.11.47.12; Wed, 15 Feb 2023 11:47:25 -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 S229903AbjBOTqp (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbjBOTqV (ORCPT ); Wed, 15 Feb 2023 14:46:21 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3FB5F410B9; 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 20BB87A06F6; 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 09/18] pata_parport: remove verbose parameter from log_adapter() Date: Wed, 15 Feb 2023 20:45:45 +0100 Message-Id: <20230215194554.25632-10-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?1757927644876095794?= X-GMAIL-MSGID: =?utf-8?q?1757927644876095794?= verbose parameter of log_adapter() is unused, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 2 +- drivers/ata/pata_parport/bpck.c | 4 +--- drivers/ata/pata_parport/bpck6.c | 2 +- drivers/ata/pata_parport/comm.c | 2 +- drivers/ata/pata_parport/dstr.c | 2 +- drivers/ata/pata_parport/epat.c | 2 +- drivers/ata/pata_parport/epia.c | 2 +- drivers/ata/pata_parport/fit2.c | 2 +- drivers/ata/pata_parport/fit3.c | 2 +- drivers/ata/pata_parport/friq.c | 2 +- drivers/ata/pata_parport/frpw.c | 2 +- drivers/ata/pata_parport/kbic.c | 15 +++++++-------- drivers/ata/pata_parport/ktti.c | 2 +- drivers/ata/pata_parport/on20.c | 2 +- drivers/ata/pata_parport/on26.c | 2 +- drivers/ata/pata_parport/pata_parport.c | 2 +- include/linux/pata_parport.h | 2 +- 17 files changed, 23 insertions(+), 26 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 4579e554fbad..0a98954f380f 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -120,7 +120,7 @@ static void aten_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void aten_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void aten_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 46805c584730..1a3e3d5b1b25 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -416,7 +416,7 @@ static int bpck_test_port(struct pi_adapter *pi) /* check for 8-bit port */ return 5; } -static void bpck_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void bpck_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5] = { "4-bit","8-bit","EPP-8", "EPP-16","EPP-32" }; @@ -428,13 +428,11 @@ static void bpck_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) bpck_read_eeprom(pi,scratch); #ifdef DUMP_EEPROM - if (verbose) { for(i=0;i<128;i++) if ((scratch[i] < ' ') || (scratch[i] > '~')) scratch[i] = '.'; printk("bpck EEPROM: %64.64s\n", scratch); printk(" %64.64s\n", &scratch[64]); - } #endif printk("bpck %s, backpack %8.8s unit %d", diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 8ed3cf3b627e..68f7fdcab9be 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -195,7 +195,7 @@ static int bpck6_probe_unit(struct pi_adapter *pi) } } -static void bpck6_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void bpck6_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 06c6fa29295b..69a66658aa29 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -179,7 +179,7 @@ static void comm_write_block(struct pi_adapter *pi, char *buf, int count) } } -static void comm_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void comm_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 8cac71eb9c03..17b1a7cb0a15 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -190,7 +190,7 @@ static void dstr_write_block(struct pi_adapter *pi, char *buf, int count) } -static void dstr_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void dstr_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 9276dcb261d8..b125df16f160 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -287,7 +287,7 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) return (e[0] && e[1]) || f; } -static void epat_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void epat_log_adapter(struct pi_adapter *pi, char *scratch) { int ver; char *mode_string[6] = diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 85b1aba995e1..452d3a8e17af 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -272,7 +272,7 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void epia_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void epia_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 67e095d6a718..632c51af84d7 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -113,7 +113,7 @@ static void fit2_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void fit2_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void fit2_log_adapter(struct pi_adapter *pi, char *scratch) { printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index 01e862a94b96..bdf90cb536c2 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -169,7 +169,7 @@ static void fit3_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void fit3_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void fit3_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 9f8f4e6b1a7c..ee922b40bc95 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -216,7 +216,7 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void friq_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void friq_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index e93570190dab..f17e0a4f66c2 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -267,7 +267,7 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void frpw_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void frpw_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index fffb79054144..3718441f60aa 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -229,8 +229,7 @@ static void kbic_write_block(struct pi_adapter *pi, char *buf, int count) } -static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, - int verbose, char *chip) +static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; @@ -241,14 +240,14 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, } -static void k951_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) - -{ kbic_log_adapter(pi,scratch,verbose,"KBIC-951A"); +static void k951_log_adapter(struct pi_adapter *pi, char *scratch) +{ + kbic_log_adapter(pi, scratch, "KBIC-951A"); } -static void k971_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) - -{ kbic_log_adapter(pi,scratch,verbose,"KBIC-971A"); +static void k971_log_adapter(struct pi_adapter *pi, char *scratch) +{ + kbic_log_adapter(pi, scratch, "KBIC-971A"); } static struct pi_protocol k951 = { diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index ffb2af0ce045..ad7f0314f962 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -90,7 +90,7 @@ static void ktti_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void ktti_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void ktti_log_adapter(struct pi_adapter *pi, char *scratch) { printk("ktti %s, KT adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index fb3399329fb6..12a423f61996 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -111,7 +111,7 @@ static void on20_write_block(struct pi_adapter *pi, char *buf, int count) w2(4); } -static void on20_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void on20_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 7e5fc499fcc5..ee5a0cc74900 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -275,7 +275,7 @@ static void on26_write_block(struct pi_adapter *pi, char *buf, int count) } -static void on26_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void on26_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 49e99c9465fd..5aa0f05590fb 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -474,7 +474,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport, goto out_unreg_parport; } - pi->proto->log_adapter(pi, scratch, 1); + pi->proto->log_adapter(pi, scratch); host = ata_host_alloc_pinfo(&pi->pardev->dev, ppi, 1); if (!host) diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 381b4d0e3574..033cabede51c 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -68,7 +68,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); int (*test_proto)(struct pi_adapter *pi, char *scratch, int verbose); - void (*log_adapter)(struct pi_adapter *pi, char *scratch, int verbose); + void (*log_adapter)(struct pi_adapter *pi, char *scratch); int (*init_proto)(struct pi_adapter *pi); void (*release_proto)(struct pi_adapter *pi); From patchwork Wed Feb 15 19:45:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57688 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383824wrn; Wed, 15 Feb 2023 11:47:07 -0800 (PST) X-Google-Smtp-Source: AK7set/UedGeRcvtlaalF94frVlc5n6YXCxXMarpxVlaTOr8LM8icVGORz49ztuhpKj9OD3LxqRl X-Received: by 2002:a05:6a20:1aa7:b0:b5:389e:870e with SMTP id ci39-20020a056a201aa700b000b5389e870emr2288331pzb.4.1676490427532; Wed, 15 Feb 2023 11:47:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490427; cv=none; d=google.com; s=arc-20160816; b=u0hHQXWHWcfCe7UMwTP/7WvUHEBPsxj/lno3BNoJ4kZMWLBwhF3XV6DGYFUNqNZUgp Z3Q6vcX96LoqsESAfrRquDia0h43cEJyWRy5U2OTIDLPodO0BjMrhe/V+s9o6GO+5hWA fwfpfcoWAvWsVc6VRzy6P3Rtr/9oytt50VbU3A1CG9rwRi21P4XtXEf1oNzdSNCIAKRI FL1BpGcUjD805iLh8HySuYSfL8n7vRcY3OWvDqRiEt2aXdKqbd/x8UmLzkLE2SkErnqN 4qQnahHfj29knT1obcxkxujIvWu9AiUMx/rgOkoysd6IUtROEevJVrExdDKGuI67t0gR WT2A== 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=XqzYFjIUS4nXkAAgj/BCoK0nWI+7+sKLfN9wzGUnRqM=; b=0NyTF5XKG5A8wxm/iSJQ3vLUfQ2n7JjFjCzyb1zj5Hx9jBYxa2bf4o3ERDd9xGE8L7 6pPGNhTDFduMAgl1xOodjGJ/A1oxWka3Gtq0l874LjJOL9eqh905GiEDQX+a+pgDyIU7 cPLYIG/GfFAll860lQdVIgHFn81KyHDhq8Ryzl2QGq5aWexYx8shNQ85xih9KzCkddWC 7Wy2/szPL2Dbg82Km0LbQlglyanufTFj7MKCONyom4l7AIA0T8w9VvohpGpfOPC6efvY 0rOG2Ab3GX9SvNQMLUH064hJNPbkSlU9GldOTiCcfYqta5/Z/G8q6tgI9u2hLV/OG2Tu AW+g== 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 q16-20020a170902dad000b00194c90ca330si20255900plx.335.2023.02.15.11.46.54; Wed, 15 Feb 2023 11:47:07 -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 S229561AbjBOTqa (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbjBOTqT (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 1C7473E615; 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 559057A06F8; 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 10/18] pata_parport: remove scratch parameter from log_adapter() Date: Wed, 15 Feb 2023 20:45:46 +0100 Message-Id: <20230215194554.25632-11-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?1757927626702462713?= X-GMAIL-MSGID: =?utf-8?q?1757927626702462713?= scratch parameter of log_adapter() is only used by bpck driver. Remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 2 +- drivers/ata/pata_parport/bpck.c | 4 ++-- drivers/ata/pata_parport/bpck6.c | 2 +- drivers/ata/pata_parport/comm.c | 2 +- drivers/ata/pata_parport/dstr.c | 2 +- drivers/ata/pata_parport/epat.c | 2 +- drivers/ata/pata_parport/epia.c | 2 +- drivers/ata/pata_parport/fit2.c | 2 +- drivers/ata/pata_parport/fit3.c | 2 +- drivers/ata/pata_parport/friq.c | 2 +- drivers/ata/pata_parport/frpw.c | 2 +- drivers/ata/pata_parport/kbic.c | 10 +++++----- drivers/ata/pata_parport/ktti.c | 2 +- drivers/ata/pata_parport/on20.c | 2 +- drivers/ata/pata_parport/on26.c | 2 +- drivers/ata/pata_parport/pata_parport.c | 2 +- include/linux/pata_parport.h | 2 +- 17 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 0a98954f380f..3f5c50c2c43a 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -120,7 +120,7 @@ static void aten_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void aten_log_adapter(struct pi_adapter *pi, char *scratch) +static void aten_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 1a3e3d5b1b25..f475a25769f0 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -416,11 +416,11 @@ static int bpck_test_port(struct pi_adapter *pi) /* check for 8-bit port */ return 5; } -static void bpck_log_adapter(struct pi_adapter *pi, char *scratch) +static void bpck_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = { "4-bit","8-bit","EPP-8", "EPP-16","EPP-32" }; - + char scratch[128]; #ifdef DUMP_EEPROM int i; #endif diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 68f7fdcab9be..41395a97d77c 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -195,7 +195,7 @@ static int bpck6_probe_unit(struct pi_adapter *pi) } } -static void bpck6_log_adapter(struct pi_adapter *pi, char *scratch) +static void bpck6_log_adapter(struct pi_adapter *pi) { char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 69a66658aa29..88476072b708 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -179,7 +179,7 @@ static void comm_write_block(struct pi_adapter *pi, char *buf, int count) } } -static void comm_log_adapter(struct pi_adapter *pi, char *scratch) +static void comm_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 17b1a7cb0a15..a8b238828061 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -190,7 +190,7 @@ static void dstr_write_block(struct pi_adapter *pi, char *buf, int count) } -static void dstr_log_adapter(struct pi_adapter *pi, char *scratch) +static void dstr_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index b125df16f160..a30313a2c3d7 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -287,7 +287,7 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) return (e[0] && e[1]) || f; } -static void epat_log_adapter(struct pi_adapter *pi, char *scratch) +static void epat_log_adapter(struct pi_adapter *pi) { int ver; char *mode_string[6] = diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 452d3a8e17af..ece7862dc058 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -272,7 +272,7 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void epia_log_adapter(struct pi_adapter *pi, char *scratch) +static void epia_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 632c51af84d7..056e92d8e015 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -113,7 +113,7 @@ static void fit2_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void fit2_log_adapter(struct pi_adapter *pi, char *scratch) +static void fit2_log_adapter(struct pi_adapter *pi) { printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index bdf90cb536c2..fa37f7f17fb2 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -169,7 +169,7 @@ static void fit3_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void fit3_log_adapter(struct pi_adapter *pi, char *scratch) +static void fit3_log_adapter(struct pi_adapter *pi) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index ee922b40bc95..bf597ee520b7 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -216,7 +216,7 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void friq_log_adapter(struct pi_adapter *pi, char *scratch) +static void friq_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index f17e0a4f66c2..9b8db1122154 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -267,7 +267,7 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void frpw_log_adapter(struct pi_adapter *pi, char *scratch) +static void frpw_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 3718441f60aa..b23632c1da39 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -229,7 +229,7 @@ static void kbic_write_block(struct pi_adapter *pi, char *buf, int count) } -static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, char *chip) +static void kbic_log_adapter(struct pi_adapter *pi, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; @@ -240,14 +240,14 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, char *chip) } -static void k951_log_adapter(struct pi_adapter *pi, char *scratch) +static void k951_log_adapter(struct pi_adapter *pi) { - kbic_log_adapter(pi, scratch, "KBIC-951A"); + kbic_log_adapter(pi, "KBIC-951A"); } -static void k971_log_adapter(struct pi_adapter *pi, char *scratch) +static void k971_log_adapter(struct pi_adapter *pi) { - kbic_log_adapter(pi, scratch, "KBIC-971A"); + kbic_log_adapter(pi, "KBIC-971A"); } static struct pi_protocol k951 = { diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index ad7f0314f962..62b0692d1b94 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -90,7 +90,7 @@ static void ktti_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void ktti_log_adapter(struct pi_adapter *pi, char *scratch) +static void ktti_log_adapter(struct pi_adapter *pi) { printk("ktti %s, KT adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 12a423f61996..a3b0708aed71 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -111,7 +111,7 @@ static void on20_write_block(struct pi_adapter *pi, char *buf, int count) w2(4); } -static void on20_log_adapter(struct pi_adapter *pi, char *scratch) +static void on20_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index ee5a0cc74900..8dc8296d50e6 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -275,7 +275,7 @@ static void on26_write_block(struct pi_adapter *pi, char *buf, int count) } -static void on26_log_adapter(struct pi_adapter *pi, char *scratch) +static void on26_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 5aa0f05590fb..f42a2cafc382 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -474,7 +474,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport, goto out_unreg_parport; } - pi->proto->log_adapter(pi, scratch); + pi->proto->log_adapter(pi); host = ata_host_alloc_pinfo(&pi->pardev->dev, ppi, 1); if (!host) diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 033cabede51c..c44d30b3e886 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -68,7 +68,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); int (*test_proto)(struct pi_adapter *pi, char *scratch, int verbose); - void (*log_adapter)(struct pi_adapter *pi, char *scratch); + void (*log_adapter)(struct pi_adapter *pi); int (*init_proto)(struct pi_adapter *pi); void (*release_proto)(struct pi_adapter *pi); From patchwork Wed Feb 15 19:45:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57693 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383945wrn; Wed, 15 Feb 2023 11:47:20 -0800 (PST) X-Google-Smtp-Source: AK7set9Ix5urNfFXEek2BSQiI38fXRvKL5nQekAPHbzXxV/7QqvXmIfIMhQSktrTf6qei1F31HPu X-Received: by 2002:a05:6a20:1452:b0:bc:e98a:8ae with SMTP id a18-20020a056a20145200b000bce98a08aemr3842120pzi.59.1676490440478; Wed, 15 Feb 2023 11:47:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490440; cv=none; d=google.com; s=arc-20160816; b=vPMSW2gUFbldT54DzTUXUwkYr/W18h5py3Ygb2W0jRhGYYyX9uyVTTsAyU7kphHhuj 9CdTubBUh2++dUrDebLuUyCojE9zU0ZYxKx8Sv0oQVjpCSaSu8N/wgiFyJ0rveZiVqOL xuSnb+yAAh1ux2MspmZ423hVMPrzQ6JzGhA12PxgNbTwHhU5W0QAIcm+PiZ3RnjybU8O JbYKLuCMLU0upyz6FsIJqXRIUnE9cPkc1c60ASmN+pYcCrykAtu54oehpv1lwX/bk0rG dbTSLaJdJftAidpqRNhPDG8EcISiWvPBwVgrgW4n+yQsa0SUoFucEXPoYHxdj3BTWVFZ QV4A== 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=eFhHTSWVhUdm3SrL88K2vWzfRia6ZZXFgHPqFpnwnK0=; b=PqEVlBZIpLcMRkLDsADXUzUXV+D3RYhXLO/GnGVkHRSu4j7q8T9rudHCYfT6GO8Rxm mQcmYXPXHC4d8LtiFg0NADUWcLU2l+OJyGujbHTHTwJLCpVV2WSFBdLHe/IyP9IMdXsJ JUc2+QijWdo240iUpw3vLL2S2RUdapI5Pf73IOUQzp74hjwpMqXOUnaCtnokeBlW2adW +RcPoys9gZbgI2cxdAtLKv8jtdDQ6M3b/3BRFcNICLKkABe2rC27/YKzqj3b9Q42rV9u jgWqNt5Uyg2fqN6Yh7fyIV3iVkTubgw0MTqb5Ca0Bv6O3mOY+9VuTtnU3Wx2318uiEt5 YbZw== 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 o8-20020a656a48000000b004da3b29e1cdsi19655435pgu.116.2023.02.15.11.47.08; Wed, 15 Feb 2023 11:47:20 -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 S229887AbjBOTqm (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbjBOTqU (ORCPT ); Wed, 15 Feb 2023 14:46:20 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C86841097; 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 8310D7A06FE; 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 11/18] pata_parport: use dev_* instead of printk Date: Wed, 15 Feb 2023 20:45:47 +0100 Message-Id: <20230215194554.25632-12-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?1757927640092707558?= X-GMAIL-MSGID: =?utf-8?q?1757927640092707558?= Use dev_info/dev_err/dev_dbg instead of printk. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/aten.c | 4 +-- drivers/ata/pata_parport/bpck.c | 4 +-- drivers/ata/pata_parport/bpck6.c | 45 +++++++++----------------------- drivers/ata/pata_parport/comm.c | 4 +-- drivers/ata/pata_parport/dstr.c | 4 +-- drivers/ata/pata_parport/epat.c | 10 +++---- drivers/ata/pata_parport/epia.c | 10 +++---- drivers/ata/pata_parport/fit2.c | 2 +- drivers/ata/pata_parport/fit3.c | 2 +- drivers/ata/pata_parport/friq.c | 10 +++---- drivers/ata/pata_parport/frpw.c | 16 +++++------- drivers/ata/pata_parport/kbic.c | 4 +-- drivers/ata/pata_parport/ktti.c | 2 +- drivers/ata/pata_parport/on20.c | 4 +-- drivers/ata/pata_parport/on26.c | 6 ++--- 15 files changed, 48 insertions(+), 79 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 3f5c50c2c43a..ccbba14ccab1 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -124,8 +124,8 @@ static void aten_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - printk("aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index f475a25769f0..1cba098b4b82 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -435,9 +435,9 @@ static void bpck_log_adapter(struct pi_adapter *pi) printk(" %64.64s\n", &scratch[64]); #endif - printk("bpck %s, backpack %8.8s unit %d", + dev_info(&pi->dev, "bpck %s, backpack %8.8s unit %d", BPCK_VERSION, &scratch[110], pi->unit); - printk(" at 0x%x, mode %d (%s), delay %d\n",pi->port, + dev_info(&pi->dev, " at 0x%x, mode %d (%s), delay %d\n", pi->port, pi->mode,mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 41395a97d77c..4770e29bfdeb 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -90,10 +90,7 @@ static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len) static void bpck6_connect(struct pi_adapter *pi) { - if(verbose) - { - printk(KERN_DEBUG "connect\n"); - } + dev_dbg(&pi->dev, "connect\n"); if(pi->mode >=2) { @@ -114,22 +111,16 @@ static void bpck6_connect(struct pi_adapter *pi) static void bpck6_disconnect(struct pi_adapter *pi) { - if(verbose) - { - printk("disconnect\n"); - } + dev_dbg(&pi->dev, "disconnect\n"); ppc6_wr_extout(PPCSTRUCT(pi),0x0); ppc6_close(PPCSTRUCT(pi)); } static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */ { - if(verbose) - { - printk(KERN_DEBUG "PARPORT indicates modes=%x for lp=0x%lx\n", - ((struct pardevice*)(pi->pardev))->port->modes, - ((struct pardevice *)(pi->pardev))->port->base); - } + dev_dbg(&pi->dev, "PARPORT indicates modes=%x for lp=0x%lx\n", + ((struct pardevice *)(pi->pardev))->port->modes, + ((struct pardevice *)(pi->pardev))->port->base); /*copy over duplicate stuff.. initialize state info*/ PPCSTRUCT(pi)->ppc_id=pi->unit; @@ -158,10 +149,7 @@ static int bpck6_probe_unit(struct pi_adapter *pi) { int out; - if(verbose) - { - printk(KERN_DEBUG "PROBE UNIT %x on port:%x\n",pi->unit,pi->port); - } + dev_dbg(&pi->dev, "PROBE UNIT %x on port:%x\n", pi->unit, pi->port); /*SET PPC UNIT NUMBER*/ PPCSTRUCT(pi)->ppc_id=pi->unit; @@ -171,26 +159,17 @@ static int bpck6_probe_unit(struct pi_adapter *pi) out=ppc6_open(PPCSTRUCT(pi)); - if(verbose) - { - printk(KERN_DEBUG "ppc_open returned %2x\n",out); - } + dev_dbg(&pi->dev, "ppc_open returned %2x\n", out); if(out) { ppc6_close(PPCSTRUCT(pi)); - if(verbose) - { - printk(KERN_DEBUG "leaving probe\n"); - } + dev_dbg(&pi->dev, "leaving probe\n"); return(1); } else { - if(verbose) - { - printk(KERN_DEBUG "Failed open\n"); - } + dev_dbg(&pi->dev, "Failed open\n"); return(0); } } @@ -200,9 +179,9 @@ static void bpck6_log_adapter(struct pi_adapter *pi) char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - printk("BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", + dev_info(&pi->dev, "BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", BACKPACK_VERSION, pi->port); - printk("Unit: %d Mode:%d (%s) Delay %d\n", + dev_info(&pi->dev, "Unit: %d Mode:%d (%s) Delay %d\n", pi->unit,pi->mode,mode_string[pi->mode],pi->delay); } @@ -215,7 +194,7 @@ static int bpck6_init_proto(struct pi_adapter *pi) return 0; } - printk(KERN_ERR "ERROR COULDN'T ALLOCATE MEMORY\n"); + dev_err(&pi->dev, "ERROR COULDN'T ALLOCATE MEMORY\n"); return -1; } diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 88476072b708..7b59eca52185 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -183,8 +183,8 @@ static void comm_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - printk("comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index a8b238828061..eb6ddceaeb83 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -195,8 +195,8 @@ static void dstr_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - printk("dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index a30313a2c3d7..389faa6ae49d 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -279,10 +279,8 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } epat_disconnect(pi); - if (verbose) { - printk("epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", - pi->port, pi->mode, cc, e[0], e[1], f); - } + 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); return (e[0] && e[1]) || f; } @@ -298,9 +296,9 @@ static void epat_log_adapter(struct pi_adapter *pi) ver = RR(0xb); epat_disconnect(pi); - printk("epat %s, Shuttle EPAT chip %x at 0x%x, ", + dev_info(&pi->dev, "epat %s, Shuttle EPAT chip %x at 0x%x, ", EPAT_VERSION, ver, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index ece7862dc058..48d12f56c501 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -262,10 +262,8 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) WR(0x84,0); epia_disconnect(pi); - if (verbose) { - printk("epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->port, pi->mode, e[0], e[1], f); - } + dev_dbg(&pi->dev, "epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", + pi->port, pi->mode, e[0], e[1], f); return (e[0] && e[1]) || f; @@ -277,8 +275,8 @@ static void epia_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; - printk("epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 056e92d8e015..d0a781f04411 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -116,7 +116,7 @@ static void fit2_disconnect(struct pi_adapter *pi) static void fit2_log_adapter(struct pi_adapter *pi) { - printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", + dev_info(&pi->dev, "fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", FIT2_VERSION, pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index fa37f7f17fb2..f86da2d478cb 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -173,7 +173,7 @@ static void fit3_log_adapter(struct pi_adapter *pi) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; - printk("fit3 %s, FIT 3000 adapter at 0x%x, " + dev_info(&pi->dev, "fit3 %s, FIT 3000 adapter at 0x%x, " "mode %d (%s), delay %d\n", FIT3_VERSION, pi->port, pi->mode,mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index bf597ee520b7..ec564e7cb930 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -207,10 +207,8 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) for (k=0;k<128;k++) if (scratch[k] != k) r++; friq_disconnect(pi); - if (verbose) { - printk("friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->port, pi->mode, e[0], e[1], r); - } + dev_dbg(&pi->dev, "friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", + pi->port, pi->mode, e[0], e[1], r); return (r || (e[0] && e[1])); } @@ -221,9 +219,9 @@ static void friq_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; - printk("friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", + dev_info(&pi->dev, "friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", FRIQ_VERSION,pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); pi->private = 1; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 9b8db1122154..5ea16a247257 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -230,14 +230,12 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) pi->private = frpw_test_pnp(pi) + 2*pi->port; if (((pi->private%2) == 0) && (pi->mode > 2)) { - if (verbose) - printk("frpw: Xilinx does not support mode %d\n", pi->mode); + dev_dbg(&pi->dev, "frpw: Xilinx does not support mode %d\n", pi->mode); return 1; } if (((pi->private%2) == 1) && (pi->mode == 2)) { - if (verbose) - printk("frpw: ASIC does not support mode 2\n"); + dev_dbg(&pi->dev, "frpw: ASIC does not support mode 2\n"); return 1; } @@ -258,10 +256,8 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) for (k=0;k<128;k++) if (scratch[k] != k) r++; frpw_disconnect(pi); - if (verbose) { - printk("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); - } + 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); return (r || (e[0] && e[1])); } @@ -272,9 +268,9 @@ static void frpw_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; - printk("frpw %s, Freecom (%s) adapter at 0x%x, ", + dev_info(&pi->dev, "frpw %s, Freecom (%s) adapter at 0x%x, ", FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index b23632c1da39..ea1b931ce20d 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -234,8 +234,8 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; - printk("kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index 62b0692d1b94..b22c283709de 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -93,7 +93,7 @@ static void ktti_disconnect(struct pi_adapter *pi) static void ktti_log_adapter(struct pi_adapter *pi) { - printk("ktti %s, KT adapter at 0x%x, delay %d\n", + dev_info(&pi->dev, "ktti %s, KT adapter at 0x%x, delay %d\n", KTTI_VERSION, pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index a3b0708aed71..c76d4fb84c61 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -115,8 +115,8 @@ static void on20_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - printk("on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 8dc8296d50e6..5406e76ea727 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -167,7 +167,7 @@ static int on26_test_port(struct pi_adapter *pi) /* hard reset */ } if (i == RESET_WAIT) - printk("on26: Device reset failed (%x,%x)\n",x,y); + dev_err(&pi->dev, "on26: Device reset failed (%x,%x)\n", x, y); w0(4); P1; w0(4); P1; } @@ -280,8 +280,8 @@ static void on26_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - printk("on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } 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])); } From patchwork Wed Feb 15 19:45:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57696 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384082wrn; Wed, 15 Feb 2023 11:47:39 -0800 (PST) X-Google-Smtp-Source: AK7set82h2hMufwYxyu6oqyd+6m0k9s/imU92oBhIXXP4XQFmmqcGbxGlnTcOKRsSgaPttPHxiiT X-Received: by 2002:a05:6a21:9988:b0:be:e908:32a2 with SMTP id ve8-20020a056a21998800b000bee90832a2mr3859104pzb.60.1676490459667; Wed, 15 Feb 2023 11:47:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490459; cv=none; d=google.com; s=arc-20160816; b=hlwF56OsK5DsCDM7QIrdQbbQplVw0YCLPCYtiVDJXpdaT1s7FVsY7sV4bM9A9Ih+W2 SCwvMbklZHeNCZdVD29+2XazP1ALVzf4R+r03Lu3zbPU425w0wU2FFmBjxu+XFAS7+Mu LfwagjdKNJ6w9RfQSDHtvafM5sXqQiTb3sIYx8OZqGRWipigJMoqFd9xt0kvQx2NMmff Fmzp4mAzp3k6/E2BWRo4b0z11bjJaf+pqu2abu4fZByfVFeqz1aWQaIjw6wq0pOQRDLh uWECOkN8Dma0aFbxH0HHWFjWfjP1rVmERuSNQSq3+UX894d6uIqWzaoDlnVTGARufzoB Ktow== 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=C0iO0KN+kAKdyVYwt0YyYgBfV6KsZ8PP1NC6HUVtJfw=; b=YLsFGj/YZX6iG08qCplnc7nyQqDNLQfu2WDOvzkaAyKgSc9liuWKgZgtCCsPmQsKyE 14WWmifkArBay6amHc2+GA8MX/TND0JzHQTl6olhcDhtJKaHozXmx6Qr/rNfdF5DlPvn 8vdpjMbZtmRk+CC++SwX/0zuQEdVKViQOAhzL0e+XL1sMasvcJP1+LNlaPnC6vxFepOB e/E7S1wGLvfZEM0fBRK+Kt4M+za0ekLYTdUN7kMaSpzdov+kBi9eiZ0kNyr2at/DSMRA ejU8zLP0AQJuKalxikEN9YhrYj6HDDhIe6cmXSyhUnLZjnmFoRHbanzyK8tgDAPSIFSG IXMA== 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 c20-20020a6566d4000000b004fb40cc66d5si4742333pgw.400.2023.02.15.11.47.26; Wed, 15 Feb 2023 11:47:39 -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 S229919AbjBOTqr (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbjBOTqV (ORCPT ); Wed, 15 Feb 2023 14:46:21 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 92D8C410BB; 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 B779D7A0709; 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 13/18] pata_parport: simplify log_adapter prints, remove VERSION defines Date: Wed, 15 Feb 2023 20:45:49 +0100 Message-Id: <20230215194554.25632-14-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?1757927660312876285?= X-GMAIL-MSGID: =?utf-8?q?1757927660312876285?= Merge log_adapter prints to single one, remove version print and meaningless VERSION defines. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/aten.c | 8 ++------ drivers/ata/pata_parport/bpck.c | 9 +++------ drivers/ata/pata_parport/bpck6.c | 9 ++------- drivers/ata/pata_parport/comm.c | 8 ++------ drivers/ata/pata_parport/dstr.c | 8 ++------ drivers/ata/pata_parport/epat.c | 9 ++------- drivers/ata/pata_parport/epia.c | 8 ++------ drivers/ata/pata_parport/fit2.c | 6 ++---- drivers/ata/pata_parport/fit3.c | 9 ++------- drivers/ata/pata_parport/friq.c | 8 ++------ drivers/ata/pata_parport/frpw.c | 10 +++------- drivers/ata/pata_parport/kbic.c | 8 ++------ drivers/ata/pata_parport/ktti.c | 7 ++----- drivers/ata/pata_parport/on20.c | 8 ++------ drivers/ata/pata_parport/on26.c | 8 ++------ 15 files changed, 32 insertions(+), 91 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index ccbba14ccab1..8995a4a08b76 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -15,8 +15,6 @@ */ -#define ATEN_VERSION "1.01" - #include #include #include @@ -124,10 +122,8 @@ static void aten_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - dev_info(&pi->dev, "aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "ATEN EH-100 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol aten = { diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index dec24983d140..793ef2c7849e 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -14,8 +14,6 @@ */ -#define BPCK_VERSION "1.02" - #include #include #include @@ -421,10 +419,9 @@ static void bpck_log_adapter(struct pi_adapter *pi) bpck_read_eeprom(pi,scratch); 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, - pi->mode,mode_string[pi->mode],pi->delay); + dev_info(&pi->dev, "backpack %8.8s unit %d at 0x%x, mode %d (%s), delay %d\n", + &scratch[110], pi->unit, pi->port, pi->mode, + mode_string[pi->mode], pi->delay); } static struct pi_protocol bpck = { diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 4770e29bfdeb..f144e1b3cacb 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -19,9 +19,6 @@ Version 2.0.2 - fixed version string usage, and made ppc functions static */ - -#define BACKPACK_VERSION "2.0.2" - #include #include #include @@ -179,10 +176,8 @@ static void bpck6_log_adapter(struct pi_adapter *pi) char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", - BACKPACK_VERSION, pi->port); - dev_info(&pi->dev, "Unit: %d Mode:%d (%s) Delay %d\n", - pi->unit,pi->mode,mode_string[pi->mode],pi->delay); + dev_info(&pi->dev, "Micro Solutions BACKPACK Drive unit %d at 0x%x, mode:%d (%s), delay %d\n", + pi->unit, pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static int bpck6_init_proto(struct pi_adapter *pi) diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 7b59eca52185..6e05b50c322c 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -14,8 +14,6 @@ */ -#define COMM_VERSION "1.01" - #include #include #include @@ -183,10 +181,8 @@ static void comm_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "DataStor Commuter at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol comm = { diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index eb6ddceaeb83..64e45eed9588 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -13,8 +13,6 @@ */ -#define DSTR_VERSION "1.01" - #include #include #include @@ -195,10 +193,8 @@ static void dstr_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - dev_info(&pi->dev, "dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "DataStor EP2000 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol dstr = { diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index b08ed2f86668..da63fe3b7182 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -16,8 +16,6 @@ */ -#define EPAT_VERSION "1.02" - #include #include #include @@ -296,11 +294,8 @@ static void epat_log_adapter(struct pi_adapter *pi) ver = RR(0xb); epat_disconnect(pi); - dev_info(&pi->dev, "epat %s, Shuttle EPAT chip %x at 0x%x, ", - EPAT_VERSION, ver, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Shuttle EPAT chip %x at 0x%x, mode %d (%s), delay %d\n", + ver, pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol epat = { diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 32bec3449338..778ebd033ff9 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -17,8 +17,6 @@ */ -#define EPIA_VERSION "1.02" - #include #include #include @@ -275,10 +273,8 @@ static void epia_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Shuttle EPIA at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol epia = { diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index d0a781f04411..3536d8c07955 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -13,8 +13,6 @@ */ -#define FIT2_VERSION "1.0" - #include #include #include @@ -116,8 +114,8 @@ static void fit2_disconnect(struct pi_adapter *pi) static void fit2_log_adapter(struct pi_adapter *pi) { - dev_info(&pi->dev, "fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", - FIT2_VERSION, pi->port, pi->delay); + dev_info(&pi->dev, "FIT 2000 adapter at 0x%x, delay %d\n", + pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index f86da2d478cb..9f5320c750e2 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -17,8 +17,6 @@ */ -#define FIT3_VERSION "1.0" - #include #include #include @@ -173,11 +171,8 @@ static void fit3_log_adapter(struct pi_adapter *pi) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; - dev_info(&pi->dev, "fit3 %s, FIT 3000 adapter at 0x%x, " - "mode %d (%s), delay %d\n", - FIT3_VERSION, pi->port, - pi->mode,mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "FIT 3000 adapter at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol fit3 = { diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 9e3ec64896f2..422146f614d6 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -25,8 +25,6 @@ 1.01 GRG 1998.12.20 Added support for soft power switch */ -#define FRIQ_VERSION "1.01" - #include #include #include @@ -219,10 +217,8 @@ static void friq_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", - FRIQ_VERSION,pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); + dev_info(&pi->dev, "Freecom IQ ASIC-2 adapter at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); pi->private = 1; friq_connect(pi); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index c12c8aa9707c..068db960861e 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -23,8 +23,6 @@ */ -#define FRPW_VERSION "1.03" - #include #include #include @@ -268,11 +266,9 @@ static void frpw_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "frpw %s, Freecom (%s) adapter at 0x%x, ", - FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Freecom (%s) adapter at 0x%x, mode %d (%s), delay %d\n", + ((pi->private % 2) == 0) ? "Xilinx" : "ASIC", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol frpw = { diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index ea1b931ce20d..3fab7a896e79 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -18,8 +18,6 @@ */ -#define KBIC_VERSION "1.01" - #include #include #include @@ -234,10 +232,8 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; - dev_info(&pi->dev, "kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "KingByte %s at 0x%x, mode %d (%s), delay %d\n", + chip, pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static void k951_log_adapter(struct pi_adapter *pi) diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index b22c283709de..742051f6ea10 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -9,8 +9,6 @@ */ -#define KTTI_VERSION "1.0" - #include #include #include @@ -93,9 +91,8 @@ static void ktti_disconnect(struct pi_adapter *pi) static void ktti_log_adapter(struct pi_adapter *pi) { - dev_info(&pi->dev, "ktti %s, KT adapter at 0x%x, delay %d\n", - KTTI_VERSION, pi->port, pi->delay); - + dev_info(&pi->dev, "KT adapter at 0x%x, delay %d\n", + pi->port, pi->delay); } static struct pi_protocol ktti = { diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index c76d4fb84c61..9cc8be9fa562 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -12,8 +12,6 @@ */ -#define ON20_VERSION "1.01" - #include #include #include @@ -115,10 +113,8 @@ static void on20_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - dev_info(&pi->dev, "on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "OnSpec 90c20 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol on20 = { diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 5406e76ea727..e37f69db5f76 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -16,8 +16,6 @@ */ -#define ON26_VERSION "1.04" - #include #include #include @@ -280,10 +278,8 @@ static void on26_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - dev_info(&pi->dev, "on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "OnSpec 90c26 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol on26 = { From patchwork Wed Feb 15 19:45:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57692 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383914wrn; Wed, 15 Feb 2023 11:47:17 -0800 (PST) X-Google-Smtp-Source: AK7set/bCv62FsrmT0JOfTfAzHgs+/NSgiwyqPovzBKeqlktfMeOfVdBY2Cyj0kAaQys36UwP3Vx X-Received: by 2002:a17:902:e84a:b0:199:2a89:f912 with SMTP id t10-20020a170902e84a00b001992a89f912mr4194781plg.20.1676490437401; Wed, 15 Feb 2023 11:47:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490437; cv=none; d=google.com; s=arc-20160816; b=WbdEg0262YnJreupIvthOTk4Kycy4bOfhiVikaHHj0lXuulFZrAKCXTt101hkBJK8b Gk5OZm8wfXbzfizExkbZ6AxKTEt0YlTlJisrn8QC60qFdkoR9GX4O5k1dDuNIgjBjbwd ePv61g12y9SHem/MCjAvWbuKIqtfbU4NTAjfY/CB6ZoTJEzp1bCbgoV8hXRgo+CEuJIg J18WybJ8uGuh0IsLN3AYXJU2/oFgKA+3MQYd9Z+lRV8awSJbdSY30j5Gg1RyWLdCWDVp PRFoBMC8a8QQuZY5Ozm8BA8EBsUvgmByEbFq2elvOz2G3250kMtQO/i+sMJhGRaP8mc7 IF1Q== 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=PZzsr8xwqU3mwOJPxmiiCtxUm4qVNN5is72xB7+6mpY=; b=OyZS/KfvH7IwrY6QZQINMQiobM7zQr135+ZOYkuWFzi0o8DZt3vdnbJJO/ORalpQz+ 0QYQWEERKEeAG/wffd7zBDw/U7lvsCOz0FjF5+Fv3/xZewIDUqFbjPOc+oYXDqxrOc7I FJnlDaN2gJgRBpY2ssB86DIZmJeY1y93oDxKAr2SZWtSpNcBOjGjiHXabi+s73XVctOG Yl+34y0dks9UUKPi4irkS/S+ymvkyIVXFHFVU6u3CVhu7lD4V4afj0gjugqbohNC9kDd ihTnPWNtoqI5yUNiuIpFLUctP19l7ckJOvMy47usFCUjXyYJB68wPlkVHgBd1wknaF4Y +New== 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 h14-20020a170902ac8e00b0019a7d1ffaeesi13436440plr.464.2023.02.15.11.47.02; Wed, 15 Feb 2023 11:47:17 -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 S229871AbjBOTqi (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229760AbjBOTqT (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 877A0410BA; 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 D399E7A071B; 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 14/18] pata_parport: remove bpck6 verbose parameter Date: Wed, 15 Feb 2023 20:45:50 +0100 Message-Id: <20230215194554.25632-15-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?1757927636857446811?= X-GMAIL-MSGID: =?utf-8?q?1757927636857446811?= Remove now useless verbose parameter of bpck6 module. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/bpck6.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index f144e1b3cacb..f0ab30fa739a 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -30,10 +30,6 @@ #include "ppc6lnx.c" #include -/* PARAMETERS */ -static bool verbose; /* set this to 1 to see debugging messages and whatnot */ - - #define PPCSTRUCT(pi) ((Interface *)(pi->private)) /****************************************************************/ @@ -220,5 +216,4 @@ static struct pi_protocol bpck6 = { MODULE_LICENSE("GPL"); MODULE_AUTHOR("Micro Solutions Inc."); MODULE_DESCRIPTION("BACKPACK Protocol module, compatible with PARIDE"); -module_param(verbose, bool, 0644); module_pata_parport_driver(bpck6); From patchwork Wed Feb 15 19:45:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57701 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384397wrn; Wed, 15 Feb 2023 11:48:28 -0800 (PST) X-Google-Smtp-Source: AK7set+DJxxnYmSR1baT8T6MUkbj62KQ54ezW662tVqg7Kf/JrywuAhQz0SY4SL41ffNXBisOmcB X-Received: by 2002:a17:903:244a:b0:199:bd4:9fbb with SMTP id l10-20020a170903244a00b001990bd49fbbmr4198260pls.43.1676490507833; Wed, 15 Feb 2023 11:48:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490507; cv=none; d=google.com; s=arc-20160816; b=QGMwb84OY2wmlNtuA/j87VQ9/V22meR2rUZibkTrh9EZ60PQJKkqP3h1rduSmHqJju je73ihSvSP1cZ+cNEObpWGuUCs70juEjeSO5wIBPl/MR8OOo7725Zph4NaiemwFxJ14Y XmUmB+FQcxJc3byTHSx19H4O0en3fDiWu/zF7ADngkib3882KDHE9qQj9co2yvbKJVEC Tp4J+MgjWjfG+4wZ/xRFHJ9qqThLU3IMqPbHA3SNS3v4dSExYZi2pWaw5fCMtNKgkBnE Mhi54+wN0rxzGYtFqE1+hCKmGkAnkPkBnRdDLYsyC5UV3CjSoaNN2JKCPsXwyuwRiWtv 3gRA== 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=AlGxg6RZ9iKSWKL1Ic6MJ/o57ZB8gKDIprwVIo9d2Do=; b=Jtbtjlo0OHnsEv0rNSRgIghTx+dgtP0Dy2y+TIP1J3cdjPbkL/6FkQVjyCCn7vVPXp FzaTsOwJPd7+gERESuWwYf1JolV0lAIWXf5wmiBadLq9MwzKxkw58wXxVwAJsGdpEPet ZDo0GNCJ0FoCFcN9vmie0YzF5MBJBwJk8uvLB6nkEEERjbwuCbIdoVzTYAnkdYG+SW4a k0HQRcsRANn3eXMpXs5cwdSb9jL4XxRwaruZo/vbigWiih2U+zl3Mr4E4+uMJz1nepP+ XTij19b2pn4CdT74f8FRV1hwrfk8ukcl8XPCE37/rLFyWcBnhPKAbwTZ1oG2mCgVUIl7 5JWg== 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 b5-20020a170902d30500b0019a826d3047si12653425plc.627.2023.02.15.11.48.15; Wed, 15 Feb 2023 11:48:27 -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 S229964AbjBOTq7 (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:59 -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 S229805AbjBOTq0 (ORCPT ); Wed, 15 Feb 2023 14:46:26 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D9A37410A3; Wed, 15 Feb 2023 11:46:16 -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 E7F947A071E; 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 15/18] pata_parport: remove verbose parameter from test_proto() Date: Wed, 15 Feb 2023 20:45:51 +0100 Message-Id: <20230215194554.25632-16-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?1757927711037950105?= X-GMAIL-MSGID: =?utf-8?q?1757927711037950105?= verbose parameter of test_proto() is now unused, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/bpck.c | 2 +- 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 +- drivers/ata/pata_parport/pata_parport.c | 2 +- include/linux/pata_parport.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 793ef2c7849e..2072e291fd16 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -274,7 +274,7 @@ static void bpck_force_spp(struct pi_adapter *pi) #define TEST_LEN 16 -static int bpck_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int bpck_test_proto(struct pi_adapter *pi, char *scratch) { int i, e, l, h, om; char buf[TEST_LEN]; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index da63fe3b7182..da3398941f81 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -246,7 +246,7 @@ static void epat_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int epat_test_proto(struct pi_adapter *pi, char *scratch) { int k, j, f, cc; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 778ebd033ff9..a83685ed9dde 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -232,7 +232,7 @@ static void epia_write_block(struct pi_adapter *pi, char *buf, int count) } -static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int epia_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, f; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 422146f614d6..7ace1f7eea34 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -178,7 +178,7 @@ static void friq_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int friq_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, r; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 068db960861e..d04a11889066 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -219,7 +219,7 @@ static int frpw_test_pnp(struct pi_adapter *pi) a hack :-( */ -static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int frpw_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, r; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index f42a2cafc382..27aa2419af02 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -306,7 +306,7 @@ static int pi_test_proto(struct pi_adapter *pi, char *scratch) parport_claim_or_block(pi->pardev); if (pi->proto->test_proto) - res = pi->proto->test_proto(pi, scratch, 1); + res = pi->proto->test_proto(pi, scratch); else res = default_test_proto(pi, scratch); parport_release(pi->pardev); diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index c44d30b3e886..e45bb1896003 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -67,7 +67,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); - int (*test_proto)(struct pi_adapter *pi, char *scratch, int verbose); + int (*test_proto)(struct pi_adapter *pi, char *scratch); void (*log_adapter)(struct pi_adapter *pi); int (*init_proto)(struct pi_adapter *pi); From patchwork Wed Feb 15 19:45:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57702 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384797wrn; Wed, 15 Feb 2023 11:49:33 -0800 (PST) X-Google-Smtp-Source: AK7set/HVbn5l4StNYu6gWjXT9MaEoBzBywgzu1iESK1S0CyplhAmmD/18FrlAFie8lnBYVMFiDw X-Received: by 2002:a05:6a21:300c:b0:bc:a63f:423c with SMTP id yd12-20020a056a21300c00b000bca63f423cmr2451408pzb.11.1676490572907; Wed, 15 Feb 2023 11:49:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490572; cv=none; d=google.com; s=arc-20160816; b=F0fQo4kapc1VRNRkRHRLwOxQv0aAF5VlqSdXAXYtV3G7PenISjnDqwbaZ35iWvORzh AN/+52Emts2bPZfxuoWHyGr96W3Zl8hJ0DJrzkinSo5FuYR+QpVOb8ozVkuUcvpSWr/e GnTvbXUU2amA0MFn7gPtKClMXc/P2yQjXTqQ8o0HkMFsUfIYsMPqMSFB+ZILHWG3/jLL UHKx1pkHqkqnGPhA51f3rzkS1kHFRrpFnBRnPZsd3hnGBO+gGj7KHueKWz/3A1ZRsR5H 6t3EQOrxawGoMxD7EgkbYF8BBGx3aRKLT+y7yGeEK2Pfzw34XDBw3Ve5ZqwMK311GPcu S+Lg== 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=zsCOB2PCTR6KNFR4aucIidilbpIkuepZgFLXM5XUpSA=; b=L0kCs6OZY0sofZwTqO1p9y+hNL0ts6Vx5B7IxkSVF2hjjWeakgU0hQc/U36QyJSRyT /mPlAdwxt/LXW+fzDG+xpgHFGsdGnHt9g05PsnM3eIwVMgBH6E4y9Ds7JSc+PQU5U5+n VZpAFS9NN+TEQfFY5ox1O1m1WcNLvO2vpN1bkUsjiNIa1xdMFy1HvheQx2+zHkkQRKF8 O6IVUD5L0JWt1rqJl9hKMoTm/MXgUeU+uJpBpPB2Sz+YXq6VnM4Mn6CnKqbwYgkg82id 8xgqEYtqTHL3MD5pwxsAXzcgsabxCo+/bnRUrFIs5h/RchBd38HHK4fOlkJ2vRpT5rrI jlpg== 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 o8-20020a656a48000000b004da3b29e1cdsi19655435pgu.116.2023.02.15.11.49.19; Wed, 15 Feb 2023 11:49:32 -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 S229985AbjBOTrF (ORCPT + 99 others); Wed, 15 Feb 2023 14:47:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbjBOTqe (ORCPT ); Wed, 15 Feb 2023 14:46:34 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 51AC841B56; Wed, 15 Feb 2023 11:46:16 -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 0A4927A0728; Wed, 15 Feb 2023 20:46:06 +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 16/18] pata_parport: remove scratch parameter from test_proto() Date: Wed, 15 Feb 2023 20:45:52 +0100 Message-Id: <20230215194554.25632-17-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?1757927778961350567?= X-GMAIL-MSGID: =?utf-8?q?1757927778961350567?= Don't pass around a pointer to scratch buffer. Use local buffers in protocols that need it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 2 +- drivers/ata/pata_parport/epat.c | 3 ++- drivers/ata/pata_parport/epia.c | 3 ++- drivers/ata/pata_parport/friq.c | 3 ++- drivers/ata/pata_parport/frpw.c | 3 ++- drivers/ata/pata_parport/pata_parport.c | 23 +++++++++++------------ include/linux/pata_parport.h | 2 +- 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 2072e291fd16..ecb98bf0e6de 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -274,7 +274,7 @@ static void bpck_force_spp(struct pi_adapter *pi) #define TEST_LEN 16 -static int bpck_test_proto(struct pi_adapter *pi, char *scratch) +static int bpck_test_proto(struct pi_adapter *pi) { int i, e, l, h, om; char buf[TEST_LEN]; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index da3398941f81..26d1b6d438bc 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -246,10 +246,11 @@ static void epat_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int epat_test_proto(struct pi_adapter *pi, char *scratch) +static int epat_test_proto(struct pi_adapter *pi) { int k, j, f, cc; int e[2] = {0,0}; + char scratch[512]; epat_connect(pi); cc = RR(0xd); diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index a83685ed9dde..101a0d9f1aa6 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -232,10 +232,11 @@ static void epia_write_block(struct pi_adapter *pi, char *buf, int count) } -static int epia_test_proto(struct pi_adapter *pi, char *scratch) +static int epia_test_proto(struct pi_adapter *pi) { int j, k, f; int e[2] = {0,0}; + char scratch[512]; epia_connect(pi); for (j=0;j<2;j++) { diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 7ace1f7eea34..9c4a6487b2a9 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -178,10 +178,11 @@ static void friq_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int friq_test_proto(struct pi_adapter *pi, char *scratch) +static int friq_test_proto(struct pi_adapter *pi) { int j, k, r; int e[2] = {0,0}; + char scratch[512]; pi->saved_r0 = r0(); w0(0xff); udelay(20); CMD(0x3d); /* turn the power on */ diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index d04a11889066..024b5c0737e0 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -219,10 +219,11 @@ static int frpw_test_pnp(struct pi_adapter *pi) a hack :-( */ -static int frpw_test_proto(struct pi_adapter *pi, char *scratch) +static int frpw_test_proto(struct pi_adapter *pi) { int j, k, r; int e[2] = {0,0}; + char scratch[512]; if ((pi->private>>1) != pi->port) pi->private = frpw_test_pnp(pi) + 2*pi->port; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 27aa2419af02..77a3e5a3f062 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -276,7 +276,7 @@ static void pi_release(struct pi_adapter *pi) module_put(pi->proto->owner); } -static int default_test_proto(struct pi_adapter *pi, char *scratch) +static int default_test_proto(struct pi_adapter *pi) { int j, k; int e[2] = { 0, 0 }; @@ -300,21 +300,21 @@ static int default_test_proto(struct pi_adapter *pi, char *scratch) return e[0] && e[1]; /* not here if both > 0 */ } -static int pi_test_proto(struct pi_adapter *pi, char *scratch) +static int pi_test_proto(struct pi_adapter *pi) { int res; parport_claim_or_block(pi->pardev); if (pi->proto->test_proto) - res = pi->proto->test_proto(pi, scratch); + res = pi->proto->test_proto(pi); else - res = default_test_proto(pi, scratch); + res = default_test_proto(pi); parport_release(pi->pardev); return res; } -static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) +static bool pi_probe_mode(struct pi_adapter *pi, int max) { int best, range; @@ -326,7 +326,7 @@ static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) range = 8; if (range == 8 && pi->port % 8) return false; - return !pi_test_proto(pi, scratch); + return !pi_test_proto(pi); } best = -1; for (pi->mode = 0; pi->mode < max; pi->mode++) { @@ -335,14 +335,14 @@ static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) range = 8; if (range == 8 && pi->port % 8) break; - if (!pi_test_proto(pi, scratch)) + if (!pi_test_proto(pi)) best = pi->mode; } pi->mode = best; return best > -1; } -static bool pi_probe_unit(struct pi_adapter *pi, int unit, char *scratch) +static bool pi_probe_unit(struct pi_adapter *pi, int unit) { int max, s, e; @@ -367,14 +367,14 @@ static bool pi_probe_unit(struct pi_adapter *pi, int unit, char *scratch) for (pi->unit = s; pi->unit < e; pi->unit++) { if (pi->proto->probe_unit(pi)) { parport_release(pi->pardev); - return pi_probe_mode(pi, max, scratch); + return pi_probe_mode(pi, max); } } parport_release(pi->pardev); return false; } - return pi_probe_mode(pi, max, scratch); + return pi_probe_mode(pi, max); } static void pata_parport_dev_release(struct device *dev) @@ -419,7 +419,6 @@ static struct pi_adapter *pi_init_one(struct parport *parport, struct pi_protocol *pr, int mode, int unit, int delay) { struct pardev_cb par_cb = { }; - char scratch[512]; const struct ata_port_info *ppi[] = { &pata_parport_port_info }; struct ata_host *host; struct pi_adapter *pi; @@ -469,7 +468,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport, if (!pi->pardev) goto out_module_put; - if (!pi_probe_unit(pi, unit, scratch)) { + if (!pi_probe_unit(pi, unit)) { dev_info(&pi->dev, "Adapter not found\n"); goto out_unreg_parport; } diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index e45bb1896003..bbfa4e63ee85 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -67,7 +67,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); - int (*test_proto)(struct pi_adapter *pi, char *scratch); + int (*test_proto)(struct pi_adapter *pi); void (*log_adapter)(struct pi_adapter *pi); int (*init_proto)(struct pi_adapter *pi); From patchwork Wed Feb 15 19:45:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57700 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp384258wrn; Wed, 15 Feb 2023 11:48:08 -0800 (PST) X-Google-Smtp-Source: AK7set/FjNtuBhl0FBdbTVH7nDpboNZ3AkNYzjVflSX4KDZI2VntxqDvuJdPrHjmCHksSz4hq8Ia X-Received: by 2002:a17:903:2846:b0:196:5f76:1e51 with SMTP id kq6-20020a170903284600b001965f761e51mr2898394plb.64.1676490487717; Wed, 15 Feb 2023 11:48:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490487; cv=none; d=google.com; s=arc-20160816; b=BpyMPO/lo4HyhLsfNBgSNZn1oPwVJbZOYHZlRJeMrNeTlFjQIktMUfr2XFXQypCs3N z6DvHNudHTLHhwEU163he1O0x27STP3ahZIKmlaQRNPSBOjP6xDveNzvCtxqC30BwhhB 1ojf5uQeBZMvPiYB+XoxM/hhDAU9sCvc8/VmoWpalygLoRQlhFrt5Moq5vz9AEFNz7sz O7A1XjmzLNwPABbRhywpBbd0wq0iI3SRpgstcZaXbhJqWpAHr83o9hAKM144go2L+P/n o+62tS6nyPuS7TE41DHdW0S3tM369Gw1bVoXliLMfg7bp1A8QL+cftFsdJRWSJOv1qgc Vj8A== 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=q84wsq9GXUH2rLpoK5SE9rUhK63tFQSpB+0bamn9mtk=; b=Y74jyNL1Z5KauwLLzKIZxCeufnLcO/YEOpkFDPxx1pvj1kERxDdq5t2dNVksyB5F0q Hxu1imKuy5e1oUhbNRGo6ODGkhP7rLUcxyPm8HQTHoTIdTAVlhdoesdpYYRi1VgKkeGR AyV+4Xv1BfhvUx4aNbQjJ343xBk16fY5tgu1+VhIJ/EmSz10rh8eNosuu4K+I8RWwSc5 Rry3PCcDqep1B+x99WBeyYtAp8Mp91Jw+A+icnhdj7VuZBvStzswI/xVFn3xs8Yxl5RE wcpZVJ9k/8ShXApjfXcWi0ktxSHjCmaCs34EPEfxI4e7e/I31TmklE6IJmRA7Eu9lE3Q Pexw== 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 e123-20020a636981000000b0049b37046fbcsi12395835pgc.391.2023.02.15.11.47.55; Wed, 15 Feb 2023 11:48:07 -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 S229953AbjBOTq4 (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjBOTqZ (ORCPT ); Wed, 15 Feb 2023 14:46:25 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D9C9C41B48; Wed, 15 Feb 2023 11:46:16 -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 24C857A073E; Wed, 15 Feb 2023 20:46:06 +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 17/18] pata_parport: remove obsolete changelogs Date: Wed, 15 Feb 2023 20:45:53 +0100 Message-Id: <20230215194554.25632-18-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?1757927689400061558?= X-GMAIL-MSGID: =?utf-8?q?1757927689400061558?= Remove obsolete changelogs from protocol drivers. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 6 ------ drivers/ata/pata_parport/bpck.c | 7 ------- drivers/ata/pata_parport/bpck6.c | 8 -------- drivers/ata/pata_parport/comm.c | 6 ------ drivers/ata/pata_parport/dstr.c | 6 ------ drivers/ata/pata_parport/epat.c | 7 ------- drivers/ata/pata_parport/epia.c | 7 ------- drivers/ata/pata_parport/friq.c | 5 ----- drivers/ata/pata_parport/frpw.c | 10 ---------- drivers/ata/pata_parport/kbic.c | 6 ------ drivers/ata/pata_parport/on20.c | 6 ------ drivers/ata/pata_parport/on26.c | 9 --------- 12 files changed, 83 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 8995a4a08b76..f0d63b8513e0 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -9,12 +9,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index ecb98bf0e6de..472029a21d59 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -7,13 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto, pi->delay - 1.02 GRG 1998.08.15 default pi->delay returned to 4 - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index f0ab30fa739a..683a11131acd 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -11,14 +11,6 @@ */ -/* - This is Ken's linux wrapper for the PPC library - Version 1.0.0 is the backpack driver for which source is not available - Version 2.0.0 is the first to have source released - Version 2.0.1 is the "Cox-ified" source code - Version 2.0.2 - fixed version string usage, and made ppc functions static -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 6e05b50c322c..0483caa80544 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -8,12 +8,6 @@ use this adapter. */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 64e45eed9588..c5af7a5fa636 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -7,12 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 26d1b6d438bc..b7085a448301 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -9,13 +9,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 Joshua b. Jore CPP(renamed), epat_connect, epat_disconnect - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 101a0d9f1aa6..63e74c1facba 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -10,13 +10,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 GRG 1998.06.17 support older versions of EPIA - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 9c4a6487b2a9..ce605f665ab1 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -20,11 +20,6 @@ */ -/* Changes: - - 1.01 GRG 1998.12.20 Added support for soft power switch -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 024b5c0737e0..257ad13dec09 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -13,16 +13,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - fix chip detect - added EPP-16 and EPP-32 - 1.02 GRG 1998.09.23 added hard reset to initialisation process - 1.03 GRG 1998.12.14 made hard reset conditional - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 3fab7a896e79..29f4f1e14d21 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -12,12 +12,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 9cc8be9fa562..6956b91efb47 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -6,12 +6,6 @@ Onspec 90c20 parallel to IDE adapter. */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index e37f69db5f76..1d90eb9b541e 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -7,15 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 GRG 1998.09.23 updates for the -E rev chip - 1.03 GRG 1998.12.14 fix for slave drives - 1.04 GRG 1998.12.20 yet another bug fix - -*/ - #include #include #include From patchwork Wed Feb 15 19:45:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57703 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp385320wrn; Wed, 15 Feb 2023 11:50:57 -0800 (PST) X-Google-Smtp-Source: AK7set9OH+VlalyhNPDzwd3r6jjf51pp3XnLx/lmpFDoe5cXRDB0nzj/tqfcsXpw6tUO3fqOlPdd X-Received: by 2002:a17:906:dfd2:b0:877:7113:71f3 with SMTP id jt18-20020a170906dfd200b00877711371f3mr3482766ejc.25.1676490657746; Wed, 15 Feb 2023 11:50:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490657; cv=none; d=google.com; s=arc-20160816; b=jryXSRLZ0sf8mVfh2w+vvmL9VmjVbyMN1gEUcccKUu77REPiSMx9FAdi7T7C5BppZy bn/C8lIyH7eKj1kHP1UYyNzOpRkwWat++ugWJ4GuPkt+5fFiNOLhfw7lKrGVga9+RW75 PwNf5HfUOZfGZBxxGiSz0kFQ7Q0Hd0tstdsM9z2MseJUgcrlqo5O+aQlXR/NEqmLY2RL Gjt6eeeHC5I06NGHM4oApYjFrirPJlBM93yLiS2Mny3R3LZPfDht+DXqZw0150Sb0J5m axsnP1eRlApzcmB2eJP+cmYTA7OoPqFLs7SAAugMbSlCPjyBf7Jfo7eWAiHkPJLJDQdK LMOA== 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=bsqBm//FjipXcAd4TfXZoJl/Q/Xrd7PjvIA7LF7Qj1w=; b=py32xBUj0qm9amXpuwCyHTEQvuq91YLqYa6BCGY8O6ihvwZcBJ53EDmomCApdYisE7 fHobFL4eZE1jWn4nxzLlt6Ot9T/f9kmFWKxc24/4zRtlwgNqA9xlU5G7C7tuJ3N4XQb2 AT01vbqPTzXG+P0xeAyBxYB4ihomGsu+63z3c0s3De0IVfd60COKHPTOVBXHgD1p+PqO fGbbNZ7GaoQsD9hpw7Auc4j0hSV9JWtVhBLTUtCsmprio5yfb1602QBZwGNyDv8Z4ZRG pKbH95yizQ1nre+KZ8N7iWnO1g8bY8gQJx3ZKRP0VkF0BV5XGxOZ/2B+NT756kVEpOAn a5/A== 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 cm22-20020a170907939600b008b121ce9301si7134806ejc.406.2023.02.15.11.50.34; Wed, 15 Feb 2023 11:50:57 -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 S229849AbjBOTrC (ORCPT + 99 others); Wed, 15 Feb 2023 14:47:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbjBOTqe (ORCPT ); Wed, 15 Feb 2023 14:46:34 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F10C3E62F; Wed, 15 Feb 2023 11:46:16 -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 3F8307A0741; Wed, 15 Feb 2023 20:46:06 +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 18/18] pata_parport: move pata_parport.h to drivers/ata/pata_parport Date: Wed, 15 Feb 2023 20:45:54 +0100 Message-Id: <20230215194554.25632-19-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?1757927867858218789?= X-GMAIL-MSGID: =?utf-8?q?1757927867858218789?= Now that paride is gone, pata_parport.h does not need to be in include/linux. Move it to drivers/ata/pata_parport. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 3 +-- drivers/ata/pata_parport/bpck.c | 3 +-- drivers/ata/pata_parport/bpck6.c | 3 +-- drivers/ata/pata_parport/comm.c | 3 +-- drivers/ata/pata_parport/dstr.c | 3 +-- drivers/ata/pata_parport/epat.c | 3 +-- drivers/ata/pata_parport/epia.c | 3 +-- drivers/ata/pata_parport/fit2.c | 3 +-- drivers/ata/pata_parport/fit3.c | 3 +-- drivers/ata/pata_parport/friq.c | 3 +-- drivers/ata/pata_parport/frpw.c | 3 +-- drivers/ata/pata_parport/kbic.c | 3 +-- drivers/ata/pata_parport/ktti.c | 3 +-- drivers/ata/pata_parport/on20.c | 3 +-- drivers/ata/pata_parport/on26.c | 3 +-- drivers/ata/pata_parport/pata_parport.c | 2 +- {include/linux => drivers/ata/pata_parport}/pata_parport.h | 0 17 files changed, 16 insertions(+), 31 deletions(-) rename {include/linux => drivers/ata/pata_parport}/pata_parport.h (100%) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index f0d63b8513e0..1bd248c42f8b 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) ((((a>>4)&0x0f)|(b&0xf0))^0x88) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 472029a21d59..1c5035a09554 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" #undef r2 #undef w2 diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 683a11131acd..964bc688e280 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -18,9 +18,8 @@ #include #include #include - #include "ppc6lnx.c" -#include +#include "pata_parport.h" #define PPCSTRUCT(pi) ((Interface *)(pi->private)) diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 0483caa80544..4c2f9ad60ad8 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -15,8 +15,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index c5af7a5fa636..2524684be206 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index b7085a448301..0e4369dbe48e 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)+(b&0xf0)) #define j53(a,b) (((a>>3)&0x1f)+((b<<4)&0xe0)) diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 63e74c1facba..7821e363b143 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -17,8 +17,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads on port 1, 8-bit writes 1 5/3 reads on ports 1 & 2, 8-bit writes diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 3536d8c07955..fd3b2ce426a5 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -20,8 +20,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0)) diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index 9f5320c750e2..75df656ac472 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -24,8 +24,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>3)&0x0f)|((b<<1)&0xf0)) diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index ce605f665ab1..b48bfabd1759 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -27,8 +27,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define CMD(x) w2(4);w0(0xff);w0(0xff);w0(0x73);w0(0x73);\ w0(0xc9);w0(0xc9);w0(0x26);w0(0x26);w0(x);w0(x); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 257ad13dec09..5d4bba371b8e 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -20,8 +20,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define cec4 w2(0xc);w2(0xe);w2(0xe);w2(0xc);w2(4);w2(4);w2(4); #define j44(l,h) (((l>>4)&0x0f)|(h&0xf0)) diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 29f4f1e14d21..8213e62f8f00 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -19,8 +19,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define r12w() (delay_p,inw(pi->port+1)&0xffff) diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index 742051f6ea10..4890b1f12348 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0)) diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 6956b91efb47..276ace12d490 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -13,8 +13,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define op(f) w2(4);w0(f);w2(5);w2(0xd);w2(5);w2(0xd);w2(5);w2(4); #define vl(v) w2(4);w0(v);w2(5);w2(7);w2(5);w2(4); diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 1d90eb9b541e..dc47a54b121f 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 77a3e5a3f062..a1dc639665dc 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include "pata_parport.h" #define DRV_NAME "pata_parport" diff --git a/include/linux/pata_parport.h b/drivers/ata/pata_parport/pata_parport.h similarity index 100% rename from include/linux/pata_parport.h rename to drivers/ata/pata_parport/pata_parport.h