From patchwork Tue Feb 14 22:59:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57253 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3244867wrn; Tue, 14 Feb 2023 15:01:08 -0800 (PST) X-Google-Smtp-Source: AK7set+lobBG6DVUrtQbk1w4/LunUvVaGN2903k/hO+fncJrTc8PQzX5b6KcxzGjhKdXOzovjNwO X-Received: by 2002:a05:6402:18e:b0:4ab:4011:ff3d with SMTP id r14-20020a056402018e00b004ab4011ff3dmr32970edv.0.1676415667899; Tue, 14 Feb 2023 15:01:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415667; cv=none; d=google.com; s=arc-20160816; b=ecLXuORyyAhDjPU90OL6rtTMtADIViv4dhWSe9WQFpxGfYXQQRUqe4pepFYieNE1NJ 5wrC4fTybEXA2BAhXhDPwcIqJvsMCnJZFJC6pOZoLIcFtSocmFWKeHhQ7NBEjJFTs7KH cYHEIup613hGV3Xa/XXv6nMbiNqaQSXfboNbhoJAx0QmbhHYVlimM/tIHgYsSETlTOR8 KrQby2irW5s5P//MSWM4pZDyxHMZT50ojpFeRPMb7PHn8sUxfYDB5OU7NKyQ1EGINEEA SrdzUv3WH2jsfYp8o+HaAEfBCTFAVPFrwKhuAMs/6GgrzRhPcKFjNodv1FYvPpcXg+Tp jqKA== 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=jFU/VYOSdrgIL3m7HQfKKQ4RkoO4isQBcZ/3v8GgFt0=; b=bf0kRTRwaxs+wxeKkyFhxyZQD0vJq+zX1uPVoCYlMkGeVAsdAt9tvIgKBIbU1vkwwk tKWgdUD30FsIF/OlC/Dh1ixKgkDYL3vJT3f9mokbMnwyhSOmUq0amJpgO8Rs2copqzNj mNA5QdUh+LxonyJyWiBo+cSwfdhUcdbgmuqgiCHw4LIE25Z26E5eja4twIvf4bhL4lHx xiVQMhw0PWbb9J9FxxP4BjmgG9TSBmCT4et3I337JGyiXKWcC5S+nIqfeI3HwhS71QSS mZ28Lkidz6sefQN5Itn/r94EBKhgzEAy6dYl4GvzzERhSUZ/DYTiv83KMd75zyFggIhe QoBA== 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 u3-20020a056402064300b004acbe551443si11247995edx.139.2023.02.14.15.00.43; Tue, 14 Feb 2023 15:01:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232267AbjBNXA0 (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbjBNXAY (ORCPT ); Tue, 14 Feb 2023 18:00:24 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ADA0C29161; Tue, 14 Feb 2023 15:00:21 -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 EF34E7A0401; Wed, 15 Feb 2023 00:00:18 +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: Tue, 14 Feb 2023 23:59:53 +0100 Message-Id: <20230214230010.20318-2-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849235504582358?= X-GMAIL-MSGID: =?utf-8?q?1757849235504582358?= CONFIG_PARIDE_EPATC8 was renamed to CONFIG_PATA_PARPORT_EPATC8 but epat.c was not updated to reflect that. Update it. Signed-off-by: Ondrej Zary Reported-by: Sergey Shtylyov Reviewed-by: Sergey Shtylyov --- 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 Tue Feb 14 22:59:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3244916wrn; Tue, 14 Feb 2023 15:01:12 -0800 (PST) X-Google-Smtp-Source: AK7set+TpPcxtdM0wRXb4ZEUGgRbDxiFUIdMRIEIRY23A6kdBMseJRuSF4496510fnedx/yo4qEJ X-Received: by 2002:a50:cc93:0:b0:4ac:b69a:2f0b with SMTP id q19-20020a50cc93000000b004acb69a2f0bmr4252474edi.33.1676415672292; Tue, 14 Feb 2023 15:01:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415672; cv=none; d=google.com; s=arc-20160816; b=HxIdgdfiAqcwY1uLkBn5j9bU/w9oDBfauAqDgpRCDApLcSibZCkLy2S/WHJWNOpJ27 +b28uXHOoG88N+FJHUldcId6df5go4CV2ibJXlYlQ1RlZ0RHVB783hB0VlTKqr30QS2J Ub/gzdPkAJhw9kH6ob5vy+mZjNhDZBv36yyoev2AaApVgW/t5ID1VuZq4sZxZ8seK5i0 ESDS+ZiXWXfaXeNPYQoSRRTP7jpNBWjgTAFjRaEgeah5KtCjQ2R0DAw72C9xKNp7A12y KOWU7KSaPOGCLGyjtyd/pgYBn5lpW4cvymlGGcsWou2QTfc3NV2mi8VPQrud51jcVIef QD+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kRiDqyVYAQ8H4eh1cAVCq8bgBhdu++B/LxbJiZhyjJ8=; b=lR5qI9d9hK/ll8rEwUvXJ2FXfuD9CnZJxpfFOznxrb1cJuCT0oEitw5Dq1MNgxdm53 fzKPZIWnxJ7t1L1QW6AOhkv6oF+cpFBqvhZUWu7ZzrAjmmSjn55wICqHFTXBzSB30n69 AWqVJHNJZkchJdBM/SLCF3VmK0NB4pz8gqsS7j51/w/aVnqmLS+2HRv3ORc2P1CERUhG BlSovK2d9UaGjjaert17qN6LvX6B/jBgwTnIqN2WOXw8jLXg4RDFXTiuvqGa4YEcppFU oqnCV3wT3TWVVPcH8K3vTsVfixogAE7G0uTjaRpHh7CAZXN2qEWLoFbqRaEK1bj5+DgT oO/w== 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 w6-20020aa7da46000000b004acc6686feasi8110712eds.325.2023.02.14.15.00.48; Tue, 14 Feb 2023 15:01:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232429AbjBNXAa (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbjBNXAY (ORCPT ); Tue, 14 Feb 2023 18:00:24 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C22F029173; Tue, 14 Feb 2023 15:00:21 -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 13F397A0533; Wed, 15 Feb 2023 00:00:19 +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: Tue, 14 Feb 2023 23:59:54 +0100 Message-Id: <20230214230010.20318-3-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849239690374920?= X-GMAIL-MSGID: =?utf-8?q?1757849239690374920?= Only unit 0 is probed after registering a protocol driver or attaching a new parport. This causes bpck and bpck6 devices to be not detected automatically. Probe all units just like in manual device creation (using sysfs). Signed-off-by: Ondrej Zary --- 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 Tue Feb 14 22:59:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57256 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3245055wrn; Tue, 14 Feb 2023 15:01:23 -0800 (PST) X-Google-Smtp-Source: AK7set92XYn3xtTTgnlRcHrpBDiqzAlKpnv0E+GUpiuL2Cm+QsSghy+/PHyt3sAi/JYd8u8Eyqi/ X-Received: by 2002:a50:d49d:0:b0:4ac:b9c0:77a6 with SMTP id s29-20020a50d49d000000b004acb9c077a6mr3804207edi.15.1676415683600; Tue, 14 Feb 2023 15:01:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415683; cv=none; d=google.com; s=arc-20160816; b=AsmJUaO472W3mr2HdlFfzgSlRB8ZxRXArYc4OyNjJeYrk0OXZv1ZtgQ7oU+If2z/k0 oQSpssf4ud5Ip9V5q3S/ShzrGAQrkFlGprvHbdf3Tiy+xwC69aUE5C5A2kt2f4J3tfRG dZCfDmFAzExNN+1EHEqnTuyMYC38rDFO1vvYFbNB/af2cM8bo+YqqfYP2V6I2m5/gf64 UuEaT5vnaL3HgSjjpmDpz1oDbHHuId3EKy2bvIftFULBStpqM0W1u7hJ+ahxhA6fCCGX uzip78apVcxbegSbhi2vmhD0CkF5n3rPw35A3f+ueSlDh1yYdYn3DyTqOWDLNtTXiX/V ovlg== 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=c/xEGshxjobS27f0p9VTv+3lbw8ecTuqpEUlVJq97Oo=; b=pSHWOwcMPqJM/BD2sTCaTNFj54ekAIoDAadTqVZcAc6jOS434Mn+3w0kIhzwmmKzDl qSxDVdThsO/lOzapj2gmel6gS54mt3TKPjjlHtN5RyV+5/iD54Gau/PXXnutYim+dexg /yUq4tfQ6i5khnfaDUYpRXorad8qwJZtp7+kDO2NssaJi6hcXg1K4WNvF4tSDB956c3z JRm3GUagmIPscFg6/TJ3FToNRK2fXH9wImmSR6FhJroSQaQQsyU3ZeTif6qmoW4OCEGu OvM1OCnmCwyZIfC3HTn9K0OmID0POuhGdYl1GIevKszo6m/Xhg2K+GArB6PexqqZWCWz ybUw== 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 s8-20020a056402164800b004ab4c2ecd9csi14693036edx.310.2023.02.14.15.00.58; Tue, 14 Feb 2023 15:01:23 -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 S232578AbjBNXAg (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232100AbjBNXAZ (ORCPT ); Tue, 14 Feb 2023 18:00:25 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC3C2298C1; Tue, 14 Feb 2023 15:00:21 -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 337CF7A058D; Wed, 15 Feb 2023 00:00:19 +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: Tue, 14 Feb 2023 23:59:55 +0100 Message-Id: <20230214230010.20318-4-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849251733831610?= X-GMAIL-MSGID: =?utf-8?q?1757849251733831610?= Convert comm and kbic drivers to use standard swab16. Remove pi_swab16 and pi_swab32. 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 Tue Feb 14 22:59:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57257 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3245108wrn; Tue, 14 Feb 2023 15:01:27 -0800 (PST) X-Google-Smtp-Source: AK7set/XP1KWN1GWQBTPp7QZW70q7iR91OBbdnyD5/8yw02ZRtb7fM/+zaB4ZTL1+owJmQcFBnAZ X-Received: by 2002:a17:907:1116:b0:8aa:9a03:356a with SMTP id qu22-20020a170907111600b008aa9a03356amr103113ejb.49.1676415687456; Tue, 14 Feb 2023 15:01:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415687; cv=none; d=google.com; s=arc-20160816; b=gImsInTuRi5nDngM5GTGxTOON8RCePtlsppjCcwtzdvVTfu50IEZC9lG3Ux2FxIejm 7KDSCAwC6KbJuNtGHpe/2+64sfCF7ORyZ7sDj8XheKcA3G1Q+1sOzES1/VEAbh3EsyRj 7iOLbFx6kE+pRZX0MczqJJSRfSehrJj8SxzJ5sxF917PcaF9s2nO3w3bdBRBVLZ93oUM 44HdnEdHXeU24YbB85hmNvq/KZOc4hn1tZDtNyNHjC0opHOdsJVmY79cqrSEIhKd0TZg S3rBxcQjMdJnIa9UH+cFdK3vLAep4JyyXfkMvU5wda28feIXk/OMq0hvVpHIputHbwmz fbTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=saTclBulbgfzPqXErdscvzTEkk2/6XiEMCfPh+oWCJo=; b=aew5tkMNxM1aAJdotLnOHZO8jxlDhxDi0OSm93oE7L/+iUO4mn9P/i+D5fmJQzKPB4 VriYm+3l6oYBb5XUjwtk2MmDNZmzZMW5NhKJdEqzDToxl4Gz+VVS/VvWPXb4xC+gbvAq toe2owKr2oSCcrma500KtFtaB5+Um0t/rPXg9eNvdIjNgLTHaXmajEeq8HalssJOxXSC cZZ2rWlNDIVghf0MDUGfl+B1V9YxLx0CBRnWm6E7KoKjWM7dSoMRKwdbtvdGsQPJ6nPA obdiPKmlGBLamAO2tSe27m2wK39VfT7vDdqwDUUQ5rgbAYDRL/LxTsB8T1wmvUjDRahI RH4Q== 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 p14-20020a170907910e00b00888161349dcsi16095706ejq.664.2023.02.14.15.01.01; Tue, 14 Feb 2023 15:01:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232664AbjBNXAj (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232192AbjBNXAZ (ORCPT ); Tue, 14 Feb 2023 18:00:25 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC14329419; Tue, 14 Feb 2023 15:00:21 -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 5B7177A0596; Wed, 15 Feb 2023 00:00:19 +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: Tue, 14 Feb 2023 23:59:56 +0100 Message-Id: <20230214230010.20318-5-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849255777749281?= X-GMAIL-MSGID: =?utf-8?q?1757849255777749281?= bpck6 prints some useless messages on module_init. Remove them. 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 Tue Feb 14 22:59:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57261 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3245702wrn; Tue, 14 Feb 2023 15:02:28 -0800 (PST) X-Google-Smtp-Source: AK7set+6MOaYAfa+mlWm594u5+ZtGIFvuUO+qzNrCjcr6MrDllqZiLokLmeudhNk2J9K0Tb1UqBT X-Received: by 2002:aa7:cf04:0:b0:4ac:b8eb:e398 with SMTP id a4-20020aa7cf04000000b004acb8ebe398mr13863edy.6.1676415748102; Tue, 14 Feb 2023 15:02:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415748; cv=none; d=google.com; s=arc-20160816; b=AxkYCrTty9UZPFJOgM4YIiGCt/ECRIOdUGNZnvG+QG7lsRjqMtgzYQMCpls1nSO506 btcV7V79aiDJCjYOyI58ko75PLtSXlmL5DXDWllzLL6R9ngptpraOBm5G/2+2DvNKuzj A9XG6rEw2iBj2GDXQ31yCbqXu05A6x2Rf9HDLeYs8DFV4frySETrZBvf6ZsdhriFs3Rb 7nMIN85qzcffp2tMeC3prxdWXbGYhqVT55qipZN2kqNUbhierEZSJaqBuM9WQDcBc3QX Drb/+cuZEcgSN/SWYr/S/DuiRn1Gcqh7StAoogt6csEeCKkCwNtbSJrTHf08D0vcMUfi 9dPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5JNSi9b3ny8T84od/jhSxkdPc2PVg/a0OoLb7/a7UbA=; b=rJtZthDXKh/r5sMDlfwT6R50LSJhfpbLFuH1nHbWKk29l17LuQ2znjRBoEngqlDVOk J1PVROF1FRRW8CTWkIOPhs15prhxrMCVm0CesbSE3YOX3zLLJF7s98enT9DzQIIOtJeq H66wm7q/6B5wLTinvWwndhO28SlH044Qtb9raOw+irEwb/lxhFwXA1a3h17L5KFGPhuQ jWiZ2NiPhcAlYAO6/fF1fVO9iIoNmdtzpJQh6BESr11WFn8AWSOh35Y17T4V0BEogywG gIBhdqYyw9mQ+9zAg49y1JsTf00cB5Vm5lWMnKsOOK144wIaVgpwbISk6mYyRF1cdz3R pe5g== 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 l18-20020a056402029200b004acef3d53b7si775902edv.269.2023.02.14.15.02.03; Tue, 14 Feb 2023 15:02:28 -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 S232953AbjBNXA4 (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232531AbjBNXAc (ORCPT ); Tue, 14 Feb 2023 18:00:32 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B8F82A9B0; Tue, 14 Feb 2023 15:00:24 -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 6CD157A05F1; Wed, 15 Feb 2023 00:00:19 +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: Tue, 14 Feb 2023 23:59:57 +0100 Message-Id: <20230214230010.20318-6-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849319335728946?= X-GMAIL-MSGID: =?utf-8?q?1757849319335728946?= Introduce module_pata_parport_driver macro and use it in protocol drivers to reduce boilerplate code. Remove paride_(un)register compatibility defines. Signed-off-by: Ondrej Zary --- 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 Tue Feb 14 22:59:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57258 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3245221wrn; Tue, 14 Feb 2023 15:01:39 -0800 (PST) X-Google-Smtp-Source: AK7set/OGw8b/I77/7w+YWnF+H/dj01dV2VRFX72drIpVjpZlu9x7GF8WYAf/+ElpcwKX6eIoauy X-Received: by 2002:a17:907:11dd:b0:879:bff:55c with SMTP id va29-20020a17090711dd00b008790bff055cmr160806ejb.1.1676415699763; Tue, 14 Feb 2023 15:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415699; cv=none; d=google.com; s=arc-20160816; b=ASPwtQSNrDqK3lUQDvkjl7tScukTu9FJNxzQc7A+w7fVHWrO1nuF2l8+kVtUSEJlAp BpoDrjIo47XaOqX8dMRThNTAhv/OEn9F1rrzyCuaDqB9A6fCL7s8e6i8Ru/OMZjy9M43 MKs+ExmhfOjOrnVDmzJ2kkLrMPqhlGc2elD51DohIleUBdbPCsrI36H9STsL2b5fv7g/ 3P1oZua9MPQaL/SIxKPTI6uBK7UFRylZw1i6NXi3HqCX6gSMHeXpNaKavDLJISDKoPOk pm+0h5rXG5A9dauM32eMRa9N/c5onZfXTFZpYWFFUwMfbLCZ4DE0CSGGadcYCCR6FmSW JN0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LPK+T+mK5rsIXbeHCKvYS/sdYiS3NMkWiGYJC9DXm5c=; b=yTKtw72oYM2RmrtADM0oZ1eJSCbhR9QFWeN565YF2KloONkenSIg5cNAOnP3WuK7Ba bdIplDmlEoLunoQrivVftS8aF2/NtvwJ7GPAEaDwokv2oAEgXFIWlllWNpyrm4DIQFd1 FobYw8PTXr+3fV/4HXf65j3laY1dyy8GwJwvcYE3tiZbpvRpqaSsPq8Z85I+zGDVtdsO e2YszGK5BrZpnk6sHrHpvALJvLHvLUcderkJOXsjTBPii+sS8/7/SDEl62SHx9p4LtJr TkW73X2cImQPOnt7f5vMJGhvGl2E8YRj0s7CAlHSKMw/aTaOjqe2bqXBngv0793A8y2N WC5A== 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 o2-20020aa7c502000000b004acd30eabb3si5335089edq.69.2023.02.14.15.01.08; Tue, 14 Feb 2023 15:01:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232733AbjBNXAm (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232349AbjBNXA1 (ORCPT ); Tue, 14 Feb 2023 18:00:27 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B635298F2; Tue, 14 Feb 2023 15:00:24 -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 935FD7A05F3; Wed, 15 Feb 2023 00:00:19 +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: Tue, 14 Feb 2023 23:59:58 +0100 Message-Id: <20230214230010.20318-7-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849268738266517?= X-GMAIL-MSGID: =?utf-8?q?1757849268738266517?= Only bpck driver uses devtype but it never gets set in pata_parport. Remove it. As most bpck devices are CD-ROMs, always run the code that depends on devtype == PI_PCD. Signed-off-by: Ondrej Zary --- 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 Tue Feb 14 22:59:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57259 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3245320wrn; Tue, 14 Feb 2023 15:01:48 -0800 (PST) X-Google-Smtp-Source: AK7set8Urw9J1xI3K3/6JMAgvW0Zos1QG4cBw11790rjpJw8F6EEF5PQeo1QsEWFTiDb6htCeVVg X-Received: by 2002:a17:906:a290:b0:88c:780c:770e with SMTP id i16-20020a170906a29000b0088c780c770emr136725ejz.32.1676415708439; Tue, 14 Feb 2023 15:01:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415708; cv=none; d=google.com; s=arc-20160816; b=bMWxr2OtgARd9Zx6p9mbZQoi2jjzU4GNiBUa/eLcsmqyv/nde2xB7XlQBVmmOuJbxm Y8rrpfIsKDxIMQVg+Uv/lQuNLk0FcAc9EIJ2/myZoP0CWcLJRu3u4vkDwxvqlRm4nhAV L8NKwRhFaRs3ymIYBifhd1zeBxlWn17gxFnkz7VKJG0v8lQddthn+jTEZlnvRRywfDyv wq1rO+IOaEHnp0W8g82khsPraRd4W2UtjYJS8MBDTJvJaFHqbkUwj8RBJnuFxRxYe18H Q4mIw3o3b/uv32pjMUOT+OMxKCy4fgROevNM57F8/DaUOrbZ0SAD6bItfz0iLWRKt2mW Bxcg== 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=d+MiyRLsUFPeMA/Jpuf9hdBfgahH9TZNpEOtUqmgNxE=; b=LPDMYNMs/ZrhN5d5PBGSSnyHnA36cRfKDHBzXInvhgGOYK6xVtvsFBeWKuEP96CX6e YCGBdj8Ed+GVeMgb5tCBiXDSXBDD78GjMRF4VZfiwnG5JxoNWYEa+keKQXw92QLjI/qp 6NOZ/8gEEzXDW8nXLyieoG4vuRB84QaEveQeW61/0KBBcKEekxXeUYmWf0lIdBcFmw5r 7yfnGbR2U/+ETY+I/lQ0yGK0iZ4ykuYNN7SBDsEIvJdCS6kh1dB4iTli/dHzGIqj8blv dTaCku0gm3cJk+QZ9+/odVFEicSx5BZS9UnyLzOR62eyx9zUqx/NqSTD1eKJkJZaNp5m 3ulg== 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 fe17-20020a1709072a5100b008af4362e990si14823453ejc.915.2023.02.14.15.01.24; Tue, 14 Feb 2023 15:01:48 -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 S232791AbjBNXAr (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232402AbjBNXA2 (ORCPT ); Tue, 14 Feb 2023 18:00:28 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 47F6329173; Tue, 14 Feb 2023 15:00:24 -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 A86E47A06EB; Wed, 15 Feb 2023 00:00:19 +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: Tue, 14 Feb 2023 23:59:59 +0100 Message-Id: <20230214230010.20318-8-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849278111993901?= X-GMAIL-MSGID: =?utf-8?q?1757849278111993901?= device is never set in pata_parport, remove it. 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 Tue Feb 14 23:00:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57268 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3247786wrn; Tue, 14 Feb 2023 15:06:36 -0800 (PST) X-Google-Smtp-Source: AK7set/aokj0vmb5LReYQdggF8QUZJu6ln9zoU3e46JOEXrRq07qR6bVzOZ0O2lr53o6ZldOvmgt X-Received: by 2002:a17:906:48d8:b0:87b:daf7:e03b with SMTP id d24-20020a17090648d800b0087bdaf7e03bmr541671ejt.18.1676415995938; Tue, 14 Feb 2023 15:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415995; cv=none; d=google.com; s=arc-20160816; b=rFHgfGUgej9YOj04OlIdQRclIujiT0jLbUedgjqiiHL9v82AFWjS5wtfh+1rzIEl6i E6zkVatn/MWDRlIaDJeRreZxPZpBn81wM8FnNVjmpJ5eZJrgI1dTdIbBL4MyqMrFM5bY NYAPCTP0vMZe4PmMJi9hpaWLP0BetsCghkDG6La8537/Zjea4p0bVB3vojseRa1nCoP+ YScb8GsP+XtDS9Uejvi1whcCNtqbrZ8bwkG7KouIces3nhq4zUJI+JKn2qKrTee3RXTh TpY9kcfDaA/BYGtw56e41PG8gWovkfh8fpJC4gwbShbF5+CrQHs4MnelvhVw5bx3FGPV ppIQ== 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=YvJj+qPOhSEOB2fj2EHxrGkN6EjRoJoMoPulMH4Vcec=; b=CelbzU3ZFnYpBMl5lcKdQwS1Qwsnk9BFe0eDsv2ELuJlbjM1k+/wCsEtIHMtyZLNTz TGIiCxFTbZnjkGhMXiuiGPh+CHCw/+x0p/j8GtOF5mj1xJFNlq/rXtenR+lnYs2kpJyS WBsRdYyJ8INGNG0OVK8krLG2TXOwDBP4xjj0SYecMqP5PiPBeSHyex+0LH+tUgs2eIw2 J5s7LngSLA7mWKf95yLwQttPUOtthVndpoDikFHbBomImyjoUJe64qk9vHAbjNyHGfFL bWddmk4iM25dVDfCiRvYw79HOPfzhJhvJ9OeexZLJRPwLPRrqeAaKQ3B2cLp7JmoYQRZ MFFQ== 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 gj32-20020a170907742000b0086d4912935csi16134675ejc.267.2023.02.14.15.06.12; Tue, 14 Feb 2023 15:06:35 -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 S232815AbjBNXBU (ORCPT + 99 others); Tue, 14 Feb 2023 18:01:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232579AbjBNXAg (ORCPT ); Tue, 14 Feb 2023 18:00:36 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B8192A9A0; Tue, 14 Feb 2023 15:00:24 -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 C72357A06EC; Wed, 15 Feb 2023 00:00:19 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/18] pata_parport: remove typedef struct PIA Date: Wed, 15 Feb 2023 00:00:00 +0100 Message-Id: <20230214230010.20318-9-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849579806843897?= X-GMAIL-MSGID: =?utf-8?q?1757849579806843897?= Remove typedef struct PIA and use struct pi_adapter directly. Fix formatting (excessive spaces) while at it. 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 Tue Feb 14 23:00:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57260 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3245431wrn; Tue, 14 Feb 2023 15:01:59 -0800 (PST) X-Google-Smtp-Source: AK7set8xQMKbrpaSVbDbBVv2/g7LhG7MaLJbgqjr9x5xuiIBqiFu9uJQ0TUW7eWhyXtxmWTy/c4o X-Received: by 2002:a17:907:d30d:b0:8af:2cf7:dd2b with SMTP id vg13-20020a170907d30d00b008af2cf7dd2bmr186493ejc.13.1676415719369; Tue, 14 Feb 2023 15:01:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415719; cv=none; d=google.com; s=arc-20160816; b=mioxLYlWwvAZW7mo5gBN2Xxr/0pcyNB6zs8lEciudtiYoQXxZWmWriIlAvAuE37JM1 ALkZ5beF/9Qka4v3vzYV4sKl80lFpBgQ1uqD/TtHVlhzD1xGAxs7oUbaB5SnR0CEOoa5 6JVeoaoCy/9y0FgHffoR+Asy3OTOhgBn49UfPN5/bJtKXpDG34LqSctkl6c5YYKAKm49 WYGhZr6M9n+XS0a7KovH5D0QoJ7zVVKw3OkrtP+K52IdJwSM54ONrhl9LEd97IhYWMSQ PeU9SxlUo8VKCvtZwitOBnWhSGT5xxDa5HYT2YRBX2xAIkBzL+43dAotdK6TOwLQORAk lvSQ== 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=YIOU9gHD1HlTUFnhOsQXGEPcvfASLUi3hTPuxd6a8O8=; b=unH4k+w32IG8kBWNEpw6I6EfMrw/IeVJ5bpR0j2Zo7w1IiTWs1obJV4H1idWwf5GIQ Thwg3FgMB/Gx7mUYaK7mwq4KWandSuPZoc6IMvxE8UbWkGqrnpReyFUUFuEQ1pLnsgXd Kle5oXiYwEe4VBVIIKZ8rQsYpz9tUPbUABNTiKnBXwpmAERC0JWSgBMBNEtecXna5SeZ DCiS79EOl4+lmh4wFiX4aNAj9UKocuCVeCbXoPThjDiXZjr9tDAB54OAH9+LtPLEROEi CFneaUjJ0fmIDepYUfa3SQXKkhNffUONjrAIalgzh8h9Y3SZalzM/xTSpkT0/fDm5IQW iaRQ== 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 t25-20020a056402021900b0049e998afc2esi20397953edv.556.2023.02.14.15.01.22; Tue, 14 Feb 2023 15:01:59 -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 S232781AbjBNXAp (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232342AbjBNXA1 (ORCPT ); Tue, 14 Feb 2023 18:00:27 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8861F29400; Tue, 14 Feb 2023 15:00:25 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 218757A06F6; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/18] pata_parport: remove verbose parameter from log_adapter() Date: Wed, 15 Feb 2023 00:00:01 +0100 Message-Id: <20230214230010.20318-10-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849288963733379?= X-GMAIL-MSGID: =?utf-8?q?1757849288963733379?= verbose parameter of log_adapter() is unused, remove it. 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 Tue Feb 14 23:00:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57263 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3246582wrn; Tue, 14 Feb 2023 15:04:04 -0800 (PST) X-Google-Smtp-Source: AK7set9g8S1JRVv2dzBl+ciWaXJYdhlb4JEsEwQN8C1D8NdfrCckLyCg1EMZ6OMjNIHGNsONUXA0 X-Received: by 2002:a17:906:b17:b0:88c:a6c7:af55 with SMTP id u23-20020a1709060b1700b0088ca6c7af55mr148938ejg.28.1676415844474; Tue, 14 Feb 2023 15:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415844; cv=none; d=google.com; s=arc-20160816; b=zI1G8D4OscF1yeGb97vtcu0fpp9MRumdWpavqOZLn4TErL7hHvKaCp+dlCltNNQLYV q8+akac+uDRFFELP5ARn/wT/01KV//4QQJZJrq5C89gFmyxSDPnHiX+RPVQwQJEsX70h JZ/HIQm+RRkifsqb+21Srnitbvv8AKyDCVfvGGi/uOHhVgatYKcgccB7/UK51lyzkphA 0pgDoqBygjOPdnt1EN/MrFY1T1xmShKbL8XayE69JHcjN0N4kSnuTh8DOSW4EJowiTAb QG3m4D6NnmVM5vfD/u7hOXj+sLqh3TcokiXtz6I7T1LynUsYu7d3REU6LHLBbkU6y0Pc HvFA== 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=shKFXCGuWsGSzDCDvKPaNaEcPF1T/AoG37zLNoOuvhw=; b=UIIfrWi8hrqXiLr2qjI6VqX8uEWpon+tgvzVo5iw3LFgzJOsH0EmoJvsOnJnjl5srF Idv8dVaRY14RlJDBKhSLNRDV5mcuTA5kqzmfzhPqqckARkPp03jysf2kH9iRnknJMTiw ahl9CZiB5PngdLfYBYZFRY0a++K7VvoZaP7bGiCjmQSmn6QfCBy1gTGtrAKOvpxicK1G 9ld3E87C3VXcfGHK/EB3eKiRnU1X5x3iRBkbSPA8U0o1vmmByKWTt0+CecWWu5+3pkXZ ucUXesb1NmlTqJFykZhgyyWXauSgx2l55sCzXJCcWjbwcO+djDaLuH1ZXE7dyIkR8pSm YHUA== 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 uo31-20020a170907cc1f00b0088d6d475971si18180100ejc.507.2023.02.14.15.03.24; Tue, 14 Feb 2023 15:04:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232832AbjBNXAu (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232454AbjBNXAc (ORCPT ); Tue, 14 Feb 2023 18:00:32 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B69B2A15C; Tue, 14 Feb 2023 15:00:25 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 37F3B7A06F8; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/18] pata_parport: remove scratch parameter from log_adapter() Date: Wed, 15 Feb 2023 00:00:02 +0100 Message-Id: <20230214230010.20318-11-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849420592795025?= X-GMAIL-MSGID: =?utf-8?q?1757849420592795025?= scratch parameter of log_adapter() is only used by bpck driver. Remove it. 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 Tue Feb 14 23:00:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57264 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3246940wrn; Tue, 14 Feb 2023 15:04:49 -0800 (PST) X-Google-Smtp-Source: AK7set/zOZjpqFiT2+bheit46ja8+RFvS4I9Yr2uoEGwl6hVSeNkePZzAFIaXLrc36mvQUTDVkwk X-Received: by 2002:a50:8712:0:b0:4ab:4c2f:a449 with SMTP id i18-20020a508712000000b004ab4c2fa449mr4222163edb.20.1676415889003; Tue, 14 Feb 2023 15:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415888; cv=none; d=google.com; s=arc-20160816; b=0ALuOSrV+S+FpJ38UGggfcWGy2clj08ja8a/wh7w7HHtPbDYofrqjfVWWbhbG9iv4C sYuD6dJ0vkHgsnb9HQEpBFCvlyebXEzrak4fT5ELyH5I6rGY6KkFnl8vZkwGZyEa7F2v ZYUbCsXkdup5prKEWWL/oQOb1Hr/PD8CqXevEttWVv9TETdm6ZufBNqzAxQap+o1y58e FPrYpQjspIdqQghcOWMEWXIXZA3B7/M4lkin2zktfjvKnJb9pZcV9yDDTqFHPg15I8uk 6TrwUKuKHwuy3w0cam0GbAurLqvzCxuRcMD9k3JK/TACQoRZ//XmlRxSBE1t5BMRNZeD 9lLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eFhHTSWVhUdm3SrL88K2vWzfRia6ZZXFgHPqFpnwnK0=; b=cobJmC8LLimgBxz+fzk8Qrh5BQRSwayyVmNjZyOKB4fMnLxxyPx5P9N0PrAyC5FrnG PUaQprsAXH5YmeOxC7cl7qJ+y6kL5hxMbWU/5hLRFZfHas8kqj2hyBw4n6vGt3hPi8QE vVl6oeIrvWgCeyXtq4Vi+rBEtXEekE6zC2uDon5QBRBdx+5E+APhHUjYZrR8Q7K+Vcpn wUjsdfeJQwb1U4BpIl4UfUvmSEogo/ebYzP/TA44txjB92lhKJlgTvfp2Sk2JWRl4JrJ Hh+eRbfdahpx2GhKiG9aIlD8YC4IqEaQtQP5H/sPxt6C+/By5+nVBCygd3dORkEN4Mox 4jNA== 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 b15-20020aa7c6cf000000b004acbd0981d2si10996281eds.185.2023.02.14.15.04.25; Tue, 14 Feb 2023 15:04:48 -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 S233037AbjBNXBD (ORCPT + 99 others); Tue, 14 Feb 2023 18:01:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232544AbjBNXAc (ORCPT ); Tue, 14 Feb 2023 18:00:32 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B25CD298C1; Tue, 14 Feb 2023 15:00:25 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 53ECF7A06FE; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/18] pata_parport: use dev_* instead of printk Date: Wed, 15 Feb 2023 00:00:03 +0100 Message-Id: <20230214230010.20318-12-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849467590380623?= X-GMAIL-MSGID: =?utf-8?q?1757849467590380623?= Use dev_info/dev_err/dev_dbg instead of printk. 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 Tue Feb 14 23:00:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3246584wrn; Tue, 14 Feb 2023 15:04:04 -0800 (PST) X-Google-Smtp-Source: AK7set+Q3CAc1DyogaWu4WfPdM9rtwUJkB/dHEiGNUyV0Crq6c/IJtxRBKT01RsyBu665ZrqsAbT X-Received: by 2002:a17:907:2cf6:b0:8ae:e30f:4091 with SMTP id hz22-20020a1709072cf600b008aee30f4091mr510253ejc.30.1676415844475; Tue, 14 Feb 2023 15:04:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415844; cv=none; d=google.com; s=arc-20160816; b=aNL6CHdmy35T1NAo3GFqIY0QadZYukOsLKmRhxO3cifIGUm3WLZ+clKLRAC16uIcoQ crU66kGDs6I6MhZjXDEjM7YtIEnsrTQKWwG/TI5HnjPO2v/oVAtO2s3wAzeMJECkBnWS BT6q2/AcnxougBraMn34nMk+pCkjI5HH4Td8zeZpHYlZ38uNmJNHc+bfbada3xwrhb6O AucsDP9WexomdmDpdZptukc4ld7guDkLkukN+EQcdUZMGDgsnkK9eL94G92A7xXLOiwy zCSeEkMZFiScvhqrv9otYarFaEFCSlTrVS63DI5ohh0RvNz/yF8fAmhgUDWuYuxcrDJc KDGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=N9/VNu+MAsRjYP3Mshu9QMWoLeSxAU6TsLEoJJka90w=; b=fk9z1URj10rPqbcR633oev/ClDp2e/RQUiLaQzEJ7gI3XAhf2m7V++I1/fl+FJ/nW2 n4/E57DnZQ13Gil291FHWBXdTu8neyiBwlr91GWoyrvLxNPHvQg0Q7tmB7fka/rk44tD 2Rghuqae+PXIAXFUeHfNEX+cH2MQkXyyfySfPFdjZAhsUAK6sY8TFTlid3VvgIepuK/l uoDyxvl87DANYgdJo6wNXSyTvgvlWMOj2HsxzoYDGj9ytdHIiAlHCc/dXVdJduUEfO+g 5cnWXzdpcK0JxNtPQ+jHNcGPmU4C3e8kURBfoAr17EBjDMvlm+KNeLJqt20SzEFgmm9B l1Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ft31-20020a170907801f00b008aa0feeee9esi17800263ejc.936.2023.02.14.15.03.22; Tue, 14 Feb 2023 15:04:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232844AbjBNXAx (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232482AbjBNXAc (ORCPT ); Tue, 14 Feb 2023 18:00:32 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7546123862; Tue, 14 Feb 2023 15:00:25 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 66D0C7A0708; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/18] pata_parport: use print_hex_* Date: Wed, 15 Feb 2023 00:00:04 +0100 Message-Id: <20230214230010.20318-13-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849420635873955?= X-GMAIL-MSGID: =?utf-8?q?1757849420635873955?= Use print_hex_* for debug dumps. Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 22 ++++------------------ drivers/ata/pata_parport/epat.c | 2 +- drivers/ata/pata_parport/epia.c | 2 +- drivers/ata/pata_parport/friq.c | 2 +- drivers/ata/pata_parport/frpw.c | 2 +- 5 files changed, 8 insertions(+), 22 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 1cba098b4b82..dec24983d140 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -334,12 +334,9 @@ static int bpck_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } - if (verbose) { - printk("bpck: 0x%x unit %d mode %d: ", - pi->port, pi->unit, pi->mode); - for (i=0;idev, "bpck: 0x%x unit %d mode %d: ", + pi->port, pi->unit, pi->mode); + print_hex_dump_debug("bpck: ", DUMP_PREFIX_NONE, TEST_LEN, 1, buf, TEST_LEN, false); e = 0; for (i=0;i '~')) - scratch[i] = '.'; - printk("bpck EEPROM: %64.64s\n", scratch); - printk(" %64.64s\n", &scratch[64]); -#endif - + print_hex_dump_bytes("bpck EEPROM: ", DUMP_PREFIX_NONE, scratch, 128); dev_info(&pi->dev, "bpck %s, backpack %8.8s unit %d", BPCK_VERSION, &scratch[110], pi->unit); dev_info(&pi->dev, " at 0x%x, mode %d (%s), delay %d\n", pi->port, diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 389faa6ae49d..b08ed2f86668 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -280,7 +280,7 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) epat_disconnect(pi); dev_dbg(&pi->dev, "epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", - pi->port, pi->mode, cc, e[0], e[1], f); + pi->port, pi->mode, cc, e[0], e[1], f); return (e[0] && e[1]) || f; } diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 48d12f56c501..32bec3449338 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -263,7 +263,7 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) epia_disconnect(pi); dev_dbg(&pi->dev, "epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->port, pi->mode, e[0], e[1], f); + pi->port, pi->mode, e[0], e[1], f); return (e[0] && e[1]) || f; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index ec564e7cb930..9e3ec64896f2 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -208,7 +208,7 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) friq_disconnect(pi); dev_dbg(&pi->dev, "friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->port, pi->mode, e[0], e[1], r); + pi->port, pi->mode, e[0], e[1], r); return (r || (e[0] && e[1])); } diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 5ea16a247257..c12c8aa9707c 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -257,7 +257,7 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) frpw_disconnect(pi); dev_dbg(&pi->dev, "frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n", - pi->port, (pi->private%2), pi->mode, e[0], e[1], r); + pi->port, (pi->private%2), pi->mode, e[0], e[1], r); return (r || (e[0] && e[1])); } From patchwork Tue Feb 14 23:00:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57266 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3247226wrn; Tue, 14 Feb 2023 15:05:25 -0800 (PST) X-Google-Smtp-Source: AK7set/WHDbaHwAo91qzUL0Dad6+QPWxO9y6eMM+3N2Lv6eUzwXE+1E1laiJpcYMVHH5+y0ykWG+ X-Received: by 2002:a05:6402:3225:b0:4ab:4b6b:ca84 with SMTP id g37-20020a056402322500b004ab4b6bca84mr1426335eda.9.1676415925625; Tue, 14 Feb 2023 15:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415925; cv=none; d=google.com; s=arc-20160816; b=rZJLStUhIpx1QpNxdrcki+CM8W6VjQYpEOZ91IV0YflhSgB8lNItClT9BypLj1hkUC gFm0G4Czz64SxWEhy5fjY0j41LZOZz4XeH1V+CT75AAZGqaO10qPpZFywD3N6DZq+AGz L+FMBOHzPdYlYNSRN2gFRed++oWZjQvAsntR+uWLt13/znqvuPzksYxfg/upcbSpSDft S1YGVmmkrLGrCa8UmCI9t1OBHPBzsy5H54Ftaw5mq4QQ0H4xkgxPiouy/vd7Lcs2uI+T zlym8U14YlI45Qanim/6mFCbcpbBCujR/TCbYmemrhXfB7WXO2lOZP1QVBg3Rv3remgD QyCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=C0iO0KN+kAKdyVYwt0YyYgBfV6KsZ8PP1NC6HUVtJfw=; b=cOGtjoriyMuQCNYPdQfpPH/oRtIk5YwRA/13JSPCObted4ltITZhP2dQfQtoOyrorp 1SXmMBxd2SGDbiXWAIsY4n7dTewA6ZwSdZAqvFGNhUXR1MctD3oavALOC7G4fGt8BZdS Io7pR2Kgv5+4U5hM3W6PguF2wc4kcTL0vyjj3t4Y/CjnZhb5SfMnuu35v0HfQuUUHwEP h41hCeLShtRAn7SH1GFZcbnrAg7pGo9sJzgV+R4Of9VudAh+2s2EV6JKn5fXDyiOnzC9 m3W8iaRyXv8hCLkAVR41QBCM+VO1p8xgcZfgQuHqXV7YddKs3Ta4Hrreu28O10MqYReb UZyg== 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 w6-20020a50fa86000000b004acc1bc00cdsi9775707edr.568.2023.02.14.15.05.02; Tue, 14 Feb 2023 15:05:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232698AbjBNXBG (ORCPT + 99 others); Tue, 14 Feb 2023 18:01:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232577AbjBNXAc (ORCPT ); Tue, 14 Feb 2023 18:00:32 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0ABA298DC; Tue, 14 Feb 2023 15:00:26 -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 807817A071B; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/18] pata_parport: simplify log_adapter prints, remove VERSION defines Date: Wed, 15 Feb 2023 00:00:05 +0100 Message-Id: <20230214230010.20318-14-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849505339724687?= X-GMAIL-MSGID: =?utf-8?q?1757849505339724687?= Merge log_adapter prints to single one, remove version print and meaningless VERSION defines. 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 b08ed2f86668..da63fe3b7182 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -16,8 +16,6 @@ */ -#define EPAT_VERSION "1.02" - #include #include #include @@ -296,11 +294,8 @@ static void epat_log_adapter(struct pi_adapter *pi) ver = RR(0xb); epat_disconnect(pi); - dev_info(&pi->dev, "epat %s, Shuttle EPAT chip %x at 0x%x, ", - EPAT_VERSION, ver, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Shuttle EPAT chip %x at 0x%x, mode %d (%s), delay %d\n", + ver, pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol epat = { diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 32bec3449338..778ebd033ff9 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -17,8 +17,6 @@ */ -#define EPIA_VERSION "1.02" - #include #include #include @@ -275,10 +273,8 @@ static void epia_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Shuttle EPIA at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol epia = { diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index d0a781f04411..3536d8c07955 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -13,8 +13,6 @@ */ -#define FIT2_VERSION "1.0" - #include #include #include @@ -116,8 +114,8 @@ static void fit2_disconnect(struct pi_adapter *pi) static void fit2_log_adapter(struct pi_adapter *pi) { - dev_info(&pi->dev, "fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", - FIT2_VERSION, pi->port, pi->delay); + dev_info(&pi->dev, "FIT 2000 adapter at 0x%x, delay %d\n", + pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index f86da2d478cb..9f5320c750e2 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -17,8 +17,6 @@ */ -#define FIT3_VERSION "1.0" - #include #include #include @@ -173,11 +171,8 @@ static void fit3_log_adapter(struct pi_adapter *pi) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; - dev_info(&pi->dev, "fit3 %s, FIT 3000 adapter at 0x%x, " - "mode %d (%s), delay %d\n", - FIT3_VERSION, pi->port, - pi->mode,mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "FIT 3000 adapter at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol fit3 = { diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 9e3ec64896f2..422146f614d6 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -25,8 +25,6 @@ 1.01 GRG 1998.12.20 Added support for soft power switch */ -#define FRIQ_VERSION "1.01" - #include #include #include @@ -219,10 +217,8 @@ static void friq_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", - FRIQ_VERSION,pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); + dev_info(&pi->dev, "Freecom IQ ASIC-2 adapter at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); pi->private = 1; friq_connect(pi); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index c12c8aa9707c..068db960861e 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -23,8 +23,6 @@ */ -#define FRPW_VERSION "1.03" - #include #include #include @@ -268,11 +266,9 @@ static void frpw_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "frpw %s, Freecom (%s) adapter at 0x%x, ", - FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Freecom (%s) adapter at 0x%x, mode %d (%s), delay %d\n", + ((pi->private % 2) == 0) ? "Xilinx" : "ASIC", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol frpw = { diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index ea1b931ce20d..3fab7a896e79 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -18,8 +18,6 @@ */ -#define KBIC_VERSION "1.01" - #include #include #include @@ -234,10 +232,8 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; - dev_info(&pi->dev, "kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "KingByte %s at 0x%x, mode %d (%s), delay %d\n", + chip, pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static void k951_log_adapter(struct pi_adapter *pi) diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index b22c283709de..742051f6ea10 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -9,8 +9,6 @@ */ -#define KTTI_VERSION "1.0" - #include #include #include @@ -93,9 +91,8 @@ static void ktti_disconnect(struct pi_adapter *pi) static void ktti_log_adapter(struct pi_adapter *pi) { - dev_info(&pi->dev, "ktti %s, KT adapter at 0x%x, delay %d\n", - KTTI_VERSION, pi->port, pi->delay); - + dev_info(&pi->dev, "KT adapter at 0x%x, delay %d\n", + pi->port, pi->delay); } static struct pi_protocol ktti = { diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index c76d4fb84c61..9cc8be9fa562 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -12,8 +12,6 @@ */ -#define ON20_VERSION "1.01" - #include #include #include @@ -115,10 +113,8 @@ static void on20_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - dev_info(&pi->dev, "on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "OnSpec 90c20 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol on20 = { diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 5406e76ea727..e37f69db5f76 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -16,8 +16,6 @@ */ -#define ON26_VERSION "1.04" - #include #include #include @@ -280,10 +278,8 @@ static void on26_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - dev_info(&pi->dev, "on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "OnSpec 90c26 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol on26 = { From patchwork Tue Feb 14 23:00:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57265 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3247054wrn; Tue, 14 Feb 2023 15:05:06 -0800 (PST) X-Google-Smtp-Source: AK7set+nWQNTd2r6N7ADzGrKtnkepMGVQBsNzbb6RGYAECXenFcnFMDuzEGwFav5fJn83RlKLcb/ X-Received: by 2002:a05:6402:1344:b0:4a3:43c1:843e with SMTP id y4-20020a056402134400b004a343c1843emr1028197edw.18.1676415906113; Tue, 14 Feb 2023 15:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415906; cv=none; d=google.com; s=arc-20160816; b=nAXDelOyQhDaP3xZPgce2JrQ2DXih2cSjyCWS1B0YBXFzKfZXj8zSGCkm4f1BGl0JS ZJ9oTvMbON/CphJKPTnz38IeSuq/w4YWrzKXNpzbTWni/MD2SNx+UKiptpgEcawILDXg yM1Q9YjdctSV+axsHPnd6TTrsuWiIUcwAE1/Wc6/PsCy+gCBy4nbn4+ST+mSxbbO7fKC p1Cq2yTkyio6oFpiaj560zB0siBPutrPuMiZBEQL5QSSqUFZy1nk2mVY+Zzg6/l+b8+J sTMZnLMS9yFYAhrvCgGGuoY3PAZyMJnuoswRM9yzqZb1RCRKbWuhUDGpXb15vwsRCA56 ClTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PZzsr8xwqU3mwOJPxmiiCtxUm4qVNN5is72xB7+6mpY=; b=gWmXiCXm+qDrZ8KBdM9Bulhw3RBvAXls9e9jCaB0zmpX4T2mThjWo36+1OTarn2deM cMD3vqxonD0EPcO2BX5VjCsEPjytiixDof5PipoxUObhll0/ZFnKzQeQexEMSoS9WBKa lmnbuWsbzdSVsW4rauOp5p1K1+m2tuT/0JsyOBjDq5RiMcNycXufZxfPiHj16OcGlRJ9 MqHAP7Q2uh4Bdeir/RCpUle3xmXsGWHz9GSIKZpsa96UOhAo3R9TdMbozTWPFqmlbVjg aVNre68SUZVAgDDIAMgBww4bPPX7XlummXHfWE7iqzJ7Py2KUcDSiogg6AoFtaWnQYfY QfVQ== 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 o13-20020aa7dd4d000000b004aad0c7e385si18863528edw.270.2023.02.14.15.04.40; Tue, 14 Feb 2023 15: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 S232991AbjBNXBA (ORCPT + 99 others); Tue, 14 Feb 2023 18:01:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232533AbjBNXAc (ORCPT ); Tue, 14 Feb 2023 18:00:32 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C11422A14F; Tue, 14 Feb 2023 15:00:26 -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 9D7597A071E; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/18] pata_parport: remove bpck6 verbose parameter Date: Wed, 15 Feb 2023 00:00:06 +0100 Message-Id: <20230214230010.20318-15-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849485328307051?= X-GMAIL-MSGID: =?utf-8?q?1757849485328307051?= Remove now useless verbose parameter of bpck6 module. 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 Tue Feb 14 23:00:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3247390wrn; Tue, 14 Feb 2023 15:05:45 -0800 (PST) X-Google-Smtp-Source: AK7set+avmacyQMVHBZr6dZUkZG+5B6V1kmFEuvMeyJTYgRyPBomblRN4WpyefXOTMFOgXLFpFRX X-Received: by 2002:a17:907:9811:b0:88d:d700:fe15 with SMTP id ji17-20020a170907981100b0088dd700fe15mr282967ejc.0.1676415945274; Tue, 14 Feb 2023 15:05:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415945; cv=none; d=google.com; s=arc-20160816; b=KWHCPosU5jSqDPSYNkAShbaUpdE9LrgDkPmtP3RNoWiuyQKf+3Ds4VbzV+7ANNWPFG G53EjfHkTdHCvmyOgL8hZY4QI7Hs192pqYWTevn0FkqQJTkMggce3t4WhXnKH3sr3HLH AT60+7NX7fRDNBCFOCJl9sz6C0lUMscDFOYrYrWWxSVbmqAWSP6Docz5SemyJyZEc213 4w15zGHDesMAZPzCKG2CeCBMCetq2v74O7RXSHOIWudWcIIOwWr6sd4IrUbI3HgW4cMK JPJudE1Lu0qQDBTdtzmeq/AKKCiGHQAFUhdSE1VsGYTO9yszqClcchpVaK37nPmF+Cwk noIw== 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=Qp7yyDT4hKbrNdpNfQUiUkTj28LXtZqxvpBAOqK8tug=; b=gDMJcxlEQIr6pG1qPm50LGwYn5JUGX4Ln/tkK2J9Efla+jONKlnAo9fwWCpNZBXLiJ MZ/+yd+xWLzWqTNYEqv1BCyOiIumQ3XWTgFTvCcIPlaA02s9UlMHvcbc50zuH5t8WSyH KGsJSFAtcwx7VJqI4aQTqHB/VlcfO1HlUrzIhL4pQysKHTajGsk9XsJsJ5Fc4tk2dssN 76018EYUfiqZauJYw4cWmg29ebAC/jmKE/NKn0wDEiMCFOxxiZvraFUszmSjNccbm/AM KtKv5YMT7O2zDL+z+FZp90QYfmsVvec845arytsN2O9+3RXrOnMZXG6yfBKPnizYQo1r QwJQ== 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 fq10-20020a1709069d8a00b0084d43e4541csi17091084ejc.720.2023.02.14.15.05.08; Tue, 14 Feb 2023 15:05:45 -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 S232736AbjBNXBK (ORCPT + 99 others); Tue, 14 Feb 2023 18:01:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232598AbjBNXAg (ORCPT ); Tue, 14 Feb 2023 18:00:36 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E5C7F2F79E; Tue, 14 Feb 2023 15:00:28 -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 B3FE87A0728; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/18] pata_parport: remove verbose parameter from test_proto() Date: Wed, 15 Feb 2023 00:00:07 +0100 Message-Id: <20230214230010.20318-16-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849526464511002?= X-GMAIL-MSGID: =?utf-8?q?1757849526464511002?= verbose parameter of test_proto() is now unused, remove it. 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 da63fe3b7182..da3398941f81 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -246,7 +246,7 @@ static void epat_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int epat_test_proto(struct pi_adapter *pi, char *scratch) { int k, j, f, cc; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 778ebd033ff9..a83685ed9dde 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -232,7 +232,7 @@ static void epia_write_block(struct pi_adapter *pi, char *buf, int count) } -static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int epia_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, f; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 422146f614d6..7ace1f7eea34 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -178,7 +178,7 @@ static void friq_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int friq_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, r; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 068db960861e..d04a11889066 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -219,7 +219,7 @@ static int frpw_test_pnp(struct pi_adapter *pi) a hack :-( */ -static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int frpw_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, r; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index f42a2cafc382..27aa2419af02 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -306,7 +306,7 @@ static int pi_test_proto(struct pi_adapter *pi, char *scratch) parport_claim_or_block(pi->pardev); if (pi->proto->test_proto) - res = pi->proto->test_proto(pi, scratch, 1); + res = pi->proto->test_proto(pi, scratch); else res = default_test_proto(pi, scratch); parport_release(pi->pardev); diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index c44d30b3e886..e45bb1896003 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -67,7 +67,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); - int (*test_proto)(struct pi_adapter *pi, char *scratch, int verbose); + int (*test_proto)(struct pi_adapter *pi, char *scratch); void (*log_adapter)(struct pi_adapter *pi); int (*init_proto)(struct pi_adapter *pi); From patchwork Tue Feb 14 23:00:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57269 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3247841wrn; Tue, 14 Feb 2023 15:06:41 -0800 (PST) X-Google-Smtp-Source: AK7set/Bc2jWjZd/xe+1t7quxC28tkKrPO9eetTR/eEbyeMQhJVVuhEx3ckTm5LuOeFAMJ/aFCGK X-Received: by 2002:a17:907:2d10:b0:8b1:438e:9b3f with SMTP id gs16-20020a1709072d1000b008b1438e9b3fmr103969ejc.20.1676416001346; Tue, 14 Feb 2023 15:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676416001; cv=none; d=google.com; s=arc-20160816; b=kaLoTkrXJXwaG/+iFHsCAoeP7pk3ycJGF8uD+ot0fjbg4wB4z9h70Z1HzMkWpK7pWa HiHinVQJBB8DY29A2fHpBPKy76isZ7pvn5fEoF+diUdHjE3xFyydZjFbdh7nG0Fpte8K xxDTLwPexgoTTkFDtmBKeseVftVpLKY/RzBxdSBPkyGIS38ycRc3+xc4Uo8L7Mta2oOm iz7OJpwmWLgbKT1fG0hjo4BdYk8R9fLYTAqJi7pqChbpA4o30AcYQKBC03Yx4K4vMdcQ b8ufk/snZl+OenFAoYY/U7AzWri3avsVb0tT54MwNu24k3VBtacQ9Zv7oplaL4o5JcLA s2vA== 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=17MXXtNM+DgAKeC8q6gd7G4ih8QLgbqvEsRj4BWmrbY=; b=keVmhTpcLjsGfF51fPpym36M+aort4zWHcmaySqDUoshv90ANrCG74MiHaZ7k4xNMC r9UE38HB70seZlalnPcW3I2I7MzWteojI6PWIsq3n39mVvolEvSlAoPIjFLsjM4hMWbJ UZzG4OwuCrHIiuLlNNiMKscNCx/GIVmoisZ+iuD3RfWM0S4RYFoY/PBlRw6pFmuZnoMO UlUKgIDsfI9RAQf9ThFQOtEILofaQJL9txrHdd5orwMKRI0aB/XyVkTUhKJ5l+CtUjgg 8bAAyOQ52N7WVo1+Oq2mjqNWxEtu5NCOiQ6o/m9Z2FE/eVwj5wQggyGY5WeLcyA2M3Cy FK6w== 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 l14-20020a170907914e00b008b138a13b3esi1738569ejs.473.2023.02.14.15.06.19; Tue, 14 Feb 2023 15:06:41 -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 S233245AbjBNXBX (ORCPT + 99 others); Tue, 14 Feb 2023 18:01:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232662AbjBNXAj (ORCPT ); Tue, 14 Feb 2023 18:00:39 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6AAB303F1; Tue, 14 Feb 2023 15:00:28 -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 CC2487A072D; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/18] pata_parport: remove scratch parameter from test_proto() Date: Wed, 15 Feb 2023 00:00:08 +0100 Message-Id: <20230214230010.20318-17-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849585211452678?= X-GMAIL-MSGID: =?utf-8?q?1757849585211452678?= Don't pass around a pointer to scratch buffer. Use local buffers in protocols that need it. Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 2 +- drivers/ata/pata_parport/epat.c | 3 ++- drivers/ata/pata_parport/epia.c | 3 ++- drivers/ata/pata_parport/friq.c | 3 ++- drivers/ata/pata_parport/frpw.c | 3 ++- drivers/ata/pata_parport/pata_parport.c | 23 +++++++++++------------ include/linux/pata_parport.h | 2 +- 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 2072e291fd16..ecb98bf0e6de 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -274,7 +274,7 @@ static void bpck_force_spp(struct pi_adapter *pi) #define TEST_LEN 16 -static int bpck_test_proto(struct pi_adapter *pi, char *scratch) +static int bpck_test_proto(struct pi_adapter *pi) { int i, e, l, h, om; char buf[TEST_LEN]; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index da3398941f81..26d1b6d438bc 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -246,10 +246,11 @@ static void epat_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int epat_test_proto(struct pi_adapter *pi, char *scratch) +static int epat_test_proto(struct pi_adapter *pi) { int k, j, f, cc; int e[2] = {0,0}; + char scratch[512]; epat_connect(pi); cc = RR(0xd); diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index a83685ed9dde..101a0d9f1aa6 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -232,10 +232,11 @@ static void epia_write_block(struct pi_adapter *pi, char *buf, int count) } -static int epia_test_proto(struct pi_adapter *pi, char *scratch) +static int epia_test_proto(struct pi_adapter *pi) { int j, k, f; int e[2] = {0,0}; + char scratch[512]; epia_connect(pi); for (j=0;j<2;j++) { diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 7ace1f7eea34..9c4a6487b2a9 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -178,10 +178,11 @@ static void friq_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int friq_test_proto(struct pi_adapter *pi, char *scratch) +static int friq_test_proto(struct pi_adapter *pi) { int j, k, r; int e[2] = {0,0}; + char scratch[512]; pi->saved_r0 = r0(); w0(0xff); udelay(20); CMD(0x3d); /* turn the power on */ diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index d04a11889066..024b5c0737e0 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -219,10 +219,11 @@ static int frpw_test_pnp(struct pi_adapter *pi) a hack :-( */ -static int frpw_test_proto(struct pi_adapter *pi, char *scratch) +static int frpw_test_proto(struct pi_adapter *pi) { int j, k, r; int e[2] = {0,0}; + char scratch[512]; if ((pi->private>>1) != pi->port) pi->private = frpw_test_pnp(pi) + 2*pi->port; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 27aa2419af02..77a3e5a3f062 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -276,7 +276,7 @@ static void pi_release(struct pi_adapter *pi) module_put(pi->proto->owner); } -static int default_test_proto(struct pi_adapter *pi, char *scratch) +static int default_test_proto(struct pi_adapter *pi) { int j, k; int e[2] = { 0, 0 }; @@ -300,21 +300,21 @@ static int default_test_proto(struct pi_adapter *pi, char *scratch) return e[0] && e[1]; /* not here if both > 0 */ } -static int pi_test_proto(struct pi_adapter *pi, char *scratch) +static int pi_test_proto(struct pi_adapter *pi) { int res; parport_claim_or_block(pi->pardev); if (pi->proto->test_proto) - res = pi->proto->test_proto(pi, scratch); + res = pi->proto->test_proto(pi); else - res = default_test_proto(pi, scratch); + res = default_test_proto(pi); parport_release(pi->pardev); return res; } -static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) +static bool pi_probe_mode(struct pi_adapter *pi, int max) { int best, range; @@ -326,7 +326,7 @@ static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) range = 8; if (range == 8 && pi->port % 8) return false; - return !pi_test_proto(pi, scratch); + return !pi_test_proto(pi); } best = -1; for (pi->mode = 0; pi->mode < max; pi->mode++) { @@ -335,14 +335,14 @@ static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) range = 8; if (range == 8 && pi->port % 8) break; - if (!pi_test_proto(pi, scratch)) + if (!pi_test_proto(pi)) best = pi->mode; } pi->mode = best; return best > -1; } -static bool pi_probe_unit(struct pi_adapter *pi, int unit, char *scratch) +static bool pi_probe_unit(struct pi_adapter *pi, int unit) { int max, s, e; @@ -367,14 +367,14 @@ static bool pi_probe_unit(struct pi_adapter *pi, int unit, char *scratch) for (pi->unit = s; pi->unit < e; pi->unit++) { if (pi->proto->probe_unit(pi)) { parport_release(pi->pardev); - return pi_probe_mode(pi, max, scratch); + return pi_probe_mode(pi, max); } } parport_release(pi->pardev); return false; } - return pi_probe_mode(pi, max, scratch); + return pi_probe_mode(pi, max); } static void pata_parport_dev_release(struct device *dev) @@ -419,7 +419,6 @@ static struct pi_adapter *pi_init_one(struct parport *parport, struct pi_protocol *pr, int mode, int unit, int delay) { struct pardev_cb par_cb = { }; - char scratch[512]; const struct ata_port_info *ppi[] = { &pata_parport_port_info }; struct ata_host *host; struct pi_adapter *pi; @@ -469,7 +468,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport, if (!pi->pardev) goto out_module_put; - if (!pi_probe_unit(pi, unit, scratch)) { + if (!pi_probe_unit(pi, unit)) { dev_info(&pi->dev, "Adapter not found\n"); goto out_unreg_parport; } diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index e45bb1896003..bbfa4e63ee85 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -67,7 +67,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); - int (*test_proto)(struct pi_adapter *pi, char *scratch); + int (*test_proto)(struct pi_adapter *pi); void (*log_adapter)(struct pi_adapter *pi); int (*init_proto)(struct pi_adapter *pi); From patchwork Tue Feb 14 23:00:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57270 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3247862wrn; Tue, 14 Feb 2023 15:06:45 -0800 (PST) X-Google-Smtp-Source: AK7set8mgZlkx2Xa8CQPB3rzeIq1CHwyDN5Ib1KqEqOKJRDGim4op8tvbz+KJpaBvEhZ+F0Z4rRV X-Received: by 2002:a17:907:98e6:b0:88b:109e:fbd3 with SMTP id ke6-20020a17090798e600b0088b109efbd3mr149060ejc.24.1676416005209; Tue, 14 Feb 2023 15:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676416005; cv=none; d=google.com; s=arc-20160816; b=Jj50wEDhSrdTt5ns4LHmV/XCRpmk7l0eI92iOaunMNxezmHWstaH32tm4/bctOGugZ SCWDWxeOdQ/NaMZZ8dpfR7hJt4/HkeNk9XFYS+wgkkVU7FIijW8IeBZtoRDG+K12Es2s o/azVezf7upA5mhHI+L46ZmThduHbiZN7hwh6TQiMEux4k9s3FBCmariVkTg6wNfTAlT gOQ0cUtt4q7xZpGrrwhdIuLsM+qb632q+dt7OiKZfwW8cIf7sA1GtILyu+hFeJNK058W 6vCbfipYvCp3B1BK8kSQBYB4mBKTBgdzRFDjhKjelDMVdzWPW3TCYmjhlqwXlswv8h8e w84Q== 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=5WwumkFeVHs3KHx678tTrTDVUbHSfzZ8baeZ6P5DioE=; b=fwo7WWBH4acjUc6DQwxECH1jh2qmxo++Kssl1qVyZUvgDCXBRpNb0X+C47HJVpWdzV AaBDi7EET+gOSrEcs8T1omTHqHl2U0WtzWKy6FPF5/SK0bii9ppfnvWyeQgRY+92Olcx 2C0UR9gbOOXTOaEP5gtJzSLHQf8gg4ccvwYir089E56O/j3Je4Ejm99/1mZIufXF4z/B qwTUWcwIspgagaUp/8dzJBUrNKL1KwyNTfK8wGRVA0rJDtuW2WgcHGCsK6xbqWthPAE/ cUpG2PfzsrYfa7mNzaWRggmGu42ipQ9rkzvBu5JNexZfEo0y5pfsIhqyM5wV+Y62UOlv RMhA== 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 o13-20020aa7dd4d000000b004aad0c7e385si18863528edw.270.2023.02.14.15.06.01; Tue, 14 Feb 2023 15:06:45 -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 S233157AbjBNXBP (ORCPT + 99 others); Tue, 14 Feb 2023 18:01:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232654AbjBNXAj (ORCPT ); Tue, 14 Feb 2023 18:00:39 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6CA6305C6; Tue, 14 Feb 2023 15:00:28 -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 EA6777A0731; Wed, 15 Feb 2023 00:00:20 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/18] pata_parport: remove obsolete changelogs Date: Wed, 15 Feb 2023 00:00:09 +0100 Message-Id: <20230214230010.20318-18-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849589080104732?= X-GMAIL-MSGID: =?utf-8?q?1757849589080104732?= Remove obsolete changelogs from protocol drivers. Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 6 ------ drivers/ata/pata_parport/bpck.c | 7 ------- drivers/ata/pata_parport/bpck6.c | 8 -------- drivers/ata/pata_parport/comm.c | 6 ------ drivers/ata/pata_parport/dstr.c | 6 ------ drivers/ata/pata_parport/epat.c | 7 ------- drivers/ata/pata_parport/epia.c | 7 ------- drivers/ata/pata_parport/friq.c | 5 ----- drivers/ata/pata_parport/frpw.c | 10 ---------- drivers/ata/pata_parport/kbic.c | 6 ------ drivers/ata/pata_parport/on20.c | 6 ------ drivers/ata/pata_parport/on26.c | 9 --------- 12 files changed, 83 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 8995a4a08b76..f0d63b8513e0 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -9,12 +9,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index ecb98bf0e6de..472029a21d59 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -7,13 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto, pi->delay - 1.02 GRG 1998.08.15 default pi->delay returned to 4 - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index f0ab30fa739a..683a11131acd 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -11,14 +11,6 @@ */ -/* - This is Ken's linux wrapper for the PPC library - Version 1.0.0 is the backpack driver for which source is not available - Version 2.0.0 is the first to have source released - Version 2.0.1 is the "Cox-ified" source code - Version 2.0.2 - fixed version string usage, and made ppc functions static -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 6e05b50c322c..0483caa80544 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -8,12 +8,6 @@ use this adapter. */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 64e45eed9588..c5af7a5fa636 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -7,12 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 26d1b6d438bc..b7085a448301 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -9,13 +9,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 Joshua b. Jore CPP(renamed), epat_connect, epat_disconnect - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 101a0d9f1aa6..63e74c1facba 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -10,13 +10,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 GRG 1998.06.17 support older versions of EPIA - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 9c4a6487b2a9..ce605f665ab1 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -20,11 +20,6 @@ */ -/* Changes: - - 1.01 GRG 1998.12.20 Added support for soft power switch -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 024b5c0737e0..257ad13dec09 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -13,16 +13,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - fix chip detect - added EPP-16 and EPP-32 - 1.02 GRG 1998.09.23 added hard reset to initialisation process - 1.03 GRG 1998.12.14 made hard reset conditional - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 3fab7a896e79..29f4f1e14d21 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -12,12 +12,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 9cc8be9fa562..6956b91efb47 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -6,12 +6,6 @@ Onspec 90c20 parallel to IDE adapter. */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index e37f69db5f76..1d90eb9b541e 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -7,15 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 GRG 1998.09.23 updates for the -E rev chip - 1.03 GRG 1998.12.14 fix for slave drives - 1.04 GRG 1998.12.20 yet another bug fix - -*/ - #include #include #include From patchwork Tue Feb 14 23:00:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57271 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3248366wrn; Tue, 14 Feb 2023 15:07:52 -0800 (PST) X-Google-Smtp-Source: AK7set8vWWRSDhkzBoAj8hj8oXwkh8m9UVPoMCgh5O+ltFvW2RS46cYoxrYI1Q+q9+LykusX/+lJ X-Received: by 2002:a17:906:3b15:b0:8b1:2998:6474 with SMTP id g21-20020a1709063b1500b008b129986474mr166305ejf.16.1676416072075; Tue, 14 Feb 2023 15:07:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676416072; cv=none; d=google.com; s=arc-20160816; b=sfF9MKjyX7+OEThlZz1TR0TEEAeaLR1/2ukxXTJtiORns4JM+P+DHpWOtunJLDWVpy LvxnZc7DwT+ooyeKjVAaZ3Baue+r0L/q/WuASfSRgoDSlUR/1CP7Cspqjxuzcbdx8uFq RXx7UWeNh6uyASfjnQT991JKtlcWxALrflN/UrYYx1yJJa9kM7ZzY2wlEjehV+/a5f0y h6s9ycqSgArUHTu2+53X2EB1bBEjOEFdPz4W9iS1g2w6Pu1hp+sz7K5eW7riuwm09EXB XjMCFSTklsk/EsUk/wUOvo62kL/TR8OPiXOeEy9nVqy9xZ1XaJ4cr8bW1B6wKBEgb+x/ zLEw== 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=loL9el0roVuL1pFPMo/r5AIgycdeSGRT/19VNXK8TYo=; b=d0XSYKUKYuFPUZmESO1BWAAn55F3XLsiIlBRuWsEusry7XMrqQuCPAstcjn+XL9PIh 7OM5XiJUNmhnRfHsgd3clGRp0aT0uqAQTup+TqIe2Z0TEW7kqfaIy9mMU4jFJxV9cYF/ gEOdeqzZtpI/JMypiux6aAVNcO4PZJd7l615AJsqJtTs01NFYCifZD0MOhXuWHPdwX44 9nD4uSPYe6c+cOsNTwVUQJCn5U/CJ2tGdQV+t/2EooRfKfMPkvP8/vTna1K/sxwV1uzL IspmIvgNHONBr4smlrAsx7E81Gh/itIM8UJATATw6iOlcM4NeySZUgwsPhu8/ysG8gJ8 7knw== 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 21-20020a170906001500b008b13573a3ccsi2273764eja.502.2023.02.14.15.07.29; Tue, 14 Feb 2023 15:07: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 S233256AbjBNXB0 (ORCPT + 99 others); Tue, 14 Feb 2023 18:01:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232673AbjBNXAj (ORCPT ); Tue, 14 Feb 2023 18:00:39 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3CB5B2ED40; Tue, 14 Feb 2023 15:00:28 -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 0F46D7A0738; Wed, 15 Feb 2023 00:00:21 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/18] pata_parport: move pata_parport.h to drivers/ata/pata_parport Date: Wed, 15 Feb 2023 00:00:10 +0100 Message-Id: <20230214230010.20318-19-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849659261452649?= X-GMAIL-MSGID: =?utf-8?q?1757849659261452649?= Now that paride is gone, pata_parport.h does not need to be in include/linux. Move it to drivers/ata/pata_parport. Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 3 +-- drivers/ata/pata_parport/bpck.c | 3 +-- drivers/ata/pata_parport/bpck6.c | 3 +-- drivers/ata/pata_parport/comm.c | 3 +-- drivers/ata/pata_parport/dstr.c | 3 +-- drivers/ata/pata_parport/epat.c | 3 +-- drivers/ata/pata_parport/epia.c | 3 +-- drivers/ata/pata_parport/fit2.c | 3 +-- drivers/ata/pata_parport/fit3.c | 3 +-- drivers/ata/pata_parport/friq.c | 3 +-- drivers/ata/pata_parport/frpw.c | 3 +-- drivers/ata/pata_parport/kbic.c | 3 +-- drivers/ata/pata_parport/ktti.c | 3 +-- drivers/ata/pata_parport/on20.c | 3 +-- drivers/ata/pata_parport/on26.c | 3 +-- drivers/ata/pata_parport/pata_parport.c | 2 +- {include/linux => drivers/ata/pata_parport}/pata_parport.h | 0 17 files changed, 16 insertions(+), 31 deletions(-) rename {include/linux => drivers/ata/pata_parport}/pata_parport.h (100%) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index f0d63b8513e0..1bd248c42f8b 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) ((((a>>4)&0x0f)|(b&0xf0))^0x88) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 472029a21d59..1c5035a09554 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" #undef r2 #undef w2 diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 683a11131acd..964bc688e280 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -18,9 +18,8 @@ #include #include #include - #include "ppc6lnx.c" -#include +#include "pata_parport.h" #define PPCSTRUCT(pi) ((Interface *)(pi->private)) diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 0483caa80544..4c2f9ad60ad8 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -15,8 +15,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index c5af7a5fa636..2524684be206 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index b7085a448301..0e4369dbe48e 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)+(b&0xf0)) #define j53(a,b) (((a>>3)&0x1f)+((b<<4)&0xe0)) diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 63e74c1facba..7821e363b143 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -17,8 +17,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads on port 1, 8-bit writes 1 5/3 reads on ports 1 & 2, 8-bit writes diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 3536d8c07955..fd3b2ce426a5 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -20,8 +20,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0)) diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index 9f5320c750e2..75df656ac472 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -24,8 +24,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>3)&0x0f)|((b<<1)&0xf0)) diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index ce605f665ab1..b48bfabd1759 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -27,8 +27,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define CMD(x) w2(4);w0(0xff);w0(0xff);w0(0x73);w0(0x73);\ w0(0xc9);w0(0xc9);w0(0x26);w0(0x26);w0(x);w0(x); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 257ad13dec09..5d4bba371b8e 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -20,8 +20,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define cec4 w2(0xc);w2(0xe);w2(0xe);w2(0xc);w2(4);w2(4);w2(4); #define j44(l,h) (((l>>4)&0x0f)|(h&0xf0)) diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 29f4f1e14d21..8213e62f8f00 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -19,8 +19,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define r12w() (delay_p,inw(pi->port+1)&0xffff) diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index 742051f6ea10..4890b1f12348 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0)) diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 6956b91efb47..276ace12d490 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -13,8 +13,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define op(f) w2(4);w0(f);w2(5);w2(0xd);w2(5);w2(0xd);w2(5);w2(4); #define vl(v) w2(4);w0(v);w2(5);w2(7);w2(5);w2(4); diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 1d90eb9b541e..dc47a54b121f 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 77a3e5a3f062..a1dc639665dc 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include "pata_parport.h" #define DRV_NAME "pata_parport" diff --git a/include/linux/pata_parport.h b/drivers/ata/pata_parport/pata_parport.h similarity index 100% rename from include/linux/pata_parport.h rename to drivers/ata/pata_parport/pata_parport.h