From patchwork Sat Feb 18 22:01:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59034 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569535wrn; Sat, 18 Feb 2023 14:04:06 -0800 (PST) X-Google-Smtp-Source: AK7set+Ss4DUqlZF1rQhiwaNu6Kqwa8Ash9LAZImJ2hvmUQ0dIZOErRjMqlvtHa+oMM9/zgL/8ae X-Received: by 2002:a17:90a:4146:b0:234:bf0:86bb with SMTP id m6-20020a17090a414600b002340bf086bbmr1086367pjg.13.1676757846472; Sat, 18 Feb 2023 14:04:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757846; cv=none; d=google.com; s=arc-20160816; b=tOH77nobrERIxWAym1YoSLvvKjecBE3cxnb8B9SBMnzWf473Uo2VFp+gqrtCE/gYWB T6n3EW+hpnkQxh6GRXRNxNcI6KewET7xJnEriuxFOITCXBdsUsHch9j0H/FVHEbT829P CC5Po3lhNu/GVhQfAZXbWa9bOornY2jN7NxA9vcv82fPjS+B5FR9gxFiHy0IGQLt1Pw7 AHNg08IEcMTOtzmRobSrL6zCze51Eoq9fhphBSrYij+P8fjs3qlnU1pzKf1G5Lr/8yYf X8C+MfCS2JeF1A7alLb6O5zSJJdp34zYPIMyy8TLd4tDnQmgBhPBTQtjkWZeSX8qFqiJ m7cw== 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=ApmMj30/qAtVA7su2e7oawNS5nIMfK1FEEzSuCRsOsKXuIUXTUucjoM0rBXUQREU6b 2v2oJdxtfz++ICWYSab4RlG2ERYUiIVqZjft+FKDEHKaoMPhF43U96coNjVllI8/1LCC AQZLrGuG4BLgtRPLsBt2Yr99KLAGwT1hvpHjgfqHxXWUpWzz0QP39IR8LCjWKQF+w8c7 Fzmm339R+gHXv/sXx5WIy+Fk7Pflj8gi2iLnO3Fx2wpXO4VhsWdZuB3jlO22AIQm5SiS 0qdM//SVHGYKttnmA0RSVYIWTTKsPaZmmQbANQwJUPhQH9Fe4oeypoHCI+WL/SO6ec11 fyoA== 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 bs190-20020a6328c7000000b00501f874e869si3039549pgb.624.2023.02.18.14.03.53; Sat, 18 Feb 2023 14:04:06 -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 S230092AbjBRWCQ (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbjBRWCH (ORCPT ); Sat, 18 Feb 2023 17:02:07 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E26D12874; Sat, 18 Feb 2023 14:02: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 4FFBB7A0400; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:21 +0100 Message-Id: <20230218220138.5692-2-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208035501509051?= X-GMAIL-MSGID: =?utf-8?q?1758208035501509051?= 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 Sat Feb 18 22:01:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569520wrn; Sat, 18 Feb 2023 14:04:05 -0800 (PST) X-Google-Smtp-Source: AK7set/xg87/mXBh7djJzbit8UC5gZKc7gmgShoyCQK3rLqsrPd3QrePrtA8pucaxDVNldhOQr6D X-Received: by 2002:a05:6a20:3944:b0:c7:320a:60b6 with SMTP id r4-20020a056a20394400b000c7320a60b6mr9731661pzg.26.1676757845347; Sat, 18 Feb 2023 14:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757845; cv=none; d=google.com; s=arc-20160816; b=ZihHqZJHxxbNWqrMbYzmX24ocljdLf+mBCfgBClyTZOZqet4kv1eESbEM5WPv7ms16 vvJRbg1zgWhLigDShzV60LZg0etxYZnFqMRRh/oM1F/qZxYbCIPx6NLNXXEaMn0v+/jh VbzQhTiz2pghU4csoiLS2phyzrUHzvWs+4NRHS/u+SVzITgIil4BmArcIvuKCXDwkGaY R3QmGOfQEY7tpSrQLrGXly5LMiTlliW1yoaMkPr7seu9azJSiNhLzIoCBJkNNe3iic33 oS5i7fit2G2ren4vMvJwgMFbUWdJxjQvY+groLCYOwtfilqn2Xy6p21CfgUqEUL2uCZ6 1r9g== 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=SLjJhfx9TSmsXcKqWz41uztohQuSfa5OlIGd5AVBdMg=; b=sTFdeenBmZF3QDx1M+2m2TX8+5SwXUGgYqTFxsiQ1L3WGukuEhytOFwM364ch7LK+g ZkbKZVBc7qlYtZV4cCFAMahtbw3G39MFvF+tF4g9d+Ccgpwb4fFN7mngYOIPfP8WNBpy 1aPu6qNZb+JRaaRRLD9RQ0pREQfvvdGWlerdrJO1OLR74S4BBt+ljyOxkFGzoJHJuocS pa0Z1vbq4v+EF1JmiYqkKmM1sSZwqSZE5qmuZ8AxU4HWlSWXphsPRL9pO5Ydr9sHMCvY 47AnRR6PPYCQw9csIWr1oE/Ymr2O6JQUVvst99k/4e034ynh/w5lMJBzJpx8Cxq8GGZv k2lQ== 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 t8-20020a654b88000000b004fb86793704si9154753pgq.764.2023.02.18.14.03.51; Sat, 18 Feb 2023 14:04: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 S229731AbjBRWCJ (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjBRWCH (ORCPT ); Sat, 18 Feb 2023 17:02:07 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E08B1285E; Sat, 18 Feb 2023 14:02: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 693037A0507; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:22 +0100 Message-Id: <20230218220138.5692-3-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208034145203264?= X-GMAIL-MSGID: =?utf-8?q?1758208034145203264?= 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). Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- 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 Sat Feb 18 22:01:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59033 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569529wrn; Sat, 18 Feb 2023 14:04:05 -0800 (PST) X-Google-Smtp-Source: AK7set99G2cskCZzc93hv69xEJxoD3r3WDu+RNKvtz6PVmrDS2fntMKTBaxLJc+O60viyFHDf83b X-Received: by 2002:a62:7bd2:0:b0:5a8:a570:4597 with SMTP id w201-20020a627bd2000000b005a8a5704597mr5727596pfc.5.1676757845675; Sat, 18 Feb 2023 14:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757845; cv=none; d=google.com; s=arc-20160816; b=Tc0Hd/SJGygyNXNAqTeYy77ijx9SZYHrFAq7wqyei58uhHfgrcaytlYVwtQhtvct7i 5izB8NEW8yexmi0+Ub0OX68nT1vLYHZ2j4BwxkFuTKnnJqe1P9AlT9eDb0xUoBNmJqxy Ds19radKlLK6gojHP+bmNOAlH4/kllDlQrA9OryJyB/Lcw30rO+ZkIMHVDoeauy6B4sy S27LFsw+Ew7EWx8jCmxetE2XnU/j2i9qeBn74BIylXA9bXOhfq6PmOU07akCIBQAWdwD W6OSNEJqOOQo8maccZmtearAyjIzPf6cYHfmODWRYyw/F9FHB707+SPV+AohsNnS+ddT OHUg== 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=TnHBS/PKAwwYecxoZ9/wOl8/5HZwN+iXxV729ecHAevkc20RAfO/+QK5b68DDBxFh5 NtpRvxGOazBfaOX2Z25lUCFZWO++2uMuX4oZQqT9oKM/9M9fBaM5DCIuVrVQwQ44LvLu KCySNkn7Q1VRKgneousXMfcAyQuEHNQpg6qmbeH9/sQKOLVT0QmqxO+eBA5mMrRf9PZo oP8//udnvd0cbgClkNnUZyTfxGLunZ/qUflVAOaMyo+5IF1h7FbXDWOyNKvP39I9I+q0 w/A6gMeO7rFtQYW+WVUF7eOClYXaDcBjoaxzS1RngfT/J3KLwGT8KA0tsUlBydx6lEtC 8Wwg== 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 o9-20020a056a0015c900b005a919e42ba8si10020158pfu.194.2023.02.18.14.03.52; Sat, 18 Feb 2023 14:04: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 S229838AbjBRWCM (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjBRWCH (ORCPT ); Sat, 18 Feb 2023 17:02:07 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E1BC12873; Sat, 18 Feb 2023 14:02: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 847F07A058D; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:23 +0100 Message-Id: <20230218220138.5692-4-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208034898603411?= X-GMAIL-MSGID: =?utf-8?q?1758208034898603411?= 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 Sat Feb 18 22:01:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59035 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569536wrn; Sat, 18 Feb 2023 14:04:06 -0800 (PST) X-Google-Smtp-Source: AK7set/IEEJobwOG6NVz7rlEuf5LF3E9jLNUsjt4eSQQgevbQ7rOpSNyRj/3H85+haCfzbiblsKh X-Received: by 2002:a05:6a20:914a:b0:bf:3def:16cd with SMTP id x10-20020a056a20914a00b000bf3def16cdmr4272816pzc.59.1676757846518; Sat, 18 Feb 2023 14:04:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757846; cv=none; d=google.com; s=arc-20160816; b=H+Rxlesmw9AOCZ6HsqPLd7vHl3yP0srhV8ysEwF6U6XimaGs9MLh5Lk//SSxK+9i/t 0H5ZzU/7rMGUgNI+xFDweGy3rDQiQxsC6jKzz60KvftsE0YTimMVc1NEdIeVL0n/YZA2 eXMNrbNaL4VMxoVJxu7axiqbGUrPOeW4nO61Zp/hTNp5UsxHNyuCWznW45+MlFjk/Wy+ gQof55XRcAl/FDrr5sVRHYzgSadJPEJpDKVwGHUCLjHQR6DJvI1ukiNIIZhv1HtxbY7Q E0oZr2Niy8JeufzH+T6UIVQBjj9RRszfGeAtJ45+uct9UvqVGE9CAxzQeo++UCx62CmT b84w== 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=PsWmvBrxwSyL+1787HLgbMdi6C/zFjVQTfKu2TxAkes=; b=wmN+y6nLIWt+zp8MwiJ8NtV+Qy3DTP9nVqnY1KHf2AOtpsT6AbtC8wFxmWatPsm/ZE zo42ZM703UkT2g02aO+WKpq+iCOL6GLbjhfjcv6WTCexbyqAaROE7CmUGI+a0rN4JNy7 5AQdXnCyU2kgSmgRXlKwfBxTHkifY2GIleFs8F+KtsOXJ30vxKcD2EFrA3JVYF0AjemF i0/vqH/B3arYRrNhwOnWX6GaeqU4d/ZpjtsSZcy/vDhK4EunSYuflT6IefCjPy2fG+mF p0nwXIFmeTHDBt6ggg9osJXPmMYjGYRUdzZUKMgunbvyFNZFcfET8eeaQZ9ji3secFsR m32g== 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 h13-20020a63210d000000b004fbbe7c529csi7924310pgh.862.2023.02.18.14.03.53; Sat, 18 Feb 2023 14:04:06 -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 S230033AbjBRWCP (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjBRWCH (ORCPT ); Sat, 18 Feb 2023 17:02:07 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7435B12877; Sat, 18 Feb 2023 14:02: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 9EC057A0596; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:24 +0100 Message-Id: <20230218220138.5692-5-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208035229110355?= X-GMAIL-MSGID: =?utf-8?q?1758208035229110355?= bpck6 prints some useless messages on module_init. Remove them. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- 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 Sat Feb 18 22:01:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59046 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569893wrn; Sat, 18 Feb 2023 14:04:50 -0800 (PST) X-Google-Smtp-Source: AK7set9juFLAa40vqZvJprrlA2hyNPq7hkC86a6ZcLaJICj5bvaSEqNIyUCAt6zYOGs+L//ciRbk X-Received: by 2002:a17:902:e812:b0:19a:b4a9:9df7 with SMTP id u18-20020a170902e81200b0019ab4a99df7mr442954plg.53.1676757890389; Sat, 18 Feb 2023 14:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757890; cv=none; d=google.com; s=arc-20160816; b=Kr241tF2weAJf0MLMugRAzKSwwZJTF5MeDsjs6dl/1QZRKUoqG3LlZ6n4qIevuBc2H OooyZGMtv54CTJKpUhdOacxJ87D+fUTb4envhA4L1szn5Eu8YoDD852CxjpItKlmXvOk K/9oo6Zlrx914Ox77/wlkmULPnl2dji3jo5PYxoEGCdT6ZUudugCDDBvyBPBZX1UHqoY 5KX43zpFe3t2S2onPOgn4YclBMBXzyiehEMih06+JduEmUPcDGzOx0xA1RHjrQvNNKdA uSstAmC3ZDKCD9D3wSSkrZCQPZx5iOg6qIKrWVnxSbRVcK8OBI1Kv091R5A8k/6lUODE zcww== 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=RDltdvzp9+/CB1T0NdXWNR9PWrj7XavY9FpOuXzZ/+4=; b=A9V2ZFiKDbqGizSZFk+8ZarDaPznNlgOpQVFX6YLXnhn8YWv5UFYJjw3PnukMQAWkD Xt+M5kKSMuB3U3JRNTrmyvIH/k/sFnJuH9r1gm46AuzhhT+et7R3vKx2ZiX2MpRx9apZ 1WQueq3wjhAkWJ6pqrpeXWQFc4G8JDGPahglYk2xEvBAD6txlgfxL0AJI/viiCmUTXWG pfSF89H1v7GjgVh4gw5D/BopF0K6UD8wVXMztQuM6XZKXGOAo5Ovl8iveoZATRKH2wGG 1lB/SaGHfaA+rfErHeuXLInZ34sonm1P21v3WaUPvQ1xBCMMhoH+D1iz6hRqds/y5cnJ 8jWA== 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 a21-20020a634d15000000b004fb9330dcfcsi8983162pgb.323.2023.02.18.14.04.36; Sat, 18 Feb 2023 14:04:50 -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 S230272AbjBRWCZ (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjBRWCK (ORCPT ); Sat, 18 Feb 2023 17:02:10 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4338F12873; Sat, 18 Feb 2023 14:02:08 -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 BA2AF7A05F1; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:25 +0100 Message-Id: <20230218220138.5692-6-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208081445366060?= X-GMAIL-MSGID: =?utf-8?q?1758208081445366060?= Introduce module_pata_parport_driver macro and use it in protocol drivers to reduce boilerplate code. Remove paride_(un)register compatibility defines. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- 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 Sat Feb 18 22:01:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59036 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569604wrn; Sat, 18 Feb 2023 14:04:18 -0800 (PST) X-Google-Smtp-Source: AK7set8a/qv3BtVfHg5lYwb2R5aZkXTre9ZS1aHV0dsWwEdReky3FWVJLC/lkGIjZFNB3XPmX2gV X-Received: by 2002:a17:90a:189:b0:233:d91e:e64a with SMTP id 9-20020a17090a018900b00233d91ee64amr319146pjc.10.1676757857755; Sat, 18 Feb 2023 14:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757857; cv=none; d=google.com; s=arc-20160816; b=omcV2gD06j58HFbG61o/NhpwES0weDOScuRMsRRdp7X8T8j4RhU4L/sVzU/UFVdgJ/ w9pNjkNEWZOvgwli2DjxxwNMG1fn9wahEnIAY3Ar8UX8qvqbPmKSulr7hPB52BbWxrdc xOlRlwW6jZ0Uc+kp447llW8ZK9fOYiPYKmEws02Pp8cPibrvzyDISZheHvInDsI6BqBk jU5weicP020ZnwRx8uloQTUxlnZmfmebdvbqGusmLQrZ0/EiRdBHUFEQK4FCU1wIJ96L eZM9e0CLfXI1wOFFy+lERQ8c95C1dFzPpEQnP/MSh51+8Nxt7XvvLKbj8aKZZvuB40G0 69xA== 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=v9wsH9RhXo78KJux6d7gE9oHk5zfqcx+fJbAcY+XL4A=; b=gxeZ3HMy/iZ/FTB4+9GV2yZ01RtfXzBkFb1lv+pY8bofTr8euRYxXeTGzo1M3rdcyF rWUWJNnoi8tupGYpxTaV61sZmwX1I6N+2nCO4tf2e1KmaOCJV9DjLvHuZgQ9ro4antSb SRyyBMPnQO1R8dYBmxmUZB39DygnY/S9wmPqOgmaViReKV9chaXvHW9MrI8obVU3uJXc OE5+N08yTJ50KDzzWatp2fJJaXZcTAZyVxLhI76LYmtIGqoXzp8/P8DxEf0++fsFFyQe GlSC/s85UYl0Vylpw+cW6IzO97cT8hwrIftKv9dntcLodeErTMXpeJ8Tmj72H9pi9n0L zW5g== 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 oc17-20020a17090b1c1100b0022bb4d6f7casi11676175pjb.131.2023.02.18.14.04.05; Sat, 18 Feb 2023 14:04: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 S229793AbjBRWCW (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbjBRWCK (ORCPT ); Sat, 18 Feb 2023 17:02:10 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 281431285E; Sat, 18 Feb 2023 14:02:08 -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 D06597A05F3; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:26 +0100 Message-Id: <20230218220138.5692-7-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208047211497014?= X-GMAIL-MSGID: =?utf-8?q?1758208047211497014?= 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. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- 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 Sat Feb 18 22:01:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59045 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569890wrn; Sat, 18 Feb 2023 14:04:50 -0800 (PST) X-Google-Smtp-Source: AK7set9MhErhpjVqI1VO9iDiFCnoRA3CdE+ZCjVDCjHxpbdDRAVT7Wj/+M8DYbCj2uQHRStBGh4H X-Received: by 2002:a17:90b:4a09:b0:234:156:dda7 with SMTP id kk9-20020a17090b4a0900b002340156dda7mr389006pjb.28.1676757890078; Sat, 18 Feb 2023 14:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757890; cv=none; d=google.com; s=arc-20160816; b=kAjgjbQd09u8kIbeI0/g0GmalptSPEJy0UyiPH8QW1B3Ai8gwmBsHi6WeBTuHNATnT vb3ZyJrHMyj8PXERJg3AIAUOYmYV1f5B+1kOC7T3dePDPuDPmjLwb1szp9rogDnCG7k2 yvvhTtig+Kwd9DMeffz0dW5A7giTIgdS60Zmc9MCc31x7KwxQfRL9gfV3LluKe1DVnPB YqOcQG+EGuHhk0+YJouKzZa5FUuJ7aw4rm3CwkpqtuoKWOGu4AYbICOOVMKMJcRIhmsw zMgXkLCthV+i3yXg5NBww8PrFYB1i/vpRajyKhtCIKmhx0KSTWI23+WL4wiqLBWiwAwi /huA== 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=HuTqXcxqgkBnMshoOYT33cQgAtnmymE98MfWB0waGeJPdVHcha5sqmH9yyq9wZfOwB fA9nYkCAlffbdL3fwBWiQqswh7R+YVJdMj2DdzXEGqblmXgQ36ElwKkOXWgH5Ad+zuof b+K4K3p/nJpHj1iid7AgPo9XymLRsjZeTDQg8V78JcAcvFWS52XIZItFaH22furpGsTV H2Lwt6i23gUqUpROWi+s7F5bg5+RlFwZ2V0LBcyTckXhNuhalM2w5FC8MkvuNniZJdZh 3jMyKOcWKYTBtL0aiZHBEFEdMCYf04eSnVVyl2KylwKlbAPqDjRvT8kFzcHosYswVGCF UZ4Q== 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 y8-20020a17090aca8800b00233866f90e3si12081115pjt.125.2023.02.18.14.04.37; Sat, 18 Feb 2023 14:04:50 -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 S230365AbjBRWC7 (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230030AbjBRWCL (ORCPT ); Sat, 18 Feb 2023 17:02:11 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4342D12879; Sat, 18 Feb 2023 14:02:08 -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 E465B7A06EB; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:27 +0100 Message-Id: <20230218220138.5692-8-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208081659325329?= X-GMAIL-MSGID: =?utf-8?q?1758208081659325329?= 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 Sat Feb 18 22:01:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59042 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569792wrn; Sat, 18 Feb 2023 14:04:38 -0800 (PST) X-Google-Smtp-Source: AK7set9bwDy1S3h9IxFrq+a6vIf6eICLgld2rnGXypIAwNrbeXVR/N8C+onLeFoMQrVvnn2pxMqX X-Received: by 2002:a62:79d3:0:b0:5a9:4af:b05b with SMTP id u202-20020a6279d3000000b005a904afb05bmr5873222pfc.12.1676757878548; Sat, 18 Feb 2023 14:04:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757878; cv=none; d=google.com; s=arc-20160816; b=zzwN92A/1ROVUJ4DoRox/vUuSQOCD7ibc17Z1njT1mY80a35EVgJdzt1xuif/3Udcy 8ySfkLno+xFZe+XEn6ZC8+eMy7oz/nneA3gtQWZYMiUs5EnXpoqgeVS7/AKp5pHg8rB4 0vRo7h3bUVHHVhRw327tet7+Ex6rFOHrfJDTOLiJPq5RVhueEqVOP2CS8WiBthgFP5+C Lo667/9K0/HUwOg090pKDk0jAbFQ9UcpVWaNf+2d3T6Fgh7JUbX+CegqdLmjtkvXaAhT mQns+jHXUr7guhhD0zJkaUv/z7enCRCqEqm3Hx5J+jKp3riq7Xg0nm7nEMKMz97uCVaI oEeg== 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=M3SNbihhMJJ9MnZnDwfF9megwD2QNdgbs10Uf4s1TPEwrRIcPyCaiysqWxpOw19GmO zyx7EAvkCcNz5+VtvBM1AIpgZZDRRlV1gUnHyv9xxMB8k64LertRLkkvuwovt08/CKSC tfbuPkJBjrfqHnHqMIReze6PuWyyrZQLDj/88m7XHN18/vszaW3yzW5vDROwntx4FUNp RltQsGGxR9sXNS3FhQQkLy4a9H2CGESLf/ac7sDmIDoLyKBqvh5HjpNsvfs3k06AFC8P jz6qHCr6/UwuJ7JEO7Wtuxvt7kpndvK8rDjHIeepKr3VnzpquguntmOx1MvNw+uOC34F I+Xg== 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 p41-20020a056a000a2900b0058bbe6710absi9911179pfh.261.2023.02.18.14.04.26; Sat, 18 Feb 2023 14:04:38 -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 S230116AbjBRWCp (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbjBRWCS (ORCPT ); Sat, 18 Feb 2023 17:02:18 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 435791287A; Sat, 18 Feb 2023 14:02:08 -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 0F7F47A06EC; Sat, 18 Feb 2023 23:02: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 08/18] pata_parport: remove typedef struct PIA Date: Sat, 18 Feb 2023 23:01:28 +0100 Message-Id: <20230218220138.5692-9-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208069224976394?= X-GMAIL-MSGID: =?utf-8?q?1758208069224976394?= 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 Sat Feb 18 22:01:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59037 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569738wrn; Sat, 18 Feb 2023 14:04:31 -0800 (PST) X-Google-Smtp-Source: AK7set9i1GFdSz+8836DRLCQUgwkXAJAN39LiANTZnqVnknhY3a85WNE9hk142QpfsPG/7JBxUBk X-Received: by 2002:a05:6a21:99a2:b0:c7:166d:7d0 with SMTP id ve34-20020a056a2199a200b000c7166d07d0mr12305074pzb.23.1676757871497; Sat, 18 Feb 2023 14:04:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757871; cv=none; d=google.com; s=arc-20160816; b=DWhlJmA9M5UTSEsF3Sf7qovr+wLsDoUt1Cj8ipwRaT8sB6HYy5otnlR/9bFwH+2d8o of61QBhcXTjb4zdtRS5gLTgqLUA6iqp9GCwIEcomf9HTnwSOhgR9zC5cC4W04+lNs7cR Z68OqjAinK5far5gXlzSPBvrAwDsC31jkB0urE9zQeu3YJxXB5FuHYbr5Wf2xq/UEcXa +Cmwb/A4xY+jqV/SksL0JIyx+p7B1GBwRBaSdRQ0SK8nVzV4mFwQKF2ljH/vwLMHjDQu pAw0KsZ6AFHIcEbzT7CkuRApahUGpqSKaZXcN4ah9qb+x46u7NnLFLpWZLLBrUGjDzGm H8cw== 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=czJGnOnGPMFQ3+EcGVVqfbsQBr0Rmd9DV48oKysDBnPUKPEf2swuTre0fCu1oangKH RinbQZSD/Dkb855EEJCdwrkuB+U8BuuA+K6nOGlOZ8DOR3pk7yb9wKRt2dWBQchybwcQ WBtfd4MLU6DJQ91NXA8gODtFJae0bA0mdhZK+pDVhldmUJUFph4iUOBXkCKOKiSFksrH 2H8fDUG/722gtQf1Kn7JVUVGGWlZaQm1gK8hV5YgrAZwk3W237cyjvYNUlUiF6+v9+88 0iQKJ6N/zurazwihk78Zu2Cusfam3oZF+QZwcBvQuJyXNmvAfODI3lbFQO8SndUWmFyD Mt/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 r137-20020a632b8f000000b004fc25858c33si7209630pgr.506.2023.02.18.14.04.18; Sat, 18 Feb 2023 14:04:31 -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 S230306AbjBRWCf (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbjBRWCS (ORCPT ); Sat, 18 Feb 2023 17:02:18 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 20B2D12BC4; Sat, 18 Feb 2023 14:02:08 -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 3B5627A06F6; Sat, 18 Feb 2023 23:02: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 09/18] pata_parport: remove verbose parameter from log_adapter() Date: Sat, 18 Feb 2023 23:01:29 +0100 Message-Id: <20230218220138.5692-10-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208061551047954?= X-GMAIL-MSGID: =?utf-8?q?1758208061551047954?= 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 Sat Feb 18 22:01:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59039 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569744wrn; Sat, 18 Feb 2023 14:04:32 -0800 (PST) X-Google-Smtp-Source: AK7set+r/MT2vdbs+8xHmdarnpFLbCfYIYDFSRpbrLuHPvGHKlwIg+iWAShPtUBZMtkg1ae6edLN X-Received: by 2002:a05:6a20:8e28:b0:ac:82ff:9f9e with SMTP id y40-20020a056a208e2800b000ac82ff9f9emr6047478pzj.22.1676757872527; Sat, 18 Feb 2023 14:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757872; cv=none; d=google.com; s=arc-20160816; b=DO2BlZAHVCdxKQkG9/bNwkuBHa+fL3wPFKTFnwYYpphxWuPN+QVIux/ZFtFAw/LNOQ ARDZTT5RfUHpboyNJJSX2rXCmOJSwJd1V72f87S8qVBk69kYN6YQoDz1ympJpo0JDh2Z uaNpgBCEuIdrUm3PWGj8TyD/edhCfXwFQsbLyhs+UiNIWrA4PzU16nxDd9PuNMEeXLq0 kcTjw18KG5XbuT0r/0NiYtiomKeoMuSeDIRIjcWC1nQ0AyPsitpglteivC5DG+heP/Po 55jCgx/5xmlQQ6XduZbme3o+Hy8VHGQiBdV8Q+0P+3RVtgY3u8+Hebj7KxyKzK0zPzD9 8TRQ== 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=sRA/9YB9Gb89wIR12xY/PJ5v3W/adr66TOG9xzJp2oIePUrCF3SR0hs6Yu2uwXMOFt SIEdLNCGbKotVw05CxAz0nZJxRSiMtZLS6fwcbNVB7q033Uzr7ZgmtpywI3gLS2fXW+o BetRyt+9y78aoz7yXOgFYmt8aVD/ZXDqgmO8yoIYr3Gu39xm6EOhz67LBfcz4hZESs8l lMDXrV/Cjb9QQipRdOPIzz1waLgvHeuchQPoWfaDHAeMvRZ+cA7BIjJ+cIWhoLsk/Z2S qhpI8hRLB7Hk0Yw28hKvPyWHgvBUYJXnsjj4ofISL0CRKZb0T2cDAhvYhIs88brIL/rZ VceA== 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 r10-20020a63204a000000b004fb9504a5e7si8787339pgm.730.2023.02.18.14.04.17; Sat, 18 Feb 2023 14:04: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 S229733AbjBRWCc (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230051AbjBRWCL (ORCPT ); Sat, 18 Feb 2023 17:02:11 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 145CA12874; Sat, 18 Feb 2023 14:02:08 -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 4E8517A06F8; Sat, 18 Feb 2023 23:02: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 10/18] pata_parport: remove scratch parameter from log_adapter() Date: Sat, 18 Feb 2023 23:01:30 +0100 Message-Id: <20230218220138.5692-11-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208062747801579?= X-GMAIL-MSGID: =?utf-8?q?1758208062747801579?= 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 Sat Feb 18 22:01:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59044 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569820wrn; Sat, 18 Feb 2023 14:04:42 -0800 (PST) X-Google-Smtp-Source: AK7set8IHaGBOu0Os7+8GOjN34JOc/iPhTIzBOO/9aErj204WEJSFVKCZEOLBv8+C4zTksZY90dP X-Received: by 2002:a05:6a20:354c:b0:c6:7673:f384 with SMTP id f12-20020a056a20354c00b000c67673f384mr5130558pze.14.1676757882096; Sat, 18 Feb 2023 14:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757882; cv=none; d=google.com; s=arc-20160816; b=aQFZGvZnukT+vVvm6qWfLlsqCHIYvRwqwKbvb/6cXBI6dL0jJ2cjM3O0y3QpfDAM7/ 9odtPgTYK0qw2IbOtv3v4Vwxamwn02EtyI0ywIMZ8ud3SdRUghv1qiJaZI2gyGAR/3O4 PfpDe6jgLZv78wPdJ2kCcYdhJNzAoHHizd281VIk+9Ek4DBckzeZOMJEpc5/WhKleTJo bUSqwmRyvHaY+9Rz9iIjDzRJQ/npU5V0KG7aRU8kMfAvFribZVTpxJDuPIRyJV89fBmb lVMpDJyy5aTQ/pB+GgdjDHCUfrlo+FOOpu4IVsFqHL27OCjZhbGzWrL9GtWBIOPXbvC+ NO4w== 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=iVGLhy8T0afEhLPQPg0WFtz3xaWH+l8sWwOMCOV0w+I=; b=Gcl03Z9S/a/eNiTsY1RoKmzWvMYBNf/Yn6t7z4O9IPBpFQWTcmJINgH4nyLqULeGo+ c+R6kjvC4dSGXzjqVUSnSSGrQgduzccA4TKw6LcbjrYdQYO+xJpa4fte9FDcY3gB7Hwn d25gsdnz5wqyswV5nPMsycXoZUmHdrPFIEaa2MCE77MYmOlDaWIb0gMn5/ypzq6BFTJB l4fWwypOgtqg5G6gq8VVjRMrAuxTpOhD0yLSAdjtKeEULVDnQVKl52SQnUBexsa+wVbX u4wapGbc6YBhuhRzg1pH03GuRV8SSRwmPUbDHJ3O5gPZeAcB3a1aXqPtuUxEaNwx09LG aynA== 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 k18-20020a635612000000b004fbacaa1275si8926668pgb.272.2023.02.18.14.04.29; Sat, 18 Feb 2023 14:04:42 -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 S230096AbjBRWCx (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbjBRWCR (ORCPT ); Sat, 18 Feb 2023 17:02:17 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A5B3A12854; Sat, 18 Feb 2023 14:02:08 -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 6839F7A06FE; Sat, 18 Feb 2023 23:02: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 11/18] pata_parport: use dev_* instead of printk Date: Sat, 18 Feb 2023 23:01:31 +0100 Message-Id: <20230218220138.5692-12-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208073063744771?= X-GMAIL-MSGID: =?utf-8?q?1758208073063744771?= Use dev_info/dev_err/dev_dbg instead of printk. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- 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 Sat Feb 18 22:01:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59043 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569815wrn; Sat, 18 Feb 2023 14:04:40 -0800 (PST) X-Google-Smtp-Source: AK7set91vo1NFwQsIV0F4N1chIjV9wUkJpYdORz3lPPzsOnihj0BAzxSrMxcU3EGm1O9P5D/tX4f X-Received: by 2002:a05:6a20:aaa9:b0:c7:7c12:638c with SMTP id ck41-20020a056a20aaa900b000c77c12638cmr5317819pzb.51.1676757880614; Sat, 18 Feb 2023 14:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757880; cv=none; d=google.com; s=arc-20160816; b=Cz2raGb7/wnZJ7GlqecAD8uC8bA1JO23BFtez1qOHu3+dHZ4krayI+vRY8tRqcxPa4 xliZpVU3hpzaMjrdJ2nE0ZeZBr5g2JN67PALQ1ThlcktkbwGMfXnHes6YBUjyqY17nJv yIYjB/qsj0gvAwMrjOVtIBYm6OhMFfSOQ/jTQ006vVDC4D+oIW164Ln89O+6Ne8S+8B7 6NVp87+NHKn07M8H+Dq9VNhSJ/f3AGhD5zTg41aTuYrupRA+DHNkLXs5J5W2EZhwFkRv eRUOI67u3j8HQ8u1zT2A6AYUP2U8bk9KI9yhUko7h840i0aGwrMYvc26UzwA3D+UIOD/ Cczw== 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=sTUgHRfeb6F0bvYvyygEeRfoA5Cu4A+l5GtVp/Nm3s4=; b=H9wdYVjqFOuGtT5a8Uf7sV4W0GS5KJU38CFhv/Ffkgx5uQHy459MXx4J0KcQ3Ug/Hi jNiK2zZ/huUOYqPxHr5lFxVBcpJ7nvEz6hqyoxfdAn8iEAbE5jE/uVN9w5QNgfeGpqZZ 229FRz90XCoURCFeHlSObQzEeCgOFcERh8cwzFq0uvzms+4wk2p0zUhq49K5KLFIjaL7 a0F38yO3rHJ/2pjDlc2P1/oVAidaIArvfNb4ErbjilycNlJ8ngqCVRSzTmqlv52nyMWr 1tvPhyWhWcl0uElr/9w3k7pJNCJTSOgVlWBFQ8UVdrHCBkuPsMPXLGLwaPuuyTL8jrs7 aeEw== 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 d29-20020a631d1d000000b004e48198c1b0si8377282pgd.654.2023.02.18.14.04.28; Sat, 18 Feb 2023 14:04:40 -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 S229953AbjBRWCr (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbjBRWCR (ORCPT ); Sat, 18 Feb 2023 17:02:17 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1462212877; Sat, 18 Feb 2023 14:02:08 -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 844937A0708; Sat, 18 Feb 2023 23:02: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 12/18] pata_parport: use print_hex_* Date: Sat, 18 Feb 2023 23:01:32 +0100 Message-Id: <20230218220138.5692-13-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208071555979863?= X-GMAIL-MSGID: =?utf-8?q?1758208071555979863?= Use print_hex_* for debug dumps. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/bpck.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 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, From patchwork Sat Feb 18 22:01:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp570072wrn; Sat, 18 Feb 2023 14:05:17 -0800 (PST) X-Google-Smtp-Source: AK7set9oNapN7p6zwOA50TllfPFJJt1q5ReCbkXNDYD/YnPSjAC/r8bfjYjXCNJ0TpBXmm8q3O/Z X-Received: by 2002:a17:90b:4a0c:b0:234:bc98:359d with SMTP id kk12-20020a17090b4a0c00b00234bc98359dmr1348822pjb.47.1676757917432; Sat, 18 Feb 2023 14:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757917; cv=none; d=google.com; s=arc-20160816; b=Mi7HQIDC63T/Nf0CigJWAf2Oct2Li7mE0Tsu4WeoDMjq59CKqRUW9xsPof/Kc9lJiq RvSdSV4qVMFu1DPvZsce9htRZWN/djgyaBKSir0f+SzTn8UUyrLAQTrCSx5NP2zx3QnS jiA1Qa+NmUicCGTEW0U9KF80DFdmcr+LHz/+9/UAKzPiF4IzADSooaOSFZRDWDIbU0mc PGKH2Ifc1ElLbiE60JyFctkiwJW9ICNdP5Pne/rW8+iJSOk9rb0Oe4DTt19fs1evdi5+ dRpHpgmRo3C4bY9uMunWzK9oQTgXXHwFFPEstKtTCGImTWUyuThVi1C3khJzkWrYMIIU 8DJA== 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=x82inLbbbSm/aU8TfF2nLI7Aa67lcsBJXBCWAH7eGsg=; b=n9RqmhOT9jgcJnt8f55y3SOoKi3kAU+rJxtdzLQh+5VjYb5KF4ECGJ6wkZMvce/tOZ a0+1wj1LlsX4nobDHYNw/gOIadGmMRrpNRrBbAG4VybMXzJGTXZbBJef82hpwwcxkZfB EzyOQv3DKmNAS1bRpnSRYHjGcl7yAp92z6fj87+sx3Q0+8bBqxfoYWONs3de4wSPAbAX D1WcftLmWaeqbrUrjTCqE+fI+glIS5bgO/yuBAlXMtMH9klgKo/n2iFHdS9kMB5Tedho x1R1My2AaSZmFaGPK2tIZAEpnrR5xNxj46c95u+9hXmO1zjbCRGyMygTCtwuHQ2eO/AY c4qQ== 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 k2-20020a17090a9d8200b0023407ca5f33si4095084pjp.83.2023.02.18.14.05.05; Sat, 18 Feb 2023 14:05: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 S229441AbjBRWCv (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230096AbjBRWCR (ORCPT ); Sat, 18 Feb 2023 17:02:17 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2091C12BC1; Sat, 18 Feb 2023 14:02:08 -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 953547A0709; Sat, 18 Feb 2023 23:02: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 13/18] pata_parport: simplify log_adapter prints, remove VERSION defines Date: Sat, 18 Feb 2023 23:01:33 +0100 Message-Id: <20230218220138.5692-14-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208109857586502?= X-GMAIL-MSGID: =?utf-8?q?1758208109857586502?= Merge log_adapter prints to single one, remove version print and meaningless VERSION defines. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- 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 389faa6ae49d..12dd53a06dd0 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 48d12f56c501..1216763d0c6d 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 ec564e7cb930..ed05e6503147 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 5ea16a247257..c0d50e2ed57d 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 Sat Feb 18 22:01:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59040 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569764wrn; Sat, 18 Feb 2023 14:04:34 -0800 (PST) X-Google-Smtp-Source: AK7set9ia7ZpnuFUp1vtSgQukuY/Jka8JXOCLv7NYEefucd0snJ4aJCAmLQUIOyXx1lc6vGj/JAp X-Received: by 2002:a05:6a20:c524:b0:bc:b018:4341 with SMTP id gm36-20020a056a20c52400b000bcb0184341mr4751528pzb.7.1676757874289; Sat, 18 Feb 2023 14:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757874; cv=none; d=google.com; s=arc-20160816; b=cY+Dgn1+JPfwqiOZmGKmL8slepCjHNWJlzpc9XUWS2KfbL4KsW7cY6UfnYibIsZvVr MoNvFP1yStSZelMQk40TuQ17NYFlqWfDgVnjtaCBEYyUqabvpnm3UzeYJSgiKLRr7VdL 3U+YczgVx2+BZOwmbfSNB5EtuWfE850iOwcrOtKhNozgXDbMynDPcVw1hTFpZBFUefwN i8eKY1L59eI0p6l6UNNxguClia1h2UE03uiE1b01lV8KNnvQkrUIZHhG1Xo2qjr9tcAJ 79ki/dkyMDXMCA7IcZ0DrmdTL5/sJ3v9VkPLBt1INhWJ3/8A6vjayg59l8/m0qxK6T+h nyLg== 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=2PmbqHUmX3A12qnhARxxuA5ts9TV7jgqTCjyf3t085c=; b=JOKDLGQYBa+vWPkNk1qIv3bOj7/a9M755dt87sxSjzMoAmBewKwC6c3koGqg4NfSW1 Tau/6BhnLK7Qajvle7EuUmlrk/sF0CizhZac+tGUoXWB0fabWF8cCZw4W6Gkx/i7K8gg mBA+bVy5P02+zI0fy/HJr2VffRAEsKTsOOtooRfgo9dxgE0YEQSyOv4NhkfZkwnJ0B0r Sf1DdsJlyIKoZl5Vayk59iUKupjudqgV6agbq6ZZsnD5SYiKBSUmKYddTgx0Wio4ge2y zfJciyqCag1YJYoHLDt00eA9FdWg8FyJpwwNSzOTDZyH/aDu51fZltcuAPPx4A0I8fGU P8uw== 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 o128-20020a634186000000b004fb97a4c535si6243397pga.876.2023.02.18.14.04.21; Sat, 18 Feb 2023 14:04:34 -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 S230217AbjBRWCk (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjBRWCR (ORCPT ); Sat, 18 Feb 2023 17:02:17 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 20BDA12BC5; Sat, 18 Feb 2023 14:02:08 -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 B10C87A071B; Sat, 18 Feb 2023 23:02: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 14/18] pata_parport: remove bpck6 verbose parameter Date: Sat, 18 Feb 2023 23:01:34 +0100 Message-Id: <20230218220138.5692-15-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208064961324557?= X-GMAIL-MSGID: =?utf-8?q?1758208064961324557?= Remove now useless verbose parameter of bpck6 module. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- 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 Sat Feb 18 22:01:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59038 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569742wrn; Sat, 18 Feb 2023 14:04:32 -0800 (PST) X-Google-Smtp-Source: AK7set8VbP+FLLt7GlhafBXy0mY2ly6XJZD9AQsn8Zc/FCICsWnjUiDvJsRz2y0ZZiaC3eigj1n/ X-Received: by 2002:a05:6a20:3421:b0:be:8d91:cb92 with SMTP id i33-20020a056a20342100b000be8d91cb92mr5271813pzd.24.1676757872080; Sat, 18 Feb 2023 14:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757872; cv=none; d=google.com; s=arc-20160816; b=q85qOOoacdJ5mVr70glIJUGXgf/kvTpxrvxQIuko+W+PEl4B6WCwaSkrTC/rvGEEMg U4Pvk2QaQ+rY8YgAK0RJCbEQu8MXAjEw8Yale4567PXwfMC3Ws7Xcec8hKLDh1R7pjW+ MFJY4LdqjTfeOrJKT82k2wTA5JWfvYYd6vPzTMTb0ZK4xAM9Rk95JDcT2eIjFkgVpgxZ 78VtIMQPf6/nHj3hqO0spQVcHLqjhX9+YDVytt5lE9xtJSu69sMvhCwWNpQtUMhPBELU YM8NOhLhX+8363G247DdMNV3BLoH1sC+RwN7yLqlbeNebbwfHClfyi0XBU04eBUzw9Kg Z84g== 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=8CPxa2uDe9SrdrvTrz38u9QxISNWhKyXHO36854its4=; b=qpXTkluW55MSPsawvlSopi+POkcWwZO2JzIHi165ujVEHQbe9IK8DV5fQuETbUYqq2 MES+BmXvt3AI7QgHX+Tz8+i0HSnS2aVVVwYSo3F6BTz8Pftla+nNq77YMkfidVMSNiCe 3XIskvrLmZ6BHxbNCGa5vQ3BTOflncp7JMdkt1QEyDBhE4Usl3CVFHbAAsxkMP03MAOi oFibse9ifen3UW2kSr3fZMK4oox5f3At+NHq2vhB1dgIrxU6duAtHdwrKJtoKBeLQmc2 d7IrDKfvriYUpkiaLtnLDdIznPrV0pRxtTUrn53bCVtMSyyPoKl9pxUZFcXUAtEAH+PZ YfbQ== 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 s69-20020a637748000000b004fbbb35999dsi8934365pgc.832.2023.02.18.14.04.19; Sat, 18 Feb 2023 14:04: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 S230317AbjBRWCh (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbjBRWCS (ORCPT ); Sat, 18 Feb 2023 17:02:18 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 329A912BCE; Sat, 18 Feb 2023 14:02:10 -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 C760A7A071E; Sat, 18 Feb 2023 23:02: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 15/18] pata_parport: remove verbose parameter from test_proto() Date: Sat, 18 Feb 2023 23:01:35 +0100 Message-Id: <20230218220138.5692-16-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208062311069368?= X-GMAIL-MSGID: =?utf-8?q?1758208062311069368?= verbose parameter of test_proto() is now unused, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- 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 12dd53a06dd0..4877b39ed04c 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 1216763d0c6d..e7401351463a 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 ed05e6503147..df15b210f355 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 c0d50e2ed57d..0d4e84806350 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 Sat Feb 18 22:01:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59041 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569782wrn; Sat, 18 Feb 2023 14:04:38 -0800 (PST) X-Google-Smtp-Source: AK7set9zMHib9B5gwT0H3gWohnXoitxshvrAApDX0qrR3B/u/+41F/3xKzmfm3J/bewV005GmmAX X-Received: by 2002:a05:6a20:a007:b0:b6:597f:66a1 with SMTP id p7-20020a056a20a00700b000b6597f66a1mr3809569pzj.60.1676757877864; Sat, 18 Feb 2023 14:04:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757877; cv=none; d=google.com; s=arc-20160816; b=GkRxwnBYB/EONlvjwU5yofof64Fo2UHemM6eJOZW/VusDGO4au1k7e5/1DWh1TX9kb ESAgF0YlZVslCdH4J2mTS/Rkqk0WPGp/MYxx8MIY10tJ2wORWXIVpUM0LBYk9IKC3WIA vd4Lu7kOPhXJ2E+S6wbbYPj/SyMMX6osbaUk91v/IBOLs7caJZksHUsROTGHKFwYA9us sgOXUd1oBGet/3r4v1VtbbSrDVtL3Ds4pyuK9u/cHQkI2qL1LaN6JXNBuXyApRjpYBfR eVWUnILrCTIc5BQxtN/aYaUgNHMMY4QH6XJPETiJQIiw7F5B1eMPvFxr7WU125DzRQpq 949A== 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=U3HCiBl3Cisz+dPUfsgmfQRWXnyPRXivKPTQoZtZb4g=; b=lEecRn2o1JvzbkNF7Xtd9pp5tPxqIP5bJsDUkxYaperoNo4w0t63muHwpXiNATOzHt aU63dZyKO3JQREzw8XERCYFJymBnn+4jZBD94qf+a6wBOZsu+g3uHFlnf5iUxYSLZib4 Tmc5rFEg6Cfk77q+3X72yCMUqn3ucjmKqAI1B4TMn8PjLYehvB4deV/EH4vpu6cOd0y2 hO+B/eyf/TO9NQaCHiYR4td0WSOxH56ToKqAZtazb0rfUP+j+LgMI4hbeqfCa4f9gjtj ZzcNnR21INcIOywE9zplaWul3Gz+7cTylEHwrDaV5RQnBtheOHVVuFgk31YvaH5i/vCB jgtw== 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 h126-20020a636c84000000b004fadb547d10si9125296pgc.379.2023.02.18.14.04.25; Sat, 18 Feb 2023 14:04:37 -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 S230053AbjBRWCn (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbjBRWCS (ORCPT ); Sat, 18 Feb 2023 17:02:18 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 91E3F12BD2; Sat, 18 Feb 2023 14:02:10 -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 E04D87A0728; Sat, 18 Feb 2023 23:02: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 16/18] pata_parport: remove scratch parameter from test_proto() Date: Sat, 18 Feb 2023 23:01:36 +0100 Message-Id: <20230218220138.5692-17-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208068883959321?= X-GMAIL-MSGID: =?utf-8?q?1758208068883959321?= 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 4877b39ed04c..609614b2c69e 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 e7401351463a..970532619aeb 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 df15b210f355..1888e8bcb884 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 0d4e84806350..484b5b9d31eb 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 Sat Feb 18 22:01: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: 59048 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569997wrn; Sat, 18 Feb 2023 14:05:07 -0800 (PST) X-Google-Smtp-Source: AK7set9GvhzDigCf8aAZa8FDNlrIohhmjXwGCRCdxvdDDbG1NAGLu1xSmMJil2XmY/PnU3XHCgP1 X-Received: by 2002:a17:902:cec6:b0:198:adc4:229d with SMTP id d6-20020a170902cec600b00198adc4229dmr1717953plg.24.1676757906772; Sat, 18 Feb 2023 14:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757906; cv=none; d=google.com; s=arc-20160816; b=udCGX4yp/0l9c3u0ZQQfpUbOYD6juzAGBYD1vstVth7xR5g6XOOD99hYRbpowDk5pE S1XlUpQUdWnmhuLstMBOHbuUbdXpbRXg25WHjdW6zVrSiZ1z/21eEnVr1ielWGNd91Fh s+Oc0xS4zU4YFXIEt2HVEozlo3VUW6RNOG6Ggba9yQbD4xAtpR6b2nVN7C+hi0O23E4s BPI+Gqv2DnfBySqUbM818kR2dtEiRoCIOAswwlZ5LHCVt4Btm/gwF7UwXKLJM3ab1PWn rgxjOoVVt75rw2M8ZGbQJqwBkre/GxtcIsi+qSGkpOunJUtet5jc5KU7pH8OoNMiB2Th 7u7A== 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=pTX9mRfiomkNj4AQv0GV413xKe5oUC8I8pvFw0AS6CQ=; b=ztzI+pbh0WM2Q42fl9eFTdVB+sycaXNtLLI2mAP+26ylSL6TtWsJAgWBuiMzRhogFB corFEcG11IViS70pLwKSxaECD2xSw065XTiVPqhJ3g3a4C3ft0VvmE+t3cvFlnlU5vnn rbDidN0CR8EV/rwiRbh08Ia/GXd3wblohJ6u4gxsyXZ/GoRb1vussTZR24QHAw/IAceJ 4JXlKJqRazpY+FO94KWcUFfzdaNGV3wVl5H67w9lvKW4kVjXkPoK/tgPZMrO/se6wwS9 4gzz5RRZ7hHq9RdOeGq5R8iNmHHRqdn8J0BN9yut5zItQV3gc3s/zxucPg6CkMja2kTG H16w== 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 i15-20020a17090332cf00b0019ab98780e9si289220plr.258.2023.02.18.14.04.54; Sat, 18 Feb 2023 14:05:06 -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 S230357AbjBRWC5 (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjBRWCS (ORCPT ); Sat, 18 Feb 2023 17:02:18 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 546EF12BE1; Sat, 18 Feb 2023 14:02: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 03CFA7A072D; Sat, 18 Feb 2023 23:02: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 17/18] pata_parport: remove obsolete changelogs Date: Sat, 18 Feb 2023 23:01:37 +0100 Message-Id: <20230218220138.5692-18-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208098739672871?= X-GMAIL-MSGID: =?utf-8?q?1758208098739672871?= 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 609614b2c69e..0315f98326f8 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 970532619aeb..77869639773d 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 1888e8bcb884..8883b3c509cc 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 484b5b9d31eb..1ef8be79d793 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 Sat Feb 18 22:01: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: 59047 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569912wrn; Sat, 18 Feb 2023 14:04:52 -0800 (PST) X-Google-Smtp-Source: AK7set94WM9u3d87m+gH3GtgzUqUX8Q9EtkYK18aFL9AFLKEQI4nsWU03ILpPEN9JYrvDmzR9gHx X-Received: by 2002:a17:902:da86:b0:19a:f02c:a06d with SMTP id j6-20020a170902da8600b0019af02ca06dmr4147764plx.29.1676757892314; Sat, 18 Feb 2023 14:04:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757892; cv=none; d=google.com; s=arc-20160816; b=RjqhQ6RvxiRQecQ726DNIjVgBSLHo05KAC9MusHf4/SamsTmBD4sct7ZqSUS1hYpjL nPmBnQ/5OpljtQsz30v4sw8jDZIbzoX0Rvs4RRiqaOLrDR6H1O1oM49NIBwCoWZMxwJy UJ8uTq0njjdAexE3qEguqpOj8hsAOe/Htkg1m5KOq2rGUt+vGi3xOXQK5+zn6WyZ2fsQ Ai6X1JYdivkf8YQ/FJPSgY4XhH7Fho55rKQ+Ie05OMPBlMjZME4uGaY/3Fqa/KwlKL3C 31PlieNYF3Q1Jsp0vzNmybEjQobHhw0/YXYK6jocL4lq64Msailj/ugT8s/1VGcCLzXt PtXg== 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=IRliRIPBIbwUf4YkJK28gHu9fmCAELQ8dhcppOTNLAQ=; b=r8Sxbz7WtNWLt4JzMGIeAIIR3cqSCOAh6jQuJg5nHogESkl87tw4WzWkqTdk31967f ENotQSFMCPnWsuHOCAZdyqMrFLSHuoE6h8cVdGWYZJAqtULYmxVKePkmaXl3Z7gDxeum sLdKL2kRXc0EeoF3xk/TAPwYqyFbk2Z2Z6gFOcGVhutShSXt2nuxEsNreUmlB+zkjLQW l/igg7svLwKPIN3A9IKp+Wh4+UuVhzVjR3MxRPUjXnTXTaic9T92uMPXctpo+C9fmgjs pN9SFweo8KvtVdFQt427wS9BAaIzulS3pgjeTFgxM6LsrB8SUxDjyognoaAGqwkAJgg5 IyxA== 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 q7-20020a17090311c700b001967580f60bsi4998769plh.259.2023.02.18.14.04.39; Sat, 18 Feb 2023 14:04:52 -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 S230113AbjBRWDD (ORCPT + 99 others); Sat, 18 Feb 2023 17:03:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230149AbjBRWCT (ORCPT ); Sat, 18 Feb 2023 17:02:19 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0552212BDD; Sat, 18 Feb 2023 14:02:10 -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 230B57A0731; Sat, 18 Feb 2023 23:02: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 18/18] pata_parport: move pata_parport.h to drivers/ata/pata_parport Date: Sat, 18 Feb 2023 23:01:38 +0100 Message-Id: <20230218220138.5692-19-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208083930499000?= X-GMAIL-MSGID: =?utf-8?q?1758208083930499000?= 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 0315f98326f8..b146999368ae 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 77869639773d..f6db2f79fe99 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 8883b3c509cc..1647264cd9a8 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 1ef8be79d793..3ec0abf16fa6 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