From patchwork Mon Mar 6 17:27:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65009 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1978701wrd; Mon, 6 Mar 2023 09:42:00 -0800 (PST) X-Google-Smtp-Source: AK7set8zotpBkwjPtAzEp+ajyYdZXRnDkC7DqFOMRpuAf/tUwGH0iHtxgZMKPvaNA00poeUTnqtB X-Received: by 2002:aa7:980c:0:b0:5dc:2064:f7c4 with SMTP id e12-20020aa7980c000000b005dc2064f7c4mr11561734pfl.10.1678124520422; Mon, 06 Mar 2023 09:42:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678124520; cv=none; d=google.com; s=arc-20160816; b=ThP1B/0UVHxYWcO3P5XfBz5jvLJLZOc4SOJQIrFyQEku06CxWvDPJSXerzy7BAxz4w 4ixmM0sVfXXPkjUS6j3FyctykJUyIlPzfwQfTiCze7pK95VuRMYTrs1m0lTlwREU7MY+ Om1QgaXnJdmOBbEQ19XHmkhz/AxpwJtvimHga7Xa7CecdEw8BloecFR4FFBHXOlMNR/7 lyTIg0g3kS7bbZacCRzgWnYQixd4HHf2GlXdMHXAE0TDlncyqzxnd7SbrE0nLFzjLww7 c44Xu5fY7Xv3HMpBcSewuUe1NORcc3ctqrBQxD0WuN3dVZgQNbJGqC4LwiubSekbBzDg gkyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=J042bp6UcXZuo/TCdZbT4kKR5gzxatLyvEnFvL9Wce0=; b=IUxDWnPdECA5RQYXRIKfinuvGQUcCq0tJBT9V+vmhKWkDX3L/6JsPFgN0gG3PPOcNO GVX1QYBmvYTchZorzCypUk9QupqaPqEYBZYdsmcn/ywQM17FljD4V7mHOobA9K6fcJG2 6wwjToFABoNRn1R0As+TFJQbY2mjwed6TSLo/BFfXSN2rfbWHUtodcoQIIVjsRPQPv/c XQS3Rleq9UZfWlAqSKygothNXW+f5UbiSqcBjMhpTHPyIHV0tDhZJW0muMsUHr7Ses1S r4y7QC4TGlx2Q2culYVBPl3A13vCS5UE1LFCq89txZ8XsoByGGViAC1Im2Ozd1luS/Fn iBng== 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 x184-20020a6231c1000000b005a9d56804c1si9465922pfx.31.2023.03.06.09.41.47; Mon, 06 Mar 2023 09:42:00 -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 S230367AbjCFRai (ORCPT + 99 others); Mon, 6 Mar 2023 12:30:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbjCFRaG (ORCPT ); Mon, 6 Mar 2023 12:30:06 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 10CEF69056; Mon, 6 Mar 2023 09:29:29 -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 3B3C77A03CC; Mon, 6 Mar 2023 18:28:28 +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: Mon, 6 Mar 2023 18:27:35 +0100 Message-Id: <20230306172752.7727-2-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759641096856816115?= X-GMAIL-MSGID: =?utf-8?q?1759641096856816115?= CONFIG_PARIDE_EPATC8 was renamed to CONFIG_PATA_PARPORT_EPATC8 but epat.c was not updated to reflect that. Update it. Reported-by: Sergey Shtylyov Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/epat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 6ce2dee7657f..93ee91d9338b 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -324,7 +324,7 @@ static struct pi_protocol epat = { static int __init epat_init(void) { -#ifdef CONFIG_PARIDE_EPATC8 +#ifdef CONFIG_PATA_PARPORT_EPATC8 epatc8 = 1; #endif return paride_register(&epat); From patchwork Mon Mar 6 17:27:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65023 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1992136wrd; Mon, 6 Mar 2023 10:07:08 -0800 (PST) X-Google-Smtp-Source: AK7set/HCuEbhQaH3tlHwQDCtNv5FkoyOK1by8FODagXJTLcFNGtmFiwVYhZdNPSyLff2xtSwbF2 X-Received: by 2002:a05:6a20:a00d:b0:bf:58d1:ce92 with SMTP id p13-20020a056a20a00d00b000bf58d1ce92mr11800243pzj.17.1678126027965; Mon, 06 Mar 2023 10:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126027; cv=none; d=google.com; s=arc-20160816; b=DNvsokunvFsrsZWvMbQPIR4C8EkDIvDrZ51twP+RfBluVV8UBnfyc55QyOub/31VwN KWH0fO7ygPw1h9VrlfJeqyViovTXphQ5A/82nWcw3+SSDRu4zMr8cSvUX+ufg5i1Fnl1 /XqDqLlNAonB6JvTLTnL0px4/p0g/kOiAHtHNWIReOsLaa4SpIOzRlUh4Il5ueXRBj39 yw4f8AF0ytZHdnUc3GHfN0Zg+aFziBGGmVyY6KXIJTlIaZaQWl+a/KsBmz/HkoLQHwt6 yBME81OU5My2UKL0CVWqhe7LMLOKtfhBlCyZ0etf4A631OUDf994LfWG41jjK7dcnRrk vPxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SLjJhfx9TSmsXcKqWz41uztohQuSfa5OlIGd5AVBdMg=; b=013Hh7kW7PBy6gombBaw8e31R8uFm/Nb5r/YkchbhzpHs61z+jGJWxYikN6AvFb7CN 3PwjbKB3aJI+YN5TKIEdneXPh9elCDmdVDQYPUEzS9sCLOhX769My2DD+eBqr9LXLtIj lkIF7PLUOMRo1R7M7oLKXILs0oho3cWztnWCJ2ySa+59fe4wRcgCwZlkca3TCKDLTOra pEDAI5UxCoyDE/R5pOuzi5iJha0i0XqVbHpl0sTNGIe3goKCD+4UPPWvBnYL2+0a7BGU 4ue9KpUfqEI1ckoapCsmglaUxcLFMHhATLVsqZXUU3z6rdL8SVkjkyPCKQuGVoR7TJFM Z3+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 16-20020a630b10000000b004fab9a4430csi9340529pgl.177.2023.03.06.10.06.55; Mon, 06 Mar 2023 10:07: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 S230460AbjCFR4P (ORCPT + 99 others); Mon, 6 Mar 2023 12:56:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbjCFRzs (ORCPT ); Mon, 6 Mar 2023 12:55:48 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B3616907C; Mon, 6 Mar 2023 09:55:17 -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 4CD087A047E; Mon, 6 Mar 2023 18:28:28 +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: Mon, 6 Mar 2023 18:27:36 +0100 Message-Id: <20230306172752.7727-3-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759642678029227197?= X-GMAIL-MSGID: =?utf-8?q?1759642678029227197?= Only unit 0 is probed after registering a protocol driver or attaching a new parport. This causes bpck and bpck6 devices to be not detected automatically. Probe all units just like in manual device creation (using sysfs). Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/pata_parport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 294a266a0dda..49e99c9465fd 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -530,7 +530,7 @@ int pata_parport_register_driver(struct pi_protocol *pr) if (probe) { /* probe all parports using this protocol */ idr_for_each_entry(&parport_list, parport, port_num) - pi_init_one(parport, pr, -1, 0, -1); + pi_init_one(parport, pr, -1, -1, -1); } mutex_unlock(&pi_mutex); @@ -665,7 +665,7 @@ static void pata_parport_attach(struct parport *port) if (probe) { /* probe this port using all protocols */ idr_for_each_entry(&protocols, pr, pr_num) - pi_init_one(port, pr, -1, 0, -1); + pi_init_one(port, pr, -1, -1, -1); } mutex_unlock(&pi_mutex); } From patchwork Mon Mar 6 17:27:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65053 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2014878wrd; Mon, 6 Mar 2023 10:54:31 -0800 (PST) X-Google-Smtp-Source: AK7set/2p3T0V4+fnloPvNcCqdWOTJhbFEaCWWW+OZbHHzRWfsfa0iVzUGTgsyWC1tlKW8mqmCPD X-Received: by 2002:a17:906:ece2:b0:8af:2f5e:93e3 with SMTP id qt2-20020a170906ece200b008af2f5e93e3mr15270980ejb.29.1678128871104; Mon, 06 Mar 2023 10:54:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678128871; cv=none; d=google.com; s=arc-20160816; b=sDVBI0/ALpzKMaZRMw8iLe3CspJYPQ9DUOGW9OIPTHrxsTpjgJs992mFbz0+dioqJD leMj3/s4dmvmhDlRAK6H7Im3b4pumjoyRABV3OA0FOMoCrEPi92KrKlIBSj28VkDSyO8 +ipzT0v1tUOLUfMFK/HDa3io0fOEagD1QI21LStNb65WlEyWnoZ7RoQmjN9caBWX+j4b UAZTLYDUwmTEjnXQtOU5AumMG6n0D0n0wzn9hTyTj3gVhaoAxNr3tlUMAWLGwsWLmju7 DGQodse4YhfEtbKTcUEgMqxg/Ra67GDC7HIgrNVnUQcTRQNNZY3CLH/cdO8/Hwkmyjdl ml9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=itaEl2/MV7NrB1NLxH/2G5OlmXYqlrvaP8KEI3d5iUU=; b=fRypM+J2KKyaKlM41xdsAz5cmpBHxwoPV7yzqFqqnSILoQzmVhQ9OaN5KmBJC8YvXH 2VPSohMWFrcxl/yembr+Cw+0HMTrt0F+HAJ6NoeRiopBNU/IC1iX4Lt4Aqw26vJbwvRi 5CfV+Kcbs7jNcX3vbA4QWUl9I+zVOCz4zXuCnMEf1Ye4I9v296SFta6yx6Zq6+BmAJhW GdIE4UoFG7DiEDIOO9zl4ntt6tFGw360SLokT82zKAbYYMamPHeEkgWlNLckFFk2PbPV UgwB23JsPG8V5oQPXjytH5OzeyLmR1LqXjPEb71uk8dfpYoF9GrxVb8P9fDIS00LwntR LjOg== 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 m24-20020a056402051800b004abd2054781si11498136edv.92.2023.03.06.10.54.07; Mon, 06 Mar 2023 10:54:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230005AbjCFSni (ORCPT + 99 others); Mon, 6 Mar 2023 13:43:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229969AbjCFSng (ORCPT ); Mon, 6 Mar 2023 13:43:36 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1371D2E806; Mon, 6 Mar 2023 10:43:32 -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 6582E7A0568; Mon, 6 Mar 2023 18:28:28 +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: Mon, 6 Mar 2023 18:27:37 +0100 Message-Id: <20230306172752.7727-4-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759645659266532858?= X-GMAIL-MSGID: =?utf-8?q?1759645659266532858?= Convert comm and kbic drivers to use standard swab16. Remove pi_swab16 and pi_swab32. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/comm.c | 7 +++++-- drivers/ata/pata_parport/kbic.c | 7 +++++-- include/linux/pata_parport.h | 17 ----------------- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 1775e7ed9336..11ed9fb57744 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -165,11 +165,14 @@ static void comm_write_block( PIA *pi, char * buf, int count ) break; case 3: w3(0x48); (void)r1(); - for (k=0;kport + 4)) #define r4l() (delay_p, inl(pi->port + 4)) -static inline u16 pi_swab16(char *b, int k) -{ - union { u16 u; char t[2]; } r; - - r.t[0] = b[2 * k + 1]; r.t[1] = b[2 * k]; - return r.u; -} - -static inline u32 pi_swab32(char *b, int k) -{ - union { u32 u; char f[4]; } r; - - r.f[0] = b[4 * k + 1]; r.f[1] = b[4 * k]; - r.f[2] = b[4 * k + 3]; r.f[3] = b[4 * k + 2]; - return r.u; -} - struct pi_protocol { char name[8]; From patchwork Mon Mar 6 17:27:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65045 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2011346wrd; Mon, 6 Mar 2023 10:46:17 -0800 (PST) X-Google-Smtp-Source: AK7set8eLIR+g8/KCBgCfn5ZTqo2h+jShVho69yOkXjLqjkS39pCdliwKtjGtW3PApferUB0VTho X-Received: by 2002:a17:907:8a0a:b0:906:449c:e2e with SMTP id sc10-20020a1709078a0a00b00906449c0e2emr12874504ejc.34.1678128377404; Mon, 06 Mar 2023 10:46:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678128377; cv=none; d=google.com; s=arc-20160816; b=vIFRia8pI1iYuxbEDUGSldwSSQY7hWgPIXWZLOqBafa2JWDEUhgwHbSVv9DwdidyAt KzuaYgzi0uTzJOwSeKRQF0HGmll0s9HqQscNyOpD/Fkv7aysTMcWpKrRdRVk6B551ulD ADaFflEiFUkCZZtuDSI0h0mcQ1AnxTGQPuv25jf9e1/Xqfg2keRyyq+kikvJyKqKjiuf zjJTLQoQfJfIDi6pKrKiYzJUCwaqWdNJnWSiYffjWEmS3KR+rfAxKoRQVU2SGkLF4aDK 12NtAvLQx4/IwpHbRTo7vOkHzH8arukET42r3Fp64SWoPuTicJr9uTR1cbmqKzcFsLxk ejEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PsWmvBrxwSyL+1787HLgbMdi6C/zFjVQTfKu2TxAkes=; b=i+/h+OVbCCwDiDKYImSeJN5YOawriEsZ46mcC7kySgtLs0V9V8of0V1cTEvf4uF/JS TeWJ/DWOr8OIMxHHO2x8t5SfCgtpqd6he3hc8MFJ0ceCdQ9RrSdG/lWtVIbLQlOh+BRh ljBCkHKr6eszqEsEsU1eIj/GAOQ+jg96BpJ3ARwz1r00sRejBuQj2djiQ2MYjdWI5Lp+ 2/aYNFo66yVvEOVN/JXq8l8fdDPeq7NxwGu7LIgQ2Mp2kMKCWtDNz/Lu4w7+AlPZPSLu 4AQm/6kVE1eYqRXQfK3bURiEN+l6llQD/LcbYzZiLO5It5xLhlSPy6VAGhnApIyv0LmS 0QmQ== 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 rk2-20020a170907214200b008b7dc7540b7si10996534ejb.194.2023.03.06.10.45.40; Mon, 06 Mar 2023 10:46:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbjCFSnl (ORCPT + 99 others); Mon, 6 Mar 2023 13:43:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbjCFSng (ORCPT ); Mon, 6 Mar 2023 13:43:36 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1448C4BE86; Mon, 6 Mar 2023 10:43:32 -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 7E1247A05AB; Mon, 6 Mar 2023 18:28:28 +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: Mon, 6 Mar 2023 18:27:38 +0100 Message-Id: <20230306172752.7727-5-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759645141840536922?= X-GMAIL-MSGID: =?utf-8?q?1759645141840536922?= bpck6 prints some useless messages on module_init. Remove them. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck6.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index d897e2a28efe..3b3a40e48b21 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -247,10 +247,6 @@ static struct pi_protocol bpck6 = { static int __init bpck6_init(void) { - printk(KERN_INFO "bpck6: BACKPACK Protocol Driver V"BACKPACK_VERSION"\n"); - printk(KERN_INFO "bpck6: Copyright 2001 by Micro Solutions, Inc., DeKalb IL. USA\n"); - if(verbose) - printk(KERN_DEBUG "bpck6: verbose debug enabled.\n"); return paride_register(&bpck6); } From patchwork Mon Mar 6 17:27:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65035 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2006671wrd; Mon, 6 Mar 2023 10:36:13 -0800 (PST) X-Google-Smtp-Source: AK7set8Fq6OMMOYkLGFj32d5oQr7aCzwfsM90X2TDD/ukDpt4gHyQ28ZRklKa0Lnp+HTxSF/EYXE X-Received: by 2002:aa7:c585:0:b0:4bf:38dc:d78 with SMTP id g5-20020aa7c585000000b004bf38dc0d78mr12124261edq.21.1678127773539; Mon, 06 Mar 2023 10:36:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678127773; cv=none; d=google.com; s=arc-20160816; b=VrT5LlQKuxZiqFHb4IYeVB99BiRld/Pk+AFsraEh5JkewvO813jBFQzyQlbPa18aS8 FoEU+rev1V1o2xv6HXbOy5VAl7Z2nOEzGwuAU1qU2K+woTkJJNSyjeqhxgZ8dGz7vb9M QtTkatd6YNMt3uKVL8i7MnzpcZJhTA1inVQPR1is7C2smEDAPDIb0hYyXxoS7RUh9GMg Pg//8aFQyA/i21DGfLf8Cw9yOpiZbp0x74h/DyY6FH/RgKcAD/i6E8kP3Z/EeMKjVbAp zwnDxjo8Uo590BKR2qmo/8xADtzjTUW1uhW9zSvqb9ia4RymRlIFRS+QN5aC+mpWJ484 4ojg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RDltdvzp9+/CB1T0NdXWNR9PWrj7XavY9FpOuXzZ/+4=; b=QIfYckTgBhokZ/Q0c2HkhKSdmwesy/Je4kIePXhN1hxWCGALvEABuNjFvThuCsTwUv lWpBWOttmuSkwxBPuv2xdGFT2CCLtFQDpKZweKy/GmSF8ls7Kau5Smd4JoGr1cDUHeBU sMgGLTEQn/4mkpw1T/R2966UWIddA2XzBxd0ig8dNtb+Z/3LHpYftdoxvM6HYVAeXvC9 HDyXmTVmsU5f/O6IWV2Sl3MlI7X/ItTtH+ESAJ3iGl8ezEGbNTUA/JNkbRdsaAI4y/yv CqxI2urF4BLlB6cF3hFN+o+mj3U5G7pOUBQ5jeVaC/8a5HPL15pxjqvM6NeVM7zmw7Jv RDWA== 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 hr23-20020a1709073f9700b008d6d20d1920si10151000ejc.35.2023.03.06.10.35.50; Mon, 06 Mar 2023 10:36:13 -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 S230161AbjCFSYU (ORCPT + 99 others); Mon, 6 Mar 2023 13:24:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbjCFSYQ (ORCPT ); Mon, 6 Mar 2023 13:24:16 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B73DD7DB2; Mon, 6 Mar 2023 10:23:58 -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 9B8B27A05BD; Mon, 6 Mar 2023 18:28:28 +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: Mon, 6 Mar 2023 18:27:39 +0100 Message-Id: <20230306172752.7727-6-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759644508335546854?= X-GMAIL-MSGID: =?utf-8?q?1759644508335546854?= Introduce module_pata_parport_driver macro and use it in protocol drivers to reduce boilerplate code. Remove paride_(un)register compatibility defines. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 13 +------------ drivers/ata/pata_parport/bpck.c | 13 +------------ drivers/ata/pata_parport/bpck6.c | 13 +------------ drivers/ata/pata_parport/comm.c | 13 +------------ drivers/ata/pata_parport/dstr.c | 13 +------------ drivers/ata/pata_parport/epat.c | 4 ++-- drivers/ata/pata_parport/epia.c | 13 +------------ drivers/ata/pata_parport/fit2.c | 13 +------------ drivers/ata/pata_parport/fit3.c | 13 +------------ drivers/ata/pata_parport/friq.c | 13 +------------ drivers/ata/pata_parport/frpw.c | 13 +------------ drivers/ata/pata_parport/kbic.c | 10 +++++----- drivers/ata/pata_parport/ktti.c | 13 +------------ drivers/ata/pata_parport/on20.c | 13 +------------ drivers/ata/pata_parport/on26.c | 13 +------------ include/linux/pata_parport.h | 14 +++++++++++--- 16 files changed, 31 insertions(+), 166 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index b66508bedbd0..9e6098f90162 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -147,16 +147,5 @@ static struct pi_protocol aten = { .log_adapter = aten_log_adapter, }; -static int __init aten_init(void) -{ - return paride_register(&aten); -} - -static void __exit aten_exit(void) -{ - paride_unregister( &aten ); -} - MODULE_LICENSE("GPL"); -module_init(aten_init) -module_exit(aten_exit) +module_pata_parport_driver(aten); diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 5fb3cf9ba11d..b9174cf8863c 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -462,16 +462,5 @@ static struct pi_protocol bpck = { .log_adapter = bpck_log_adapter, }; -static int __init bpck_init(void) -{ - return paride_register(&bpck); -} - -static void __exit bpck_exit(void) -{ - paride_unregister(&bpck); -} - MODULE_LICENSE("GPL"); -module_init(bpck_init) -module_exit(bpck_exit) +module_pata_parport_driver(bpck); diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 3b3a40e48b21..3c358e66db25 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -245,19 +245,8 @@ static struct pi_protocol bpck6 = { .release_proto = bpck6_release_proto, }; -static int __init bpck6_init(void) -{ - return paride_register(&bpck6); -} - -static void __exit bpck6_exit(void) -{ - paride_unregister(&bpck6); -} - MODULE_LICENSE("GPL"); MODULE_AUTHOR("Micro Solutions Inc."); MODULE_DESCRIPTION("BACKPACK Protocol module, compatible with PARIDE"); module_param(verbose, bool, 0644); -module_init(bpck6_init) -module_exit(bpck6_exit) +module_pata_parport_driver(bpck6); diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 11ed9fb57744..47f0fbccc3aa 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -206,16 +206,5 @@ static struct pi_protocol comm = { .log_adapter = comm_log_adapter, }; -static int __init comm_init(void) -{ - return paride_register(&comm); -} - -static void __exit comm_exit(void) -{ - paride_unregister(&comm); -} - MODULE_LICENSE("GPL"); -module_init(comm_init) -module_exit(comm_exit) +module_pata_parport_driver(comm); diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index edf414d186a6..e733a2512e17 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -218,16 +218,5 @@ static struct pi_protocol dstr = { .log_adapter = dstr_log_adapter, }; -static int __init dstr_init(void) -{ - return paride_register(&dstr); -} - -static void __exit dstr_exit(void) -{ - paride_unregister(&dstr); -} - MODULE_LICENSE("GPL"); -module_init(dstr_init) -module_exit(dstr_exit) +module_pata_parport_driver(dstr); diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 93ee91d9338b..7583d07083a8 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -327,12 +327,12 @@ static int __init epat_init(void) #ifdef CONFIG_PATA_PARPORT_EPATC8 epatc8 = 1; #endif - return paride_register(&epat); + return pata_parport_register_driver(&epat); } static void __exit epat_exit(void) { - paride_unregister(&epat); + pata_parport_unregister_driver(&epat); } MODULE_LICENSE("GPL"); diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 417d5a3c7f72..2bcb18a6845a 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -301,16 +301,5 @@ static struct pi_protocol epia = { .log_adapter = epia_log_adapter, }; -static int __init epia_init(void) -{ - return paride_register(&epia); -} - -static void __exit epia_exit(void) -{ - paride_unregister(&epia); -} - MODULE_LICENSE("GPL"); -module_init(epia_init) -module_exit(epia_exit) +module_pata_parport_driver(epia); diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 3c7a1069b026..c63f0cd2ea52 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -136,16 +136,5 @@ static struct pi_protocol fit2 = { .log_adapter = fit2_log_adapter, }; -static int __init fit2_init(void) -{ - return paride_register(&fit2); -} - -static void __exit fit2_exit(void) -{ - paride_unregister(&fit2); -} - MODULE_LICENSE("GPL"); -module_init(fit2_init) -module_exit(fit2_exit) +module_pata_parport_driver(fit2); diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index cd95f4f0edc2..adbef142c88f 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -196,16 +196,5 @@ static struct pi_protocol fit3 = { .log_adapter = fit3_log_adapter, }; -static int __init fit3_init(void) -{ - return paride_register(&fit3); -} - -static void __exit fit3_exit(void) -{ - paride_unregister(&fit3); -} - MODULE_LICENSE("GPL"); -module_init(fit3_init) -module_exit(fit3_exit) +module_pata_parport_driver(fit3); diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index da1d0cb016d6..e740fe933e20 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -261,16 +261,5 @@ static struct pi_protocol friq = { .release_proto = friq_release_proto, }; -static int __init friq_init(void) -{ - return paride_register(&friq); -} - -static void __exit friq_exit(void) -{ - paride_unregister(&friq); -} - MODULE_LICENSE("GPL"); -module_init(friq_init) -module_exit(friq_exit) +module_pata_parport_driver(friq); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 7bc8fa16d5d8..8c8681812bed 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -298,16 +298,5 @@ static struct pi_protocol frpw = { .log_adapter = frpw_log_adapter, }; -static int __init frpw_init(void) -{ - return paride_register(&frpw); -} - -static void __exit frpw_exit(void) -{ - paride_unregister(&frpw); -} - MODULE_LICENSE("GPL"); -module_init(frpw_init) -module_exit(frpw_exit) +module_pata_parport_driver(frpw); diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 93430ca32a52..b120597043cc 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -288,19 +288,19 @@ static int __init kbic_init(void) { int rv; - rv = paride_register(&k951); + rv = pata_parport_register_driver(&k951); if (rv < 0) return rv; - rv = paride_register(&k971); + rv = pata_parport_register_driver(&k971); if (rv < 0) - paride_unregister(&k951); + pata_parport_unregister_driver(&k951); return rv; } static void __exit kbic_exit(void) { - paride_unregister(&k951); - paride_unregister(&k971); + pata_parport_unregister_driver(&k951); + pata_parport_unregister_driver(&k971); } MODULE_LICENSE("GPL"); diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index fc4f707fed1f..15463cd18968 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -113,16 +113,5 @@ static struct pi_protocol ktti = { .log_adapter = ktti_log_adapter, }; -static int __init ktti_init(void) -{ - return paride_register(&ktti); -} - -static void __exit ktti_exit(void) -{ - paride_unregister(&ktti); -} - MODULE_LICENSE("GPL"); -module_init(ktti_init) -module_exit(ktti_exit) +module_pata_parport_driver(ktti); diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 995fc41e3122..f2a601e77842 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -138,16 +138,5 @@ static struct pi_protocol on20 = { .log_adapter = on20_log_adapter, }; -static int __init on20_init(void) -{ - return paride_register(&on20); -} - -static void __exit on20_exit(void) -{ - paride_unregister(&on20); -} - MODULE_LICENSE("GPL"); -module_init(on20_init) -module_exit(on20_exit) +module_pata_parport_driver(on20); diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 35f1c481a782..66f04015f19a 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -304,16 +304,5 @@ static struct pi_protocol on26 = { .log_adapter = on26_log_adapter, }; -static int __init on26_init(void) -{ - return paride_register(&on26); -} - -static void __exit on26_exit(void) -{ - paride_unregister(&on26); -} - MODULE_LICENSE("GPL"); -module_init(on26_init) -module_exit(on26_exit) +module_pata_parport_driver(on26); diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 458544fe5e6c..9614ce53470a 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -87,8 +87,16 @@ struct pi_protocol { int pata_parport_register_driver(struct pi_protocol *pr); void pata_parport_unregister_driver(struct pi_protocol *pr); -/* defines for old paride protocol modules */ -#define paride_register pata_parport_register_driver -#define paride_unregister pata_parport_unregister_driver + +/** + * module_pata_parport_driver() - Helper macro for registering a pata_parport driver + * @__pi_protocol: pi_protocol struct + * + * Helper macro for pata_parport drivers which do not do anything special in module + * init/exit. This eliminates a lot of boilerplate. Each module may only + * use this macro once, and calling it replaces module_init() and module_exit() + */ +#define module_pata_parport_driver(__pi_protocol) \ + module_driver(__pi_protocol, pata_parport_register_driver, pata_parport_unregister_driver) #endif /* LINUX_PATA_PARPORT_H */ From patchwork Mon Mar 6 17:27:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65025 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1993119wrd; Mon, 6 Mar 2023 10:08:42 -0800 (PST) X-Google-Smtp-Source: AK7set++X8UPHcfBh3ej0lCJQB2H7pK+MwbtPWOi8NBtKsgVXtpYJ04gktV6ms6yleCc58Rx5nPt X-Received: by 2002:a62:1ad4:0:b0:5a8:d407:60f9 with SMTP id a203-20020a621ad4000000b005a8d40760f9mr8900817pfa.29.1678126122236; Mon, 06 Mar 2023 10:08:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126122; cv=none; d=google.com; s=arc-20160816; b=PgRwHIzRHmTvfh9sX/c1kZAbMIQ+n2EdIWK16ny0fSPLFp0UgpwSjXrVwsan4Ac4yC 9qm/kYV36sUWfSqClw61DWSOGJKAnhP2rdQxoomXvx8i/3dh/DEjgXYtnk0ypBtDJmMc NFiQ72zxn73w5rd4hK9nqWdUcYHeJ+UUfE+SkA9ev4YT9FG0HzdgPz0rLOxOBmoiN+p9 J0slutxx7GqoPdC/eu4YBkTlkL2K43g+p5Mlf22Lqt/uWOhM5EUUAbswVIxJcqjWCeKv xAjF9jo5VJcHU2xF45DaGo88kzb2PzBJr2n/RBalhPnXWhir3VHyC8KQNdRQ17RBVcKG Sdxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=v9wsH9RhXo78KJux6d7gE9oHk5zfqcx+fJbAcY+XL4A=; b=knqw/dmPDZmaHq3kQSgsCXffTxzVe8wKBH0yClN1SBOijGy2AKp6c4IT7f5bzX0NHG 20xdsHvC3p1LDwGdpi0uc9Bomh8OTyNAcRFy2bxrw4QLfBXtIj2p2Hn++iKYvURoyEoU bts+7UI193ldfOXkZhaOdMl4lBrYP/24aceFxtf7swWfjEZM8T9Sq74eG+Zf+panLQ1H jEJLN4bh4RYpzAJwQaeAzJbjzt8u1ZEbzkZZv0Kb1D1fn3iHbapBb7JkQlqE7+c43pbS oetKTIVXr6BjccsdLVeubkMi+p29wc68LBYpoS3EodZg76gk1AZa2xh4l7ULlNzDWURV XMzQ== 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 x20-20020aa79414000000b0058e16d0b827si10494707pfo.32.2023.03.06.10.08.29; Mon, 06 Mar 2023 10:08:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230472AbjCFR4J (ORCPT + 99 others); Mon, 6 Mar 2023 12:56:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbjCFRzr (ORCPT ); Mon, 6 Mar 2023 12:55:47 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 05DBA6512E; Mon, 6 Mar 2023 09:55:15 -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 BB2A57A05D5; Mon, 6 Mar 2023 18:28:28 +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: Mon, 6 Mar 2023 18:27:40 +0100 Message-Id: <20230306172752.7727-7-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759642776816467257?= X-GMAIL-MSGID: =?utf-8?q?1759642776816467257?= Only bpck driver uses devtype but it never gets set in pata_parport. Remove it. As most bpck devices are CD-ROMs, always run the code that depends on devtype == PI_PCD. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 4 ++-- include/linux/pata_parport.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index b9174cf8863c..96386a10c22f 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -241,14 +241,14 @@ static void bpck_connect ( PIA *pi ) WR(5,8); - if (pi->devtype == PI_PCD) { +/* if (pi->devtype == PI_PCD) { possibly wrong, purpose unknown */ WR(0x46,0x10); /* fiddle with ESS logic ??? */ WR(0x4c,0x38); WR(0x4d,0x88); WR(0x46,0xa0); WR(0x41,0); WR(0x4e,8); - } +/* }*/ } static void bpck_disconnect ( PIA *pi ) diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 9614ce53470a..3fc6b002c7c8 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -11,15 +11,12 @@ #include -#define PI_PCD 1 /* dummy for paride protocol modules */ - struct pi_adapter { struct device dev; struct pi_protocol *proto; /* adapter protocol */ int port; /* base address of parallel port */ int mode; /* transfer mode in use */ int delay; /* adapter delay setting */ - int devtype; /* dummy for paride protocol modules */ char *device; /* dummy for paride protocol modules */ int unit; /* unit number for chained adapters */ int saved_r0; /* saved port state */ From patchwork Mon Mar 6 17:27:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65051 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2014707wrd; Mon, 6 Mar 2023 10:54:07 -0800 (PST) X-Google-Smtp-Source: AK7set8475fFELg58uTNy8w8Xe+932hi9Dw2h/BHawqyPGaID18FLqU/cdUERSSv1HUCtKcuYYUH X-Received: by 2002:a17:906:d296:b0:8b1:315f:6c10 with SMTP id ay22-20020a170906d29600b008b1315f6c10mr12014380ejb.56.1678128847310; Mon, 06 Mar 2023 10:54:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678128847; cv=none; d=google.com; s=arc-20160816; b=V91D7ah934UvFRkIuX/ovYosVBpQvDEbSOWJPFxJpoL4SDx/3SasabH+MFEyF6ke1T B28Mt2yHpEFtClI37eY17h34Fp00diB9+bnXIVIsVdteX6pmEvzm0Le8nPa0dfPPrZOr th+MUSdjLvptDwKaLCf1hKdt1DpJAMKtI67264fBgJNEyo6npUX5CoVdUj0x+0jea1Vg itQOQ7n/T4FZoJxfL+vgpD5BqEzjjQgAr3GQDtjloL/1KxG2t5DWXRCbY+AeXqa4Vy0M 4q6YV+dyVCknnf4cJulO3NFWLzmrUaQOXs/I6E0ADZtrdvLTrMVH5r9i9opCyk1MomEV Y8Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5yepV14SIjKeyL3bg6jP1x0VpulfICd1ui4YKvdOHqo=; b=0r8dR5LGXWAV8wz0teYE0JJrVqr+/NK2lr0EmW7dwff7t47nmbMVHXywphF6aCFxCc PgR6Aqq64cahN8ODR2c+kGzMJojQ9PoBiDP1xEwhrbqjbgKluSiTe4DyWjBVIMnRtLXR OkxFrDMQbrht+Zf7ezgBi8WWqBfChHiGS7ZMJ5UhWGLckPG32NENPebN9oO28dEzJ//k n/kLar5fNFUKljgjFx8p8gkGk9Nr63PcEl3V/38DA2dvg17dCy4/k1n+uQPht0lI+VbL O91eoi+NjqsAq+sGTZ8ueS17+653jfacbnZ0V0mn//KXPVlxVDGuAX7TWKwG8+jRE5Bv 5XpQ== 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 j20-20020a50ed14000000b004c1088e6acasi10763989eds.471.2023.03.06.10.53.43; Mon, 06 Mar 2023 10:54: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 S230236AbjCFSYa (ORCPT + 99 others); Mon, 6 Mar 2023 13:24:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbjCFSYS (ORCPT ); Mon, 6 Mar 2023 13:24:18 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E3593B84B; Mon, 6 Mar 2023 10:23:59 -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 DA4027A05DC; Mon, 6 Mar 2023 18:28:28 +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: Mon, 6 Mar 2023 18:27:41 +0100 Message-Id: <20230306172752.7727-8-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759645633831602777?= X-GMAIL-MSGID: =?utf-8?q?1759645633831602777?= device is never set in pata_parport, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 3 +-- drivers/ata/pata_parport/bpck.c | 12 ++++++------ drivers/ata/pata_parport/bpck6.c | 10 ++++------ drivers/ata/pata_parport/comm.c | 3 +-- drivers/ata/pata_parport/dstr.c | 3 +-- drivers/ata/pata_parport/epat.c | 8 ++++---- drivers/ata/pata_parport/epia.c | 7 +++---- drivers/ata/pata_parport/fit2.c | 5 +++-- drivers/ata/pata_parport/fit3.c | 4 ++-- drivers/ata/pata_parport/friq.c | 6 +++--- drivers/ata/pata_parport/frpw.c | 12 +++++------- drivers/ata/pata_parport/kbic.c | 3 +-- drivers/ata/pata_parport/ktti.c | 5 +++-- drivers/ata/pata_parport/on20.c | 3 +-- drivers/ata/pata_parport/on26.c | 3 +-- include/linux/pata_parport.h | 1 - 16 files changed, 39 insertions(+), 49 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 9e6098f90162..bf83e4188c23 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -124,8 +124,7 @@ static void aten_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[2] = {"4-bit","8-bit"}; - printk("%s: aten %s, ATEN EH-100 at 0x%x, ", - pi->device,ATEN_VERSION,pi->port); + printk("aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 96386a10c22f..c33ca1cb72ac 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -335,8 +335,8 @@ static int bpck_test_proto( PIA *pi, char * scratch, int verbose ) } if (verbose) { - printk("%s: bpck: 0x%x unit %d mode %d: ", - pi->device,pi->port,pi->unit,pi->mode); + printk("bpck: 0x%x unit %d mode %d: ", + pi->port, pi->unit, pi->mode); for (i=0;i '~')) scratch[i] = '.'; - printk("%s: bpck EEPROM: %64.64s\n",pi->device,scratch); - printk("%s: %64.64s\n",pi->device,&scratch[64]); + printk("bpck EEPROM: %64.64s\n", scratch); + printk(" %64.64s\n", &scratch[64]); } #endif - printk("%s: bpck %s, backpack %8.8s unit %d", - pi->device,BPCK_VERSION,&scratch[110],pi->unit); + printk("bpck %s, backpack %8.8s unit %d", + BPCK_VERSION, &scratch[110], pi->unit); printk(" at 0x%x, mode %d (%s), delay %d\n",pi->port, pi->mode,mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 3c358e66db25..13bfd60655dd 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -200,11 +200,9 @@ static void bpck6_log_adapter( PIA *pi, char * scratch, int verbose ) char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - printk("%s: BACKPACK Protocol Driver V"BACKPACK_VERSION"\n",pi->device); - printk("%s: Copyright 2001 by Micro Solutions, Inc., DeKalb IL.\n",pi->device); - printk("%s: BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", - pi->device,BACKPACK_VERSION,pi->port); - printk("%s: Unit: %d Mode:%d (%s) Delay %d\n",pi->device, + printk("BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", + BACKPACK_VERSION, pi->port); + printk("Unit: %d Mode:%d (%s) Delay %d\n", pi->unit,pi->mode,mode_string[pi->mode],pi->delay); } @@ -217,7 +215,7 @@ static int bpck6_init_proto(PIA *pi) return 0; } - printk(KERN_ERR "%s: ERROR COULDN'T ALLOCATE MEMORY\n", pi->device); + printk(KERN_ERR "ERROR COULDN'T ALLOCATE MEMORY\n"); return -1; } diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 47f0fbccc3aa..908f6c44548b 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -183,8 +183,7 @@ static void comm_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - printk("%s: comm %s, DataStor Commuter at 0x%x, ", - pi->device,COMM_VERSION,pi->port); + printk("comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index e733a2512e17..3732e9b79429 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -195,8 +195,7 @@ static void dstr_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - printk("%s: dstr %s, DataStor EP2000 at 0x%x, ", - pi->device,DSTR_VERSION,pi->port); + printk("dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 7583d07083a8..59720daa9c19 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -280,8 +280,8 @@ static int epat_test_proto( PIA *pi, char * scratch, int verbose ) epat_disconnect(pi); if (verbose) { - printk("%s: epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", - pi->device,pi->port,pi->mode,cc,e[0],e[1],f); + printk("epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", + pi->port, pi->mode, cc, e[0], e[1], f); } return (e[0] && e[1]) || f; @@ -298,8 +298,8 @@ static void epat_log_adapter( PIA *pi, char * scratch, int verbose ) ver = RR(0xb); epat_disconnect(pi); - printk("%s: epat %s, Shuttle EPAT chip %x at 0x%x, ", - pi->device,EPAT_VERSION,ver,pi->port); + printk("epat %s, Shuttle EPAT chip %x at 0x%x, ", + EPAT_VERSION, ver, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 2bcb18a6845a..610269083441 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -263,8 +263,8 @@ static int epia_test_proto( PIA *pi, char * scratch, int verbose ) epia_disconnect(pi); if (verbose) { - printk("%s: epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->device,pi->port,pi->mode,e[0],e[1],f); + printk("epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", + pi->port, pi->mode, e[0], e[1], f); } return (e[0] && e[1]) || f; @@ -277,8 +277,7 @@ static void epia_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; - printk("%s: epia %s, Shuttle EPIA at 0x%x, ", - pi->device,EPIA_VERSION,pi->port); + printk("epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index c63f0cd2ea52..28de8e4e41c3 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -115,8 +115,9 @@ static void fit2_disconnect ( PIA *pi ) static void fit2_log_adapter( PIA *pi, char * scratch, int verbose ) -{ printk("%s: fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", - pi->device,FIT2_VERSION,pi->port,pi->delay); +{ + printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", + FIT2_VERSION, pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index adbef142c88f..0366f3123508 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -173,9 +173,9 @@ static void fit3_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; - printk("%s: fit3 %s, FIT 3000 adapter at 0x%x, " + printk("fit3 %s, FIT 3000 adapter at 0x%x, " "mode %d (%s), delay %d\n", - pi->device,FIT3_VERSION,pi->port, + FIT3_VERSION, pi->port, pi->mode,mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index e740fe933e20..9306a2c78d90 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -208,8 +208,8 @@ static int friq_test_proto( PIA *pi, char * scratch, int verbose ) friq_disconnect(pi); if (verbose) { - printk("%s: friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->device,pi->port,pi->mode,e[0],e[1],r); + printk("friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", + pi->port, pi->mode, e[0], e[1], r); } return (r || (e[0] && e[1])); @@ -221,7 +221,7 @@ static void friq_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; - printk("%s: friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", pi->device, + printk("friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", FRIQ_VERSION,pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 8c8681812bed..63f2165fec63 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -231,15 +231,13 @@ static int frpw_test_proto( PIA *pi, char * scratch, int verbose ) if (((pi->private%2) == 0) && (pi->mode > 2)) { if (verbose) - printk("%s: frpw: Xilinx does not support mode %d\n", - pi->device, pi->mode); + printk("frpw: Xilinx does not support mode %d\n", pi->mode); return 1; } if (((pi->private%2) == 1) && (pi->mode == 2)) { if (verbose) - printk("%s: frpw: ASIC does not support mode 2\n", - pi->device); + printk("frpw: ASIC does not support mode 2\n"); return 1; } @@ -261,8 +259,8 @@ static int frpw_test_proto( PIA *pi, char * scratch, int verbose ) frpw_disconnect(pi); if (verbose) { - printk("%s: frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n", - pi->device,pi->port,(pi->private%2),pi->mode,e[0],e[1],r); + printk("frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n", + pi->port, (pi->private%2), pi->mode, e[0], e[1], r); } return (r || (e[0] && e[1])); @@ -274,7 +272,7 @@ static void frpw_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; - printk("%s: frpw %s, Freecom (%s) adapter at 0x%x, ", pi->device, + printk("frpw %s, Freecom (%s) adapter at 0x%x, ", FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index b120597043cc..9a99b9e35d41 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -235,8 +235,7 @@ static void kbic_log_adapter( PIA *pi, char * scratch, { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; - printk("%s: kbic %s, KingByte %s at 0x%x, ", - pi->device,KBIC_VERSION,chip,pi->port); + printk("kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index 15463cd18968..d87eb3c139bc 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -92,8 +92,9 @@ static void ktti_disconnect ( PIA *pi ) static void ktti_log_adapter( PIA *pi, char * scratch, int verbose ) -{ printk("%s: ktti %s, KT adapter at 0x%x, delay %d\n", - pi->device,KTTI_VERSION,pi->port,pi->delay); +{ + printk("ktti %s, KT adapter at 0x%x, delay %d\n", + KTTI_VERSION, pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index f2a601e77842..0a1e60e20656 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -115,8 +115,7 @@ static void on20_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[2] = {"4-bit","8-bit"}; - printk("%s: on20 %s, OnSpec 90c20 at 0x%x, ", - pi->device,ON20_VERSION,pi->port); + printk("on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 66f04015f19a..ceb5018caeec 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -280,8 +280,7 @@ static void on26_log_adapter( PIA *pi, char * scratch, int verbose ) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - printk("%s: on26 %s, OnSpec 90c26 at 0x%x, ", - pi->device,ON26_VERSION,pi->port); + printk("on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); printk("mode %d (%s), delay %d\n",pi->mode, mode_string[pi->mode],pi->delay); diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 3fc6b002c7c8..dcab769aa639 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -17,7 +17,6 @@ struct pi_adapter { int port; /* base address of parallel port */ int mode; /* transfer mode in use */ int delay; /* adapter delay setting */ - char *device; /* dummy for paride protocol modules */ int unit; /* unit number for chained adapters */ int saved_r0; /* saved port state */ int saved_r2; /* saved port state */ From patchwork Mon Mar 6 17:27:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65022 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1992124wrd; Mon, 6 Mar 2023 10:07:06 -0800 (PST) X-Google-Smtp-Source: AK7set/ZQb0J9gI2f8j5DJmPnBxg7LDgz9eF6tnGim6LiOlj/0MY/J6GNS+jQDYHR5pyP+h/26DG X-Received: by 2002:aa7:d88c:0:b0:4ab:4c36:463c with SMTP id u12-20020aa7d88c000000b004ab4c36463cmr12333937edq.16.1678126026660; Mon, 06 Mar 2023 10:07:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126026; cv=none; d=google.com; s=arc-20160816; b=OEYHnTqThXckW+Uek8hrtglbl98b4cCYkzKNtZaQsQksLIxH6jcPBFcj7S/y82QcZl N8DX8yCR4qJx3xAruB3Xp5ex9h5ipVkPtDdtkkGytGPM4k+raADGmmG1OM9en04OAUlA BCPuyg8BBDZ7pdqzUhMg7Y37L7oHu/evAYKes7cisW/oC3rYzmXpfEmKtnlcMo28Nhfh WnZlAN0C+x9QcH/2Lq3fOkGB8KDB+zGtPF8PwcxkF30PvefLp+HURh/ilVyjR3GXHYSY VVIbXlkZq0e3Z530vHlezh73o08SrRVD3ebkvAt4ac3lfLwTgqFiRrWs5sjMr9yUqk2l ta3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MSbK1bg2ANXTTBqrKnFhUz49EqngzKbWQzSpEOhTJQk=; b=s/UT3pIk91EW41ctr0d5HWv72MHmB2kmWFB82PABgvyqOMU4DGJ4sVrIO5xWeJzqqi 55vxTq7Osbt9dDsLdrxLKuENKuty7HXu1mIx49yNlCgodIY8ge+gipJPLBFmDaYXsimc 27mWDau8RDw6+Vceyjo4UmMuh/Yj5gSm1AWiLpcAVkziflrdvX/6dMzKnd0o4dAfEAMR dqqSYDM1yXZQ9SqsyPvLf9ZiLXgl/FK+MKdAh39Yxh/CoNtsazab76U/bWwaV8M6/7Ds 6GzIkyI3pjIUuhULQJdSMG7pvwxvCfFRSn57DMGJF1H2F18I5T4hr+qJiqkTwvWciVTZ tZAw== 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 r11-20020aa7d14b000000b004c125eb673csi452471edo.23.2023.03.06.10.06.42; Mon, 06 Mar 2023 10:07: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 S230214AbjCFRyt (ORCPT + 99 others); Mon, 6 Mar 2023 12:54:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbjCFRya (ORCPT ); Mon, 6 Mar 2023 12:54:30 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 600BE474F1; Mon, 6 Mar 2023 09:53:56 -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 0F72B7A06EC; Mon, 6 Mar 2023 18:28:29 +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: Mon, 6 Mar 2023 18:27:42 +0100 Message-Id: <20230306172752.7727-9-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759642676297241007?= X-GMAIL-MSGID: =?utf-8?q?1759642676297241007?= Remove typedef struct PIA and use struct pi_adapter directly. Fix formatting (excessive spaces) while at it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 14 +++++++------- drivers/ata/pata_parport/bpck.c | 24 ++++++++++++------------ drivers/ata/pata_parport/bpck6.c | 22 +++++++++++----------- drivers/ata/pata_parport/comm.c | 14 +++++++------- drivers/ata/pata_parport/dstr.c | 14 +++++++------- drivers/ata/pata_parport/epat.c | 16 ++++++++-------- drivers/ata/pata_parport/epia.c | 16 ++++++++-------- drivers/ata/pata_parport/fit2.c | 14 +++++++------- drivers/ata/pata_parport/fit3.c | 14 +++++++------- drivers/ata/pata_parport/friq.c | 20 ++++++++++---------- drivers/ata/pata_parport/frpw.c | 20 ++++++++++---------- drivers/ata/pata_parport/kbic.c | 24 ++++++++++++------------ drivers/ata/pata_parport/ktti.c | 14 +++++++------- drivers/ata/pata_parport/on20.c | 14 +++++++------- drivers/ata/pata_parport/on26.c | 16 ++++++++-------- include/linux/pata_parport.h | 2 -- 16 files changed, 128 insertions(+), 130 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index bf83e4188c23..4579e554fbad 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -35,7 +35,7 @@ static int cont_map[2] = { 0x08, 0x20 }; -static void aten_write_regr( PIA *pi, int cont, int regr, int val) +static void aten_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -44,7 +44,7 @@ static void aten_write_regr( PIA *pi, int cont, int regr, int val) w0(r); w2(0xe); w2(6); w0(val); w2(7); w2(6); w2(0xc); } -static int aten_read_regr( PIA *pi, int cont, int regr ) +static int aten_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -67,7 +67,7 @@ static int aten_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void aten_read_block( PIA *pi, char * buf, int count ) +static void aten_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b, c, d; @@ -95,7 +95,7 @@ static void aten_read_block( PIA *pi, char * buf, int count ) } } -static void aten_write_block( PIA *pi, char * buf, int count ) +static void aten_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -107,20 +107,20 @@ static void aten_write_block( PIA *pi, char * buf, int count ) w2(0xc); } -static void aten_connect ( PIA *pi ) +static void aten_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(0xc); } -static void aten_disconnect ( PIA *pi ) +static void aten_disconnect(struct pi_adapter *pi) { w0(pi->saved_r0); w2(pi->saved_r2); } -static void aten_log_adapter( PIA *pi, char * scratch, int verbose ) +static void aten_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index c33ca1cb72ac..46805c584730 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -46,7 +46,7 @@ static int cont_map[3] = { 0x40, 0x48, 0 }; -static int bpck_read_regr( PIA *pi, int cont, int regr ) +static int bpck_read_regr(struct pi_adapter *pi, int cont, int regr) { int r, l, h; @@ -77,7 +77,7 @@ static int bpck_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void bpck_write_regr( PIA *pi, int cont, int regr, int val ) +static void bpck_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -106,7 +106,7 @@ static void bpck_write_regr( PIA *pi, int cont, int regr, int val ) #define WR(r,v) bpck_write_regr(pi,2,r,v) #define RR(r) (bpck_read_regr(pi,2,r)) -static void bpck_write_block( PIA *pi, char * buf, int count ) +static void bpck_write_block(struct pi_adapter *pi, char *buf, int count) { int i; @@ -147,7 +147,7 @@ static void bpck_write_block( PIA *pi, char * buf, int count ) } } -static void bpck_read_block( PIA *pi, char * buf, int count ) +static void bpck_read_block(struct pi_adapter *pi, char *buf, int count) { int i, l, h; @@ -194,7 +194,7 @@ static void bpck_read_block( PIA *pi, char * buf, int count ) } } -static int bpck_probe_unit ( PIA *pi ) +static int bpck_probe_unit(struct pi_adapter *pi) { int o1, o0, f7, id; int t, s; @@ -217,7 +217,7 @@ static int bpck_probe_unit ( PIA *pi ) return 1; } -static void bpck_connect ( PIA *pi ) +static void bpck_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); w0(0xff-pi->unit); w2(4); w0(pi->unit); @@ -251,14 +251,14 @@ static void bpck_connect ( PIA *pi ) /* }*/ } -static void bpck_disconnect ( PIA *pi ) +static void bpck_disconnect(struct pi_adapter *pi) { w0(0); if (pi->mode >= 2) { w2(9); w2(0); } else t2(2); w2(0x4c); w0(pi->saved_r0); } -static void bpck_force_spp ( PIA *pi ) +static void bpck_force_spp(struct pi_adapter *pi) /* This fakes the EPP protocol to turn off EPP ... */ @@ -276,7 +276,7 @@ static void bpck_force_spp ( PIA *pi ) #define TEST_LEN 16 -static int bpck_test_proto( PIA *pi, char * scratch, int verbose ) +static int bpck_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int i, e, l, h, om; char buf[TEST_LEN]; @@ -346,7 +346,7 @@ static int bpck_test_proto( PIA *pi, char * scratch, int verbose ) return e; } -static void bpck_read_eeprom ( PIA *pi, char * buf ) +static void bpck_read_eeprom(struct pi_adapter *pi, char *buf) { int i, j, k, p, v, f, om, od; @@ -397,7 +397,7 @@ static void bpck_read_eeprom ( PIA *pi, char * buf ) pi->mode = om; pi->delay = od; } -static int bpck_test_port ( PIA *pi ) /* check for 8-bit port */ +static int bpck_test_port(struct pi_adapter *pi) /* check for 8-bit port */ { int i, r, m; @@ -416,7 +416,7 @@ static int bpck_test_port ( PIA *pi ) /* check for 8-bit port */ return 5; } -static void bpck_log_adapter( PIA *pi, char * scratch, int verbose ) +static void bpck_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5] = { "4-bit","8-bit","EPP-8", "EPP-16","EPP-32" }; diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 13bfd60655dd..8ed3cf3b627e 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -56,7 +56,7 @@ static bool verbose; /* set this to 1 to see debugging messages and whatnot */ #define ATAPI_DEVICE_CONTROL 0x0e /* device control (write) */ /****************************************************************/ -static int bpck6_read_regr(PIA *pi, int cont, int reg) +static int bpck6_read_regr(struct pi_adapter *pi, int cont, int reg) { unsigned int out; @@ -69,7 +69,7 @@ static int bpck6_read_regr(PIA *pi, int cont, int reg) return(out); } -static void bpck6_write_regr(PIA *pi, int cont, int reg, int val) +static void bpck6_write_regr(struct pi_adapter *pi, int cont, int reg, int val) { /* check for bad settings */ if (reg>=0 && reg<=7 && cont>=0 && cont<=1) @@ -78,17 +78,17 @@ static void bpck6_write_regr(PIA *pi, int cont, int reg, int val) } } -static void bpck6_write_block( PIA *pi, char * buf, int len ) +static void bpck6_write_block(struct pi_adapter *pi, char *buf, int len) { ppc6_wr_port16_blk(PPCSTRUCT(pi),ATAPI_DATA,buf,(u32)len>>1); } -static void bpck6_read_block( PIA *pi, char * buf, int len ) +static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len) { ppc6_rd_port16_blk(PPCSTRUCT(pi),ATAPI_DATA,buf,(u32)len>>1); } -static void bpck6_connect ( PIA *pi ) +static void bpck6_connect(struct pi_adapter *pi) { if(verbose) { @@ -112,7 +112,7 @@ static void bpck6_connect ( PIA *pi ) ppc6_wr_extout(PPCSTRUCT(pi),0x3); } -static void bpck6_disconnect ( PIA *pi ) +static void bpck6_disconnect(struct pi_adapter *pi) { if(verbose) { @@ -122,7 +122,7 @@ static void bpck6_disconnect ( PIA *pi ) ppc6_close(PPCSTRUCT(pi)); } -static int bpck6_test_port ( PIA *pi ) /* check for 8-bit port */ +static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */ { if(verbose) { @@ -154,7 +154,7 @@ static int bpck6_test_port ( PIA *pi ) /* check for 8-bit port */ } } -static int bpck6_probe_unit ( PIA *pi ) +static int bpck6_probe_unit(struct pi_adapter *pi) { int out; @@ -195,7 +195,7 @@ static int bpck6_probe_unit ( PIA *pi ) } } -static void bpck6_log_adapter( PIA *pi, char * scratch, int verbose ) +static void bpck6_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; @@ -206,7 +206,7 @@ static void bpck6_log_adapter( PIA *pi, char * scratch, int verbose ) pi->unit,pi->mode,mode_string[pi->mode],pi->delay); } -static int bpck6_init_proto(PIA *pi) +static int bpck6_init_proto(struct pi_adapter *pi) { Interface *p = kzalloc(sizeof(Interface), GFP_KERNEL); @@ -219,7 +219,7 @@ static int bpck6_init_proto(PIA *pi) return -1; } -static void bpck6_release_proto(PIA *pi) +static void bpck6_release_proto(struct pi_adapter *pi) { kfree((void *)(pi->private)); } diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 908f6c44548b..06c6fa29295b 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -42,7 +42,7 @@ static int cont_map[2] = { 0x08, 0x10 }; -static int comm_read_regr( PIA *pi, int cont, int regr ) +static int comm_read_regr(struct pi_adapter *pi, int cont, int regr) { int l, h, r; @@ -68,7 +68,7 @@ static int comm_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void comm_write_regr( PIA *pi, int cont, int regr, int val ) +static void comm_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -87,7 +87,7 @@ static void comm_write_regr( PIA *pi, int cont, int regr, int val ) } } -static void comm_connect ( PIA *pi ) +static void comm_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -98,14 +98,14 @@ static void comm_connect ( PIA *pi ) w2(4); w0(0xe0); w2(0xc); w2(0xc); w2(4); } -static void comm_disconnect ( PIA *pi ) +static void comm_disconnect(struct pi_adapter *pi) { w2(0); w2(0); w2(0); w2(4); w0(pi->saved_r0); w2(pi->saved_r2); } -static void comm_read_block( PIA *pi, char * buf, int count ) +static void comm_read_block(struct pi_adapter *pi, char *buf, int count) { int i, l, h; @@ -146,7 +146,7 @@ static void comm_read_block( PIA *pi, char * buf, int count ) /* NB: Watch out for the byte swapped writes ! */ -static void comm_write_block( PIA *pi, char * buf, int count ) +static void comm_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -179,7 +179,7 @@ static void comm_write_block( PIA *pi, char * buf, int count ) } } -static void comm_log_adapter( PIA *pi, char * scratch, int verbose ) +static void comm_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 3732e9b79429..8cac71eb9c03 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -44,7 +44,7 @@ static int cont_map[2] = { 0x20, 0x40 }; -static int dstr_read_regr( PIA *pi, int cont, int regr ) +static int dstr_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -71,7 +71,7 @@ static int dstr_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void dstr_write_regr( PIA *pi, int cont, int regr, int val ) +static void dstr_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -98,21 +98,21 @@ static void dstr_write_regr( PIA *pi, int cont, int regr, int val ) w0(0xaa);w0(0x55);w0(0);w0(0xff);w0(0x87);w0(0x78);\ w0(x);w2(5);w2(4); -static void dstr_connect ( PIA *pi ) +static void dstr_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(4); CCP(0xe0); w0(0xff); } -static void dstr_disconnect ( PIA *pi ) +static void dstr_disconnect(struct pi_adapter *pi) { CCP(0x30); w0(pi->saved_r0); w2(pi->saved_r2); } -static void dstr_read_block( PIA *pi, char * buf, int count ) +static void dstr_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b; @@ -154,7 +154,7 @@ static void dstr_read_block( PIA *pi, char * buf, int count ) } } -static void dstr_write_block( PIA *pi, char * buf, int count ) +static void dstr_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -190,7 +190,7 @@ static void dstr_write_block( PIA *pi, char * buf, int count ) } -static void dstr_log_adapter( PIA *pi, char * scratch, int verbose ) +static void dstr_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 59720daa9c19..9276dcb261d8 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -44,7 +44,7 @@ MODULE_PARM_DESC(epatc8, "support for the Shuttle EP1284 chip, " static int cont_map[3] = { 0x18, 0x10, 0 }; -static void epat_write_regr( PIA *pi, int cont, int regr, int val) +static void epat_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -65,7 +65,7 @@ static void epat_write_regr( PIA *pi, int cont, int regr, int val) } } -static int epat_read_regr( PIA *pi, int cont, int regr ) +static int epat_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -94,7 +94,7 @@ static int epat_read_regr( PIA *pi, int cont, int regr ) return -1; /* never gets here */ } -static void epat_read_block( PIA *pi, char * buf, int count ) +static void epat_read_block(struct pi_adapter *pi, char *buf, int count) { int k, ph, a, b; @@ -159,7 +159,7 @@ static void epat_read_block( PIA *pi, char * buf, int count ) } } -static void epat_write_block( PIA *pi, char * buf, int count ) +static void epat_write_block(struct pi_adapter *pi, char *buf, int count) { int ph, k; @@ -210,7 +210,7 @@ static void epat_write_block( PIA *pi, char * buf, int count ) #define CPP(x) w2(4);w0(0x22);w0(0xaa);w0(0x55);w0(0);w0(0xff);\ w0(0x87);w0(0x78);w0(x);w2(4);w2(5);w2(4);w0(0xff); -static void epat_connect ( PIA *pi ) +static void epat_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -242,13 +242,13 @@ static void epat_connect ( PIA *pi ) } } -static void epat_disconnect (PIA *pi) +static void epat_disconnect(struct pi_adapter *pi) { CPP(0x30); w0(pi->saved_r0); w2(pi->saved_r2); } -static int epat_test_proto( PIA *pi, char * scratch, int verbose ) +static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int k, j, f, cc; int e[2] = {0,0}; @@ -287,7 +287,7 @@ static int epat_test_proto( PIA *pi, char * scratch, int verbose ) return (e[0] && e[1]) || f; } -static void epat_log_adapter( PIA *pi, char * scratch, int verbose ) +static void epat_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { int ver; char *mode_string[6] = diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 610269083441..85b1aba995e1 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -46,7 +46,7 @@ static int cont_map[2] = { 0, 0x80 }; -static int epia_read_regr( PIA *pi, int cont, int regr ) +static int epia_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -79,7 +79,7 @@ static int epia_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void epia_write_regr( PIA *pi, int cont, int regr, int val) +static void epia_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -110,7 +110,7 @@ static void epia_write_regr( PIA *pi, int cont, int regr, int val) 2048 byte reads (the last two being used in the CDrom drivers. */ -static void epia_connect ( PIA *pi ) +static void epia_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -124,7 +124,7 @@ static void epia_connect ( PIA *pi ) WR(0x86,8); } -static void epia_disconnect ( PIA *pi ) +static void epia_disconnect(struct pi_adapter *pi) { /* WR(0x84,0x10); */ w0(pi->saved_r0); @@ -133,7 +133,7 @@ static void epia_disconnect ( PIA *pi ) w2(pi->saved_r2); } -static void epia_read_block( PIA *pi, char * buf, int count ) +static void epia_read_block(struct pi_adapter *pi, char *buf, int count) { int k, ph, a, b; @@ -193,7 +193,7 @@ static void epia_read_block( PIA *pi, char * buf, int count ) } } -static void epia_write_block( PIA *pi, char * buf, int count ) +static void epia_write_block(struct pi_adapter *pi, char *buf, int count) { int ph, k, last, d; @@ -234,7 +234,7 @@ static void epia_write_block( PIA *pi, char * buf, int count ) } -static int epia_test_proto( PIA *pi, char * scratch, int verbose ) +static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int j, k, f; int e[2] = {0,0}; @@ -272,7 +272,7 @@ static int epia_test_proto( PIA *pi, char * scratch, int verbose ) } -static void epia_log_adapter( PIA *pi, char * scratch, int verbose ) +static void epia_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 28de8e4e41c3..67e095d6a718 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -37,13 +37,13 @@ devices. */ -static void fit2_write_regr( PIA *pi, int cont, int regr, int val) +static void fit2_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { if (cont == 1) return; w2(0xc); w0(regr); w2(4); w0(val); w2(5); w0(0); w2(4); } -static int fit2_read_regr( PIA *pi, int cont, int regr ) +static int fit2_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -61,7 +61,7 @@ static int fit2_read_regr( PIA *pi, int cont, int regr ) } -static void fit2_read_block( PIA *pi, char * buf, int count ) +static void fit2_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b, c, d; @@ -87,7 +87,7 @@ static void fit2_read_block( PIA *pi, char * buf, int count ) } -static void fit2_write_block( PIA *pi, char * buf, int count ) +static void fit2_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -100,20 +100,20 @@ static void fit2_write_block( PIA *pi, char * buf, int count ) w2(4); } -static void fit2_connect ( PIA *pi ) +static void fit2_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(0xcc); } -static void fit2_disconnect ( PIA *pi ) +static void fit2_disconnect(struct pi_adapter *pi) { w0(pi->saved_r0); w2(pi->saved_r2); } -static void fit2_log_adapter( PIA *pi, char * scratch, int verbose ) +static void fit2_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index 0366f3123508..01e862a94b96 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -39,7 +39,7 @@ */ -static void fit3_write_regr( PIA *pi, int cont, int regr, int val) +static void fit3_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { if (cont == 1) return; @@ -59,7 +59,7 @@ static void fit3_write_regr( PIA *pi, int cont, int regr, int val) } } -static int fit3_read_regr( PIA *pi, int cont, int regr ) +static int fit3_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b; @@ -92,7 +92,7 @@ static int fit3_read_regr( PIA *pi, int cont, int regr ) } -static void fit3_read_block( PIA *pi, char * buf, int count ) +static void fit3_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b, c, d; @@ -131,7 +131,7 @@ static void fit3_read_block( PIA *pi, char * buf, int count ) } } -static void fit3_write_block( PIA *pi, char * buf, int count ) +static void fit3_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -152,7 +152,7 @@ static void fit3_write_block( PIA *pi, char * buf, int count ) } } -static void fit3_connect ( PIA *pi ) +static void fit3_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -162,14 +162,14 @@ static void fit3_connect ( PIA *pi ) } } -static void fit3_disconnect ( PIA *pi ) +static void fit3_disconnect(struct pi_adapter *pi) { w2(0xc); w0(0xa); w2(0x8); w2(0xc); w0(pi->saved_r0); w2(pi->saved_r2); } -static void fit3_log_adapter( PIA *pi, char * scratch, int verbose ) +static void fit3_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 9306a2c78d90..9f8f4e6b1a7c 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -48,7 +48,7 @@ static int cont_map[2] = { 0x08, 0x10 }; -static int friq_read_regr( PIA *pi, int cont, int regr ) +static int friq_read_regr(struct pi_adapter *pi, int cont, int regr) { int h,l,r; @@ -63,7 +63,7 @@ static int friq_read_regr( PIA *pi, int cont, int regr ) } -static void friq_write_regr( PIA *pi, int cont, int regr, int val) +static void friq_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -74,7 +74,7 @@ static void friq_write_regr( PIA *pi, int cont, int regr, int val) w2(5);w2(7);w2(5);w2(4); } -static void friq_read_block_int( PIA *pi, char * buf, int count, int regr ) +static void friq_read_block_int(struct pi_adapter *pi, char *buf, int count, int regr) { int h, l, k, ph; @@ -129,12 +129,12 @@ static void friq_read_block_int( PIA *pi, char * buf, int count, int regr ) } } -static void friq_read_block( PIA *pi, char * buf, int count) +static void friq_read_block(struct pi_adapter *pi, char *buf, int count) { friq_read_block_int(pi,buf,count,0x08); } -static void friq_write_block( PIA *pi, char * buf, int count ) +static void friq_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -166,21 +166,21 @@ static void friq_write_block( PIA *pi, char * buf, int count ) } } -static void friq_connect ( PIA *pi ) +static void friq_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(4); } -static void friq_disconnect ( PIA *pi ) +static void friq_disconnect(struct pi_adapter *pi) { CMD(0x20); w0(pi->saved_r0); w2(pi->saved_r2); } -static int friq_test_proto( PIA *pi, char * scratch, int verbose ) +static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int j, k, r; int e[2] = {0,0}; @@ -216,7 +216,7 @@ static int friq_test_proto( PIA *pi, char * scratch, int verbose ) } -static void friq_log_adapter( PIA *pi, char * scratch, int verbose ) +static void friq_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; @@ -233,7 +233,7 @@ static void friq_log_adapter( PIA *pi, char * scratch, int verbose ) } -static void friq_release_proto( PIA *pi) +static void friq_release_proto(struct pi_adapter *pi) { if (pi->private) { /* turn off the power */ friq_connect(pi); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 63f2165fec63..e93570190dab 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -44,7 +44,7 @@ static int cont_map[2] = { 0x08, 0x10 }; -static int frpw_read_regr( PIA *pi, int cont, int regr ) +static int frpw_read_regr(struct pi_adapter *pi, int cont, int regr) { int h,l,r; @@ -60,7 +60,7 @@ static int frpw_read_regr( PIA *pi, int cont, int regr ) } -static void frpw_write_regr( PIA *pi, int cont, int regr, int val) +static void frpw_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -71,7 +71,7 @@ static void frpw_write_regr( PIA *pi, int cont, int regr, int val) w2(5);w2(7);w2(5);w2(4); } -static void frpw_read_block_int( PIA *pi, char * buf, int count, int regr ) +static void frpw_read_block_int(struct pi_adapter *pi, char *buf, int count, int regr) { int h, l, k, ph; @@ -132,12 +132,12 @@ static void frpw_read_block_int( PIA *pi, char * buf, int count, int regr ) } } -static void frpw_read_block( PIA *pi, char * buf, int count) +static void frpw_read_block(struct pi_adapter *pi, char *buf, int count) { frpw_read_block_int(pi,buf,count,0x08); } -static void frpw_write_block( PIA *pi, char * buf, int count ) +static void frpw_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -170,14 +170,14 @@ static void frpw_write_block( PIA *pi, char * buf, int count ) } } -static void frpw_connect ( PIA *pi ) +static void frpw_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(4); } -static void frpw_disconnect ( PIA *pi ) +static void frpw_disconnect(struct pi_adapter *pi) { w2(4); w0(0x20); cec4; w0(pi->saved_r0); @@ -188,7 +188,7 @@ static void frpw_disconnect ( PIA *pi ) between the Xilinx and ASIC implementations of the Freecom adapter. */ -static int frpw_test_pnp ( PIA *pi ) +static int frpw_test_pnp(struct pi_adapter *pi) /* returns chip_type: 0 = Xilinx, 1 = ASIC */ @@ -221,7 +221,7 @@ static int frpw_test_pnp ( PIA *pi ) a hack :-( */ -static int frpw_test_proto( PIA *pi, char * scratch, int verbose ) +static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) { int j, k, r; int e[2] = {0,0}; @@ -267,7 +267,7 @@ static int frpw_test_proto( PIA *pi, char * scratch, int verbose ) } -static void frpw_log_adapter( PIA *pi, char * scratch, int verbose ) +static void frpw_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 9a99b9e35d41..fffb79054144 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -42,7 +42,7 @@ static int cont_map[2] = { 0x80, 0x40 }; -static int kbic_read_regr( PIA *pi, int cont, int regr ) +static int kbic_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, s; @@ -72,7 +72,7 @@ static int kbic_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void kbic_write_regr( PIA *pi, int cont, int regr, int val) +static void kbic_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int s; @@ -96,14 +96,14 @@ static void kbic_write_regr( PIA *pi, int cont, int regr, int val) } } -static void k951_connect ( PIA *pi ) +static void k951_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(4); } -static void k951_disconnect ( PIA *pi ) +static void k951_disconnect(struct pi_adapter *pi) { w0(pi->saved_r0); w2(pi->saved_r2); @@ -112,7 +112,7 @@ static void k951_disconnect ( PIA *pi ) #define CCP(x) w2(0xc4);w0(0xaa);w0(0x55);w0(0);w0(0xff);w0(0x87);\ w0(0x78);w0(x);w2(0xc5);w2(0xc4);w0(0xff); -static void k971_connect ( PIA *pi ) +static void k971_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -120,7 +120,7 @@ static void k971_connect ( PIA *pi ) w2(4); } -static void k971_disconnect ( PIA *pi ) +static void k971_disconnect(struct pi_adapter *pi) { CCP(0x30); w0(pi->saved_r0); @@ -131,7 +131,7 @@ static void k971_disconnect ( PIA *pi ) have this property. */ -static void kbic_read_block( PIA *pi, char * buf, int count ) +static void kbic_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b; @@ -189,7 +189,7 @@ static void kbic_read_block( PIA *pi, char * buf, int count ) } } -static void kbic_write_block( PIA *pi, char * buf, int count ) +static void kbic_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -229,8 +229,8 @@ static void kbic_write_block( PIA *pi, char * buf, int count ) } -static void kbic_log_adapter( PIA *pi, char * scratch, - int verbose, char * chip ) +static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, + int verbose, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; @@ -241,12 +241,12 @@ static void kbic_log_adapter( PIA *pi, char * scratch, } -static void k951_log_adapter( PIA *pi, char * scratch, int verbose ) +static void k951_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { kbic_log_adapter(pi,scratch,verbose,"KBIC-951A"); } -static void k971_log_adapter( PIA *pi, char * scratch, int verbose ) +static void k971_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { kbic_log_adapter(pi,scratch,verbose,"KBIC-971A"); } diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index d87eb3c139bc..ffb2af0ce045 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -29,7 +29,7 @@ static int cont_map[2] = { 0x10, 0x08 }; -static void ktti_write_regr( PIA *pi, int cont, int regr, int val) +static void ktti_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -39,7 +39,7 @@ static void ktti_write_regr( PIA *pi, int cont, int regr, int val) w0(val); w2(3); w0(0); w2(6); w2(0xb); } -static int ktti_read_regr( PIA *pi, int cont, int regr ) +static int ktti_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -51,7 +51,7 @@ static int ktti_read_regr( PIA *pi, int cont, int regr ) } -static void ktti_read_block( PIA *pi, char * buf, int count ) +static void ktti_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b; @@ -64,7 +64,7 @@ static void ktti_read_block( PIA *pi, char * buf, int count ) } } -static void ktti_write_block( PIA *pi, char * buf, int count ) +static void ktti_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -76,21 +76,21 @@ static void ktti_write_block( PIA *pi, char * buf, int count ) } } -static void ktti_connect ( PIA *pi ) +static void ktti_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); w2(0xb); w2(0xa); w0(0); w2(3); w2(6); } -static void ktti_disconnect ( PIA *pi ) +static void ktti_disconnect(struct pi_adapter *pi) { w2(0xb); w2(0xa); w0(0xa0); w2(3); w2(4); w0(pi->saved_r0); w2(pi->saved_r2); } -static void ktti_log_adapter( PIA *pi, char * scratch, int verbose ) +static void ktti_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { printk("ktti %s, KT adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 0a1e60e20656..fb3399329fb6 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -33,7 +33,7 @@ cont = 1 - access the IDE command set */ -static int on20_read_regr( PIA *pi, int cont, int regr ) +static int on20_read_regr(struct pi_adapter *pi, int cont, int regr) { int h,l, r ; @@ -56,7 +56,7 @@ static int on20_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void on20_write_regr( PIA *pi, int cont, int regr, int val ) +static void on20_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -67,7 +67,7 @@ static void on20_write_regr( PIA *pi, int cont, int regr, int val ) op(0); vl(val); } -static void on20_connect ( PIA *pi) +static void on20_connect(struct pi_adapter *pi) { pi->saved_r0 = r0(); pi->saved_r2 = r2(); @@ -77,14 +77,14 @@ static void on20_connect ( PIA *pi) else { op(2); vl(0); op(2); vl(8); } } -static void on20_disconnect ( PIA *pi ) +static void on20_disconnect(struct pi_adapter *pi) { w2(4);w0(7);w2(4);w2(0xc);w2(4); w0(pi->saved_r0); w2(pi->saved_r2); } -static void on20_read_block( PIA *pi, char * buf, int count ) +static void on20_read_block(struct pi_adapter *pi, char *buf, int count) { int k, l, h; @@ -101,7 +101,7 @@ static void on20_read_block( PIA *pi, char * buf, int count ) w2(4); } -static void on20_write_block( PIA *pi, char * buf, int count ) +static void on20_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -111,7 +111,7 @@ static void on20_write_block( PIA *pi, char * buf, int count ) w2(4); } -static void on20_log_adapter( PIA *pi, char * scratch, int verbose ) +static void on20_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index ceb5018caeec..7e5fc499fcc5 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -44,7 +44,7 @@ cont = 1 - access the IDE command set */ -static int on26_read_regr( PIA *pi, int cont, int regr ) +static int on26_read_regr(struct pi_adapter *pi, int cont, int regr) { int a, b, r; @@ -73,7 +73,7 @@ static int on26_read_regr( PIA *pi, int cont, int regr ) return -1; } -static void on26_write_regr( PIA *pi, int cont, int regr, int val ) +static void on26_write_regr(struct pi_adapter *pi, int cont, int regr, int val) { int r; @@ -99,7 +99,7 @@ static void on26_write_regr( PIA *pi, int cont, int regr, int val ) #define CCP(x) w0(0xfe);w0(0xaa);w0(0x55);w0(0);w0(0xff);\ w0(0x87);w0(0x78);w0(x);w2(4);w2(5);w2(4);w0(0xff); -static void on26_connect ( PIA *pi ) +static void on26_connect(struct pi_adapter *pi) { int x; @@ -113,7 +113,7 @@ static void on26_connect ( PIA *pi ) w0(2); P1; w0(x); P2; } -static void on26_disconnect ( PIA *pi ) +static void on26_disconnect(struct pi_adapter *pi) { if (pi->mode >= 2) { w3(4); w3(4); w3(4); w3(4); } else { w0(4); P1; w0(4); P1; } @@ -124,7 +124,7 @@ static void on26_disconnect ( PIA *pi ) #define RESET_WAIT 200 -static int on26_test_port( PIA *pi) /* hard reset */ +static int on26_test_port(struct pi_adapter *pi) /* hard reset */ { int i, m, d, x=0, y=0; @@ -183,7 +183,7 @@ static int on26_test_port( PIA *pi) /* hard reset */ } -static void on26_read_block( PIA *pi, char * buf, int count ) +static void on26_read_block(struct pi_adapter *pi, char *buf, int count) { int k, a, b; @@ -232,7 +232,7 @@ static void on26_read_block( PIA *pi, char * buf, int count ) } } -static void on26_write_block( PIA *pi, char * buf, int count ) +static void on26_write_block(struct pi_adapter *pi, char *buf, int count) { int k; @@ -275,7 +275,7 @@ static void on26_write_block( PIA *pi, char * buf, int count ) } -static void on26_log_adapter( PIA *pi, char * scratch, int verbose ) +static void on26_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index dcab769aa639..381b4d0e3574 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -24,8 +24,6 @@ struct pi_adapter { struct pardevice *pardev; /* pointer to pardevice */ }; -typedef struct pi_adapter PIA; /* for paride protocol modules */ - /* registers are addressed as (cont,regr) * cont: 0 for command register file, 1 for control register(s) * regr: 0-7 for register number. From patchwork Mon Mar 6 17:27:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65057 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2015119wrd; Mon, 6 Mar 2023 10:55:01 -0800 (PST) X-Google-Smtp-Source: AK7set816AaWRjO/iiEx3Z/WOAo9oWU6ruEE2h48n2+sKJYOPDLnzVhZWicr8S75mdZY1L6/470o X-Received: by 2002:a17:906:80c1:b0:8dc:cfe8:da53 with SMTP id a1-20020a17090680c100b008dccfe8da53mr10946992ejx.10.1678128901246; Mon, 06 Mar 2023 10:55:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678128901; cv=none; d=google.com; s=arc-20160816; b=MtmHCGxBJU2rDL5cKPb0udRpbNRlUGM6gGkWBEZNniuM98CCV1OFLwkE6xoUUkJ7GE JdMVBnNTpZGBFa5Ao1ivhTR7chugAfkKIE8w//hQtat/EiQMs0FhcKOnIyKTEdSWj6/c 70OX0APgQs+MQkGfHx/SaBznE7v1tx01rhkB7mzL7CiW+fuVabebasY8IvNP399KBZ9r ELN9vtvTf8I2Cq9sQ+x3hiOOWjm8xnY1ZS0PCptOBi43odUvu+EeNipTl7atHvAvMn6f IBwgORRSkHSjpqkDT7g+ENqLuEgN9SPOcQ30+ggx0uO5QsSuoX/N9ACruBAJVxZMGqxU VFHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=tjle7aCzLPGcZBOU5+rgi448S7VGlfsTUS/fQJrxBe0=; b=Ocb9kCb9ABzJSaJG9PWsloTZF3LCh9jQn/8DWtjP+sJxrGyXomUc4tfBUuSZIFTPOU Qv0xiSclNXxTAZ+Fq0lD/DI2NWEIKJjCRQ4nXJGRbh21YfrdEKnIlA2M/0g1C5jnFu3F Hg1Ju1ZSCRgs2CVX29Q9L77cVFJ7lU772cZFEFwWX58jRd7rggDNkC1n+okNwNvy4jly DjVblXyDCtdwOjpJHG0FrmH8SBI4hV5zZd0sKTrWN/eizwOEE/h9J+RNMHpLG8yfEq59 /RBEARsR8MFSLOrh2r2Y2kLbMvZ1Ya0Xtap1h8pOcUkXJnybjryVZqq7cveZNeYSM+3/ 5t8g== 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 d9-20020a170906304900b008d20a6a9d98si11393650ejd.279.2023.03.06.10.54.38; Mon, 06 Mar 2023 10:55:01 -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 S230120AbjCFSYX (ORCPT + 99 others); Mon, 6 Mar 2023 13:24:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbjCFSYQ (ORCPT ); Mon, 6 Mar 2023 13:24:16 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B6EEA1FE9; Mon, 6 Mar 2023 10:23:58 -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 373BA7A06F6; Mon, 6 Mar 2023 18:28:29 +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: Mon, 6 Mar 2023 18:27:43 +0100 Message-Id: <20230306172752.7727-10-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759645691148703031?= X-GMAIL-MSGID: =?utf-8?q?1759645691148703031?= verbose parameter of log_adapter() is unused, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 2 +- drivers/ata/pata_parport/bpck.c | 4 +--- drivers/ata/pata_parport/bpck6.c | 2 +- drivers/ata/pata_parport/comm.c | 2 +- drivers/ata/pata_parport/dstr.c | 2 +- drivers/ata/pata_parport/epat.c | 2 +- drivers/ata/pata_parport/epia.c | 2 +- drivers/ata/pata_parport/fit2.c | 2 +- drivers/ata/pata_parport/fit3.c | 2 +- drivers/ata/pata_parport/friq.c | 2 +- drivers/ata/pata_parport/frpw.c | 2 +- drivers/ata/pata_parport/kbic.c | 15 +++++++-------- drivers/ata/pata_parport/ktti.c | 2 +- drivers/ata/pata_parport/on20.c | 2 +- drivers/ata/pata_parport/on26.c | 2 +- drivers/ata/pata_parport/pata_parport.c | 2 +- include/linux/pata_parport.h | 2 +- 17 files changed, 23 insertions(+), 26 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 4579e554fbad..0a98954f380f 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -120,7 +120,7 @@ static void aten_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void aten_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void aten_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 46805c584730..1a3e3d5b1b25 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -416,7 +416,7 @@ static int bpck_test_port(struct pi_adapter *pi) /* check for 8-bit port */ return 5; } -static void bpck_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void bpck_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5] = { "4-bit","8-bit","EPP-8", "EPP-16","EPP-32" }; @@ -428,13 +428,11 @@ static void bpck_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) bpck_read_eeprom(pi,scratch); #ifdef DUMP_EEPROM - if (verbose) { for(i=0;i<128;i++) if ((scratch[i] < ' ') || (scratch[i] > '~')) scratch[i] = '.'; printk("bpck EEPROM: %64.64s\n", scratch); printk(" %64.64s\n", &scratch[64]); - } #endif printk("bpck %s, backpack %8.8s unit %d", diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 8ed3cf3b627e..68f7fdcab9be 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -195,7 +195,7 @@ static int bpck6_probe_unit(struct pi_adapter *pi) } } -static void bpck6_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void bpck6_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 06c6fa29295b..69a66658aa29 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -179,7 +179,7 @@ static void comm_write_block(struct pi_adapter *pi, char *buf, int count) } } -static void comm_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void comm_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 8cac71eb9c03..17b1a7cb0a15 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -190,7 +190,7 @@ static void dstr_write_block(struct pi_adapter *pi, char *buf, int count) } -static void dstr_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void dstr_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 9276dcb261d8..b125df16f160 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -287,7 +287,7 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) return (e[0] && e[1]) || f; } -static void epat_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void epat_log_adapter(struct pi_adapter *pi, char *scratch) { int ver; char *mode_string[6] = diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 85b1aba995e1..452d3a8e17af 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -272,7 +272,7 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void epia_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void epia_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 67e095d6a718..632c51af84d7 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -113,7 +113,7 @@ static void fit2_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void fit2_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void fit2_log_adapter(struct pi_adapter *pi, char *scratch) { printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index 01e862a94b96..bdf90cb536c2 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -169,7 +169,7 @@ static void fit3_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void fit3_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void fit3_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 9f8f4e6b1a7c..ee922b40bc95 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -216,7 +216,7 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void friq_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void friq_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index e93570190dab..f17e0a4f66c2 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -267,7 +267,7 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void frpw_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void frpw_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index fffb79054144..3718441f60aa 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -229,8 +229,7 @@ static void kbic_write_block(struct pi_adapter *pi, char *buf, int count) } -static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, - int verbose, char *chip) +static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; @@ -241,14 +240,14 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, } -static void k951_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) - -{ kbic_log_adapter(pi,scratch,verbose,"KBIC-951A"); +static void k951_log_adapter(struct pi_adapter *pi, char *scratch) +{ + kbic_log_adapter(pi, scratch, "KBIC-951A"); } -static void k971_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) - -{ kbic_log_adapter(pi,scratch,verbose,"KBIC-971A"); +static void k971_log_adapter(struct pi_adapter *pi, char *scratch) +{ + kbic_log_adapter(pi, scratch, "KBIC-971A"); } static struct pi_protocol k951 = { diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index ffb2af0ce045..ad7f0314f962 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -90,7 +90,7 @@ static void ktti_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void ktti_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void ktti_log_adapter(struct pi_adapter *pi, char *scratch) { printk("ktti %s, KT adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index fb3399329fb6..12a423f61996 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -111,7 +111,7 @@ static void on20_write_block(struct pi_adapter *pi, char *buf, int count) w2(4); } -static void on20_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void on20_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 7e5fc499fcc5..ee5a0cc74900 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -275,7 +275,7 @@ static void on26_write_block(struct pi_adapter *pi, char *buf, int count) } -static void on26_log_adapter(struct pi_adapter *pi, char *scratch, int verbose) +static void on26_log_adapter(struct pi_adapter *pi, char *scratch) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 49e99c9465fd..5aa0f05590fb 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -474,7 +474,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport, goto out_unreg_parport; } - pi->proto->log_adapter(pi, scratch, 1); + pi->proto->log_adapter(pi, scratch); host = ata_host_alloc_pinfo(&pi->pardev->dev, ppi, 1); if (!host) diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 381b4d0e3574..033cabede51c 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -68,7 +68,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); int (*test_proto)(struct pi_adapter *pi, char *scratch, int verbose); - void (*log_adapter)(struct pi_adapter *pi, char *scratch, int verbose); + void (*log_adapter)(struct pi_adapter *pi, char *scratch); int (*init_proto)(struct pi_adapter *pi); void (*release_proto)(struct pi_adapter *pi); From patchwork Mon Mar 6 17:27:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1995930wrd; Mon, 6 Mar 2023 10:14:04 -0800 (PST) X-Google-Smtp-Source: AK7set8xMiPOR/xD3bfl1MEgUJXKMkRtR4CkfuN4c8NoZaLVl83q0rcQcd2GUpLEzLCKo+5gU685 X-Received: by 2002:a17:90a:195a:b0:237:b4c0:e15b with SMTP id 26-20020a17090a195a00b00237b4c0e15bmr12299040pjh.44.1678126444131; Mon, 06 Mar 2023 10:14:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126444; cv=none; d=google.com; s=arc-20160816; b=jWjazFcr9K0ZiGahZIiq4Thr2ePpJHz1VjImaclUoi6zQy5tYpMhywe21on6nLln9S ViQ2t1of3ZptBEowQI1GQndw5DU0fswbf4bqxweVcmy1Tjual0hlOrioEZsKCcetBMpf fjzJ9wDB+4i1STCC7MOHFntHHChJncpa3HgaU5WA7khWd5NMNrBucLuczv0ytvuwzjWU 5vU02iwIYeQuNNOrYG1RSHo+iLjLrlBkDNQbvN765RAE0/s/pSiGpBWEKWBNDofBv+cO xcWS6XxA16Bez6UYbVKyIobltNFcotJz23C8ffG9mmKQZ689Xb9831G5O/bct898zY1S d5aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XqzYFjIUS4nXkAAgj/BCoK0nWI+7+sKLfN9wzGUnRqM=; b=s8z1fvS2DhW8ndt2MEU1K2qSt3EkbyxDjpkilonkQGTdcOUT96yOzyA7ZLDkQzIx5j eiHUdQz7hbjCFnsaZ3RqX7uS164QpYr0iOa65NIGToysW9Ael0Y4/kTxS9NVzGW7X4El uw3RFam2fqbCpMwghBinEyC9rm3kMfadaQmMRSgT8PsoSGeJ5l/X5xEIczpWhJM4xqr/ y4KFBa0hV1wvXHPgRFEDm80rLM6mlsa+nobkLger3oeBY6npCncAHfeVlxbO8qWun5WH tJqVUlGnL/2gKIfoiG82GVzMJ3zLJzY4ThUo7dEj6RtqlQsu0TV25NFyzLyGlbZk4xiJ TQnQ== 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 z7-20020a17090abd8700b00233b42dd1afsi12365653pjr.145.2023.03.06.10.13.51; Mon, 06 Mar 2023 10:14: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 S230022AbjCFRyc (ORCPT + 99 others); Mon, 6 Mar 2023 12:54:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbjCFRyY (ORCPT ); Mon, 6 Mar 2023 12:54:24 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5FCA43D93D; Mon, 6 Mar 2023 09:53:56 -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 472487A06F8; Mon, 6 Mar 2023 18:28:29 +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: Mon, 6 Mar 2023 18:27:44 +0100 Message-Id: <20230306172752.7727-11-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759643114342294646?= X-GMAIL-MSGID: =?utf-8?q?1759643114342294646?= scratch parameter of log_adapter() is only used by bpck driver. Remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 2 +- drivers/ata/pata_parport/bpck.c | 4 ++-- drivers/ata/pata_parport/bpck6.c | 2 +- drivers/ata/pata_parport/comm.c | 2 +- drivers/ata/pata_parport/dstr.c | 2 +- drivers/ata/pata_parport/epat.c | 2 +- drivers/ata/pata_parport/epia.c | 2 +- drivers/ata/pata_parport/fit2.c | 2 +- drivers/ata/pata_parport/fit3.c | 2 +- drivers/ata/pata_parport/friq.c | 2 +- drivers/ata/pata_parport/frpw.c | 2 +- drivers/ata/pata_parport/kbic.c | 10 +++++----- drivers/ata/pata_parport/ktti.c | 2 +- drivers/ata/pata_parport/on20.c | 2 +- drivers/ata/pata_parport/on26.c | 2 +- drivers/ata/pata_parport/pata_parport.c | 2 +- include/linux/pata_parport.h | 2 +- 17 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 0a98954f380f..3f5c50c2c43a 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -120,7 +120,7 @@ static void aten_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void aten_log_adapter(struct pi_adapter *pi, char *scratch) +static void aten_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 1a3e3d5b1b25..f475a25769f0 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -416,11 +416,11 @@ static int bpck_test_port(struct pi_adapter *pi) /* check for 8-bit port */ return 5; } -static void bpck_log_adapter(struct pi_adapter *pi, char *scratch) +static void bpck_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = { "4-bit","8-bit","EPP-8", "EPP-16","EPP-32" }; - + char scratch[128]; #ifdef DUMP_EEPROM int i; #endif diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 68f7fdcab9be..41395a97d77c 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -195,7 +195,7 @@ static int bpck6_probe_unit(struct pi_adapter *pi) } } -static void bpck6_log_adapter(struct pi_adapter *pi, char *scratch) +static void bpck6_log_adapter(struct pi_adapter *pi) { char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 69a66658aa29..88476072b708 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -179,7 +179,7 @@ static void comm_write_block(struct pi_adapter *pi, char *buf, int count) } } -static void comm_log_adapter(struct pi_adapter *pi, char *scratch) +static void comm_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 17b1a7cb0a15..a8b238828061 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -190,7 +190,7 @@ static void dstr_write_block(struct pi_adapter *pi, char *buf, int count) } -static void dstr_log_adapter(struct pi_adapter *pi, char *scratch) +static void dstr_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index b125df16f160..a30313a2c3d7 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -287,7 +287,7 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) return (e[0] && e[1]) || f; } -static void epat_log_adapter(struct pi_adapter *pi, char *scratch) +static void epat_log_adapter(struct pi_adapter *pi) { int ver; char *mode_string[6] = diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 452d3a8e17af..ece7862dc058 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -272,7 +272,7 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void epia_log_adapter(struct pi_adapter *pi, char *scratch) +static void epia_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 632c51af84d7..056e92d8e015 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -113,7 +113,7 @@ static void fit2_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void fit2_log_adapter(struct pi_adapter *pi, char *scratch) +static void fit2_log_adapter(struct pi_adapter *pi) { printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index bdf90cb536c2..fa37f7f17fb2 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -169,7 +169,7 @@ static void fit3_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void fit3_log_adapter(struct pi_adapter *pi, char *scratch) +static void fit3_log_adapter(struct pi_adapter *pi) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index ee922b40bc95..bf597ee520b7 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -216,7 +216,7 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void friq_log_adapter(struct pi_adapter *pi, char *scratch) +static void friq_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index f17e0a4f66c2..9b8db1122154 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -267,7 +267,7 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } -static void frpw_log_adapter(struct pi_adapter *pi, char *scratch) +static void frpw_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 3718441f60aa..b23632c1da39 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -229,7 +229,7 @@ static void kbic_write_block(struct pi_adapter *pi, char *buf, int count) } -static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, char *chip) +static void kbic_log_adapter(struct pi_adapter *pi, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; @@ -240,14 +240,14 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *scratch, char *chip) } -static void k951_log_adapter(struct pi_adapter *pi, char *scratch) +static void k951_log_adapter(struct pi_adapter *pi) { - kbic_log_adapter(pi, scratch, "KBIC-951A"); + kbic_log_adapter(pi, "KBIC-951A"); } -static void k971_log_adapter(struct pi_adapter *pi, char *scratch) +static void k971_log_adapter(struct pi_adapter *pi) { - kbic_log_adapter(pi, scratch, "KBIC-971A"); + kbic_log_adapter(pi, "KBIC-971A"); } static struct pi_protocol k951 = { diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index ad7f0314f962..62b0692d1b94 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -90,7 +90,7 @@ static void ktti_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static void ktti_log_adapter(struct pi_adapter *pi, char *scratch) +static void ktti_log_adapter(struct pi_adapter *pi) { printk("ktti %s, KT adapter at 0x%x, delay %d\n", diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 12a423f61996..a3b0708aed71 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -111,7 +111,7 @@ static void on20_write_block(struct pi_adapter *pi, char *buf, int count) w2(4); } -static void on20_log_adapter(struct pi_adapter *pi, char *scratch) +static void on20_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index ee5a0cc74900..8dc8296d50e6 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -275,7 +275,7 @@ static void on26_write_block(struct pi_adapter *pi, char *buf, int count) } -static void on26_log_adapter(struct pi_adapter *pi, char *scratch) +static void on26_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 5aa0f05590fb..f42a2cafc382 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -474,7 +474,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport, goto out_unreg_parport; } - pi->proto->log_adapter(pi, scratch); + pi->proto->log_adapter(pi); host = ata_host_alloc_pinfo(&pi->pardev->dev, ppi, 1); if (!host) diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 033cabede51c..c44d30b3e886 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -68,7 +68,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); int (*test_proto)(struct pi_adapter *pi, char *scratch, int verbose); - void (*log_adapter)(struct pi_adapter *pi, char *scratch); + void (*log_adapter)(struct pi_adapter *pi); int (*init_proto)(struct pi_adapter *pi); void (*release_proto)(struct pi_adapter *pi); From patchwork Mon Mar 6 17:27:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65029 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1996694wrd; Mon, 6 Mar 2023 10:15:29 -0800 (PST) X-Google-Smtp-Source: AK7set+odpCoZ82yCtYbwKdYaGGQTckJLPHNGPri2DsAFqAbf9UCjvWQuR+tvmWn5nz+yYYRRJIx X-Received: by 2002:aa7:9f4e:0:b0:5aa:6597:507b with SMTP id h14-20020aa79f4e000000b005aa6597507bmr11109103pfr.12.1678126529293; Mon, 06 Mar 2023 10:15:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126529; cv=none; d=google.com; s=arc-20160816; b=0N+QTKXoEQ1O3YMXtAN7TvmL/6yB0+MUY3c9wrV/wjhAyBgxn9RXFM1rdtUoUY8JvU ADTbdftdVXVgYHhIBIh4YsYrMaJbIcSa42zsFpiK3B8iPW19pAx2O+qONcDCRQrd8sUs qDwEiPY1hzxTOMDzkVdRdPTWG8UL0YKYWrOy+eqWqUhMaGy7wvy8/UoMicbZQdi5TXGZ 0K8R4KKEoxcIliwfW0Dxj0cyPCq/+obZgIAVgeXnKxP+1UGO63aqv1J4m/S3GiWCOcCQ DmtFdt0bdNLB7FAa6mN0ILIfP67rfHfZ6UjDxdoK6PKr0dq7gzg5kOg7fwCqqJ76PuzW FsIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=iVGLhy8T0afEhLPQPg0WFtz3xaWH+l8sWwOMCOV0w+I=; b=ltNbN9G27CvWeoYxmjlv9NasXVmTSTogIGzFcA6tV6O0Q1wdxWEmsaCc5CNfU+/qW9 HGxrWT9s8JQVtt1aXKTAf5koOWbx0W4885nrsKAbsyD9wy1wKPEpZO3UhWJ1RYD1RDXL 3DOpQRsmReKsbCfzsuk97FCay90LPO6XkpA8dsjxluaJKVOJyIT5yGg8YUDu6dgJ/CQ3 S8Gr+CRp9+I/tTSxa/pbHfn6B3TRxNjQUqLXmAtV2jq2yGmV+u72J8CwKcdnX5Xv23lg PDgNo1iUcEG+vYt5LiUbrp8T32wWvCv2tmUfC/LVL8+pDF1Mi7QYZd6MIqsECtk9WdkH 4znA== 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 u14-20020a63d34e000000b005030bb54cb8si9495258pgi.878.2023.03.06.10.15.16; Mon, 06 Mar 2023 10:15:29 -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 S230297AbjCFRz1 (ORCPT + 99 others); Mon, 6 Mar 2023 12:55:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230218AbjCFRye (ORCPT ); Mon, 6 Mar 2023 12:54:34 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E54D26512E; Mon, 6 Mar 2023 09:54:01 -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 621C87A06FE; Mon, 6 Mar 2023 18:28:29 +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: Mon, 6 Mar 2023 18:27:45 +0100 Message-Id: <20230306172752.7727-12-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759643203316319788?= X-GMAIL-MSGID: =?utf-8?q?1759643203316319788?= Use dev_info/dev_err/dev_dbg instead of printk. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 4 +-- drivers/ata/pata_parport/bpck.c | 4 +-- drivers/ata/pata_parport/bpck6.c | 45 +++++++++----------------------- drivers/ata/pata_parport/comm.c | 4 +-- drivers/ata/pata_parport/dstr.c | 4 +-- drivers/ata/pata_parport/epat.c | 10 +++---- drivers/ata/pata_parport/epia.c | 10 +++---- drivers/ata/pata_parport/fit2.c | 2 +- drivers/ata/pata_parport/fit3.c | 2 +- drivers/ata/pata_parport/friq.c | 10 +++---- drivers/ata/pata_parport/frpw.c | 16 +++++------- drivers/ata/pata_parport/kbic.c | 4 +-- drivers/ata/pata_parport/ktti.c | 2 +- drivers/ata/pata_parport/on20.c | 4 +-- drivers/ata/pata_parport/on26.c | 6 ++--- 15 files changed, 48 insertions(+), 79 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 3f5c50c2c43a..ccbba14ccab1 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -124,8 +124,8 @@ static void aten_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - printk("aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index f475a25769f0..1cba098b4b82 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -435,9 +435,9 @@ static void bpck_log_adapter(struct pi_adapter *pi) printk(" %64.64s\n", &scratch[64]); #endif - printk("bpck %s, backpack %8.8s unit %d", + dev_info(&pi->dev, "bpck %s, backpack %8.8s unit %d", BPCK_VERSION, &scratch[110], pi->unit); - printk(" at 0x%x, mode %d (%s), delay %d\n",pi->port, + dev_info(&pi->dev, " at 0x%x, mode %d (%s), delay %d\n", pi->port, pi->mode,mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 41395a97d77c..4770e29bfdeb 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -90,10 +90,7 @@ static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len) static void bpck6_connect(struct pi_adapter *pi) { - if(verbose) - { - printk(KERN_DEBUG "connect\n"); - } + dev_dbg(&pi->dev, "connect\n"); if(pi->mode >=2) { @@ -114,22 +111,16 @@ static void bpck6_connect(struct pi_adapter *pi) static void bpck6_disconnect(struct pi_adapter *pi) { - if(verbose) - { - printk("disconnect\n"); - } + dev_dbg(&pi->dev, "disconnect\n"); ppc6_wr_extout(PPCSTRUCT(pi),0x0); ppc6_close(PPCSTRUCT(pi)); } static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */ { - if(verbose) - { - printk(KERN_DEBUG "PARPORT indicates modes=%x for lp=0x%lx\n", - ((struct pardevice*)(pi->pardev))->port->modes, - ((struct pardevice *)(pi->pardev))->port->base); - } + dev_dbg(&pi->dev, "PARPORT indicates modes=%x for lp=0x%lx\n", + ((struct pardevice *)(pi->pardev))->port->modes, + ((struct pardevice *)(pi->pardev))->port->base); /*copy over duplicate stuff.. initialize state info*/ PPCSTRUCT(pi)->ppc_id=pi->unit; @@ -158,10 +149,7 @@ static int bpck6_probe_unit(struct pi_adapter *pi) { int out; - if(verbose) - { - printk(KERN_DEBUG "PROBE UNIT %x on port:%x\n",pi->unit,pi->port); - } + dev_dbg(&pi->dev, "PROBE UNIT %x on port:%x\n", pi->unit, pi->port); /*SET PPC UNIT NUMBER*/ PPCSTRUCT(pi)->ppc_id=pi->unit; @@ -171,26 +159,17 @@ static int bpck6_probe_unit(struct pi_adapter *pi) out=ppc6_open(PPCSTRUCT(pi)); - if(verbose) - { - printk(KERN_DEBUG "ppc_open returned %2x\n",out); - } + dev_dbg(&pi->dev, "ppc_open returned %2x\n", out); if(out) { ppc6_close(PPCSTRUCT(pi)); - if(verbose) - { - printk(KERN_DEBUG "leaving probe\n"); - } + dev_dbg(&pi->dev, "leaving probe\n"); return(1); } else { - if(verbose) - { - printk(KERN_DEBUG "Failed open\n"); - } + dev_dbg(&pi->dev, "Failed open\n"); return(0); } } @@ -200,9 +179,9 @@ static void bpck6_log_adapter(struct pi_adapter *pi) char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - printk("BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", + dev_info(&pi->dev, "BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", BACKPACK_VERSION, pi->port); - printk("Unit: %d Mode:%d (%s) Delay %d\n", + dev_info(&pi->dev, "Unit: %d Mode:%d (%s) Delay %d\n", pi->unit,pi->mode,mode_string[pi->mode],pi->delay); } @@ -215,7 +194,7 @@ static int bpck6_init_proto(struct pi_adapter *pi) return 0; } - printk(KERN_ERR "ERROR COULDN'T ALLOCATE MEMORY\n"); + dev_err(&pi->dev, "ERROR COULDN'T ALLOCATE MEMORY\n"); return -1; } diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 88476072b708..7b59eca52185 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -183,8 +183,8 @@ static void comm_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - printk("comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index a8b238828061..eb6ddceaeb83 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -195,8 +195,8 @@ static void dstr_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - printk("dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index a30313a2c3d7..389faa6ae49d 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -279,10 +279,8 @@ static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } epat_disconnect(pi); - if (verbose) { - printk("epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", - pi->port, pi->mode, cc, e[0], e[1], f); - } + dev_dbg(&pi->dev, "epat: port 0x%x, mode %d, ccr %x, test=(%d,%d,%d)\n", + pi->port, pi->mode, cc, e[0], e[1], f); return (e[0] && e[1]) || f; } @@ -298,9 +296,9 @@ static void epat_log_adapter(struct pi_adapter *pi) ver = RR(0xb); epat_disconnect(pi); - printk("epat %s, Shuttle EPAT chip %x at 0x%x, ", + dev_info(&pi->dev, "epat %s, Shuttle EPAT chip %x at 0x%x, ", EPAT_VERSION, ver, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index ece7862dc058..48d12f56c501 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -262,10 +262,8 @@ static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) WR(0x84,0); epia_disconnect(pi); - if (verbose) { - printk("epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->port, pi->mode, e[0], e[1], f); - } + dev_dbg(&pi->dev, "epia: port 0x%x, mode %d, test=(%d,%d,%d)\n", + pi->port, pi->mode, e[0], e[1], f); return (e[0] && e[1]) || f; @@ -277,8 +275,8 @@ static void epia_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; - printk("epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 056e92d8e015..d0a781f04411 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -116,7 +116,7 @@ static void fit2_disconnect(struct pi_adapter *pi) static void fit2_log_adapter(struct pi_adapter *pi) { - printk("fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", + dev_info(&pi->dev, "fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", FIT2_VERSION, pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index fa37f7f17fb2..f86da2d478cb 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -173,7 +173,7 @@ static void fit3_log_adapter(struct pi_adapter *pi) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; - printk("fit3 %s, FIT 3000 adapter at 0x%x, " + dev_info(&pi->dev, "fit3 %s, FIT 3000 adapter at 0x%x, " "mode %d (%s), delay %d\n", FIT3_VERSION, pi->port, pi->mode,mode_string[pi->mode],pi->delay); diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index bf597ee520b7..ec564e7cb930 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -207,10 +207,8 @@ static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) for (k=0;k<128;k++) if (scratch[k] != k) r++; friq_disconnect(pi); - if (verbose) { - printk("friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", - pi->port, pi->mode, e[0], e[1], r); - } + dev_dbg(&pi->dev, "friq: port 0x%x, mode %d, test=(%d,%d,%d)\n", + pi->port, pi->mode, e[0], e[1], r); return (r || (e[0] && e[1])); } @@ -221,9 +219,9 @@ static void friq_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; - printk("friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", + dev_info(&pi->dev, "friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", FRIQ_VERSION,pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); pi->private = 1; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 9b8db1122154..5ea16a247257 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -230,14 +230,12 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) pi->private = frpw_test_pnp(pi) + 2*pi->port; if (((pi->private%2) == 0) && (pi->mode > 2)) { - if (verbose) - printk("frpw: Xilinx does not support mode %d\n", pi->mode); + dev_dbg(&pi->dev, "frpw: Xilinx does not support mode %d\n", pi->mode); return 1; } if (((pi->private%2) == 1) && (pi->mode == 2)) { - if (verbose) - printk("frpw: ASIC does not support mode 2\n"); + dev_dbg(&pi->dev, "frpw: ASIC does not support mode 2\n"); return 1; } @@ -258,10 +256,8 @@ static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) for (k=0;k<128;k++) if (scratch[k] != k) r++; frpw_disconnect(pi); - if (verbose) { - printk("frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n", - pi->port, (pi->private%2), pi->mode, e[0], e[1], r); - } + dev_dbg(&pi->dev, "frpw: port 0x%x, chip %ld, mode %d, test=(%d,%d,%d)\n", + pi->port, (pi->private%2), pi->mode, e[0], e[1], r); return (r || (e[0] && e[1])); } @@ -272,9 +268,9 @@ static void frpw_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; - printk("frpw %s, Freecom (%s) adapter at 0x%x, ", + dev_info(&pi->dev, "frpw %s, Freecom (%s) adapter at 0x%x, ", FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index b23632c1da39..ea1b931ce20d 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -234,8 +234,8 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; - printk("kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index 62b0692d1b94..b22c283709de 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -93,7 +93,7 @@ static void ktti_disconnect(struct pi_adapter *pi) static void ktti_log_adapter(struct pi_adapter *pi) { - printk("ktti %s, KT adapter at 0x%x, delay %d\n", + dev_info(&pi->dev, "ktti %s, KT adapter at 0x%x, delay %d\n", KTTI_VERSION, pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index a3b0708aed71..c76d4fb84c61 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -115,8 +115,8 @@ static void on20_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - printk("on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 8dc8296d50e6..5406e76ea727 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -167,7 +167,7 @@ static int on26_test_port(struct pi_adapter *pi) /* hard reset */ } if (i == RESET_WAIT) - printk("on26: Device reset failed (%x,%x)\n",x,y); + dev_err(&pi->dev, "on26: Device reset failed (%x,%x)\n", x, y); w0(4); P1; w0(4); P1; } @@ -280,8 +280,8 @@ static void on26_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - printk("on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); - printk("mode %d (%s), delay %d\n",pi->mode, + dev_info(&pi->dev, "on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); + dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, mode_string[pi->mode],pi->delay); } From patchwork Mon Mar 6 17:27:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65056 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2015096wrd; Mon, 6 Mar 2023 10:54:59 -0800 (PST) X-Google-Smtp-Source: AK7set/MJJ6Jvv5lVTJ6rEGqqZwJ9N1JtawPjlKL2b0TR33R1RWK8zkndu2nARBGNtUULWLywUNQ X-Received: by 2002:a17:906:bcda:b0:8a4:e0a2:e77f with SMTP id lw26-20020a170906bcda00b008a4e0a2e77fmr12660350ejb.34.1678128899166; Mon, 06 Mar 2023 10:54:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678128899; cv=none; d=google.com; s=arc-20160816; b=Cv7wUnsuZDv73S+zpOlolIEux2MGVZqtB5yqdOu4ASknpPcMZT2ZHGlRIkIPki6uxQ tJTjUuRc8rcbEp8U8/q4R1IbKHa+eXNRqLjONmiLLU+5GiNWDo3cTajy7XkqSHzMDx1H lrQaV/uJwYwfOyLZ6cCEYcwkq0LTIw1dZKo+cwtISzH4biJBMVIUHVTIVTaNOZru30vW 3bctk8u0RpFsvQt6FVrM4asVntGTb0jl1+ZZ6RGqRFivmxotzgIDjSM0AQJjU9lBxCNb Fukxvp/koPdwZis+Qt0xEmsBVfI8wppHOuEEndaM+JlRGt8L0O2Gw7kxj/R3WRJunlZ5 7eVA== 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=zSZBNY6cygH1vui0n1WEwiOURezUZ2ESUYmLcjXfdYc=; b=Bix5OC06G1QZ6jlWNKRyjuAaIR7Jd7ZLrEEjkRgFE688bp+BI1BgvtXp4/PtZPqiY7 cbr3qkswfq9off5IVdctBJCtDpOPiR7dcdYhgE7t2FsnKQprrPJcf+l+uNSSOpCENkDr /t5Uka99W47IqTCqPP/PnbM6268kJ/w2qyo6xYRhl2sy/83QyDvewUBUjq+Zjctp5hkc PEPgZevSAA4fB3tLcdHRLPwnoWKJZhyd7pu+WFAizMQUwDkQl9gqn0/9LT5EOdgnp7PI yAeU+R3sLOvniPceDJJuJxDaE+GEI0KjQIayEkKQmkXNcJ7bUAmVO6tPWVnhHDNEsE6W MDTg== 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 k9-20020a170906158900b008c8165f7c25si6536844ejd.951.2023.03.06.10.54.35; Mon, 06 Mar 2023 10:54: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 S229785AbjCFSY0 (ORCPT + 99 others); Mon, 6 Mar 2023 13:24:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjCFSYR (ORCPT ); Mon, 6 Mar 2023 13:24:17 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 96A0E497DA; Mon, 6 Mar 2023 10:23:59 -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 8840E7A0708; Mon, 6 Mar 2023 18:28:29 +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: Mon, 6 Mar 2023 18:27:46 +0100 Message-Id: <20230306172752.7727-13-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759645688763782172?= X-GMAIL-MSGID: =?utf-8?q?1759645688763782172?= Use print_hex_* for debug dumps. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 1cba098b4b82..dec24983d140 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -334,12 +334,9 @@ static int bpck_test_proto(struct pi_adapter *pi, char *scratch, int verbose) } - if (verbose) { - printk("bpck: 0x%x unit %d mode %d: ", - pi->port, pi->unit, pi->mode); - for (i=0;idev, "bpck: 0x%x unit %d mode %d: ", + pi->port, pi->unit, pi->mode); + print_hex_dump_debug("bpck: ", DUMP_PREFIX_NONE, TEST_LEN, 1, buf, TEST_LEN, false); e = 0; for (i=0;i '~')) - scratch[i] = '.'; - printk("bpck EEPROM: %64.64s\n", scratch); - printk(" %64.64s\n", &scratch[64]); -#endif - + print_hex_dump_bytes("bpck EEPROM: ", DUMP_PREFIX_NONE, scratch, 128); dev_info(&pi->dev, "bpck %s, backpack %8.8s unit %d", BPCK_VERSION, &scratch[110], pi->unit); dev_info(&pi->dev, " at 0x%x, mode %d (%s), delay %d\n", pi->port, From patchwork Mon Mar 6 17:27:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1997775wrd; Mon, 6 Mar 2023 10:17:35 -0800 (PST) X-Google-Smtp-Source: AK7set/CDJ/6JSTB++KWbPu1iZ0eigBlxJxnv538v1QT0y1h9QcUvNvR87PS7ES7rPliMzl5ovKG X-Received: by 2002:a17:906:a00a:b0:87b:d3f3:dcf3 with SMTP id p10-20020a170906a00a00b0087bd3f3dcf3mr10395247ejy.35.1678126655475; Mon, 06 Mar 2023 10:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126655; cv=none; d=google.com; s=arc-20160816; b=coF7Aig4YCMXtwD5YzmKppPZCekSBbLZyHE4lfQ3/+Iky+qVaWZpLdsgvlHz4R+15y 3Ig7GFn0TO6f+K4EFHYcK0K0P2N6+2CK5LTD0HnVKk2a1WS96FI8XBmjEcRDLmDJM2Rx zRzVQ4CrA3xRRIQyj0jGnZ/S2FPhDzTQylkbtuW5UafwhQwHlYcZpla8h0JsqllckHNE MT/3qaU7fM3nP6p5AuRng4tGgkWiHc5/EUXHqF1ZxrZpYod5f7zIySGF2zFMFaGTAqK5 SEoLbIXCLdM2MEC1QHpXOV4l5XNQOaJ2TikkHAzWhOVoutT+sEcaAaHW6WnCKox9T++k 7JZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=x82inLbbbSm/aU8TfF2nLI7Aa67lcsBJXBCWAH7eGsg=; b=RfcigXhf9jrONNVhDOr/pf9rkwXq8QlDmyfoJVHPOBsIwj+i7hwjRu7CNsD3vh0KBa 4HGf/81BoXzU6r7bSbyUfw1ydDkA9uGEMD87mZmUb2UW0OKiFavPDljW3uaXI1qi9f7G mJbXGsEp1Y1XsSi8vJC/yHzTUsasazmJi4hEWB+yrXEZQcht0EVkbr5qIA9S+RnWe/7h PNM5UPfVU5IQNFTFvQlM6aQxPdqNedJu8N+cWdKCaGoUFw4u+uXuBfotDAdX9fa7czo/ jm9+25zx/SWXfBfI0KDMCr4hprMxGxUinKlWDgfNGOgr07KkX1DleTM9IaEbY3um5Jd1 szDQ== 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 t12-20020a170906608c00b008de88af9a7esi10937010ejj.171.2023.03.06.10.17.10; Mon, 06 Mar 2023 10:17: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 S229978AbjCFR4Y (ORCPT + 99 others); Mon, 6 Mar 2023 12:56:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbjCFRzs (ORCPT ); Mon, 6 Mar 2023 12:55:48 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 268503B208; Mon, 6 Mar 2023 09:55:20 -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 969477A0709; Mon, 6 Mar 2023 18:28:29 +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: Mon, 6 Mar 2023 18:27:47 +0100 Message-Id: <20230306172752.7727-14-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759643335435839257?= X-GMAIL-MSGID: =?utf-8?q?1759643335435839257?= Merge log_adapter prints to single one, remove version print and meaningless VERSION defines. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 8 ++------ drivers/ata/pata_parport/bpck.c | 9 +++------ drivers/ata/pata_parport/bpck6.c | 9 ++------- drivers/ata/pata_parport/comm.c | 8 ++------ drivers/ata/pata_parport/dstr.c | 8 ++------ drivers/ata/pata_parport/epat.c | 9 ++------- drivers/ata/pata_parport/epia.c | 8 ++------ drivers/ata/pata_parport/fit2.c | 6 ++---- drivers/ata/pata_parport/fit3.c | 9 ++------- drivers/ata/pata_parport/friq.c | 8 ++------ drivers/ata/pata_parport/frpw.c | 10 +++------- drivers/ata/pata_parport/kbic.c | 8 ++------ drivers/ata/pata_parport/ktti.c | 7 ++----- drivers/ata/pata_parport/on20.c | 8 ++------ drivers/ata/pata_parport/on26.c | 8 ++------ 15 files changed, 32 insertions(+), 91 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index ccbba14ccab1..8995a4a08b76 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -15,8 +15,6 @@ */ -#define ATEN_VERSION "1.01" - #include #include #include @@ -124,10 +122,8 @@ static void aten_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - dev_info(&pi->dev, "aten %s, ATEN EH-100 at 0x%x, ", ATEN_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "ATEN EH-100 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol aten = { diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index dec24983d140..793ef2c7849e 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -14,8 +14,6 @@ */ -#define BPCK_VERSION "1.02" - #include #include #include @@ -421,10 +419,9 @@ static void bpck_log_adapter(struct pi_adapter *pi) bpck_read_eeprom(pi,scratch); print_hex_dump_bytes("bpck EEPROM: ", DUMP_PREFIX_NONE, scratch, 128); - dev_info(&pi->dev, "bpck %s, backpack %8.8s unit %d", - BPCK_VERSION, &scratch[110], pi->unit); - dev_info(&pi->dev, " at 0x%x, mode %d (%s), delay %d\n", pi->port, - pi->mode,mode_string[pi->mode],pi->delay); + dev_info(&pi->dev, "backpack %8.8s unit %d at 0x%x, mode %d (%s), delay %d\n", + &scratch[110], pi->unit, pi->port, pi->mode, + mode_string[pi->mode], pi->delay); } static struct pi_protocol bpck = { diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 4770e29bfdeb..f144e1b3cacb 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -19,9 +19,6 @@ Version 2.0.2 - fixed version string usage, and made ppc functions static */ - -#define BACKPACK_VERSION "2.0.2" - #include #include #include @@ -179,10 +176,8 @@ static void bpck6_log_adapter(struct pi_adapter *pi) char *mode_string[5]= {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "BACKPACK %s, Micro Solutions BACKPACK Drive at 0x%x\n", - BACKPACK_VERSION, pi->port); - dev_info(&pi->dev, "Unit: %d Mode:%d (%s) Delay %d\n", - pi->unit,pi->mode,mode_string[pi->mode],pi->delay); + dev_info(&pi->dev, "Micro Solutions BACKPACK Drive unit %d at 0x%x, mode:%d (%s), delay %d\n", + pi->unit, pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static int bpck6_init_proto(struct pi_adapter *pi) diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 7b59eca52185..6e05b50c322c 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -14,8 +14,6 @@ */ -#define COMM_VERSION "1.01" - #include #include #include @@ -183,10 +181,8 @@ static void comm_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "comm %s, DataStor Commuter at 0x%x, ", COMM_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "DataStor Commuter at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol comm = { diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index eb6ddceaeb83..64e45eed9588 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -13,8 +13,6 @@ */ -#define DSTR_VERSION "1.01" - #include #include #include @@ -195,10 +193,8 @@ static void dstr_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - dev_info(&pi->dev, "dstr %s, DataStor EP2000 at 0x%x, ", DSTR_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "DataStor EP2000 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol dstr = { diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 389faa6ae49d..12dd53a06dd0 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -16,8 +16,6 @@ */ -#define EPAT_VERSION "1.02" - #include #include #include @@ -296,11 +294,8 @@ static void epat_log_adapter(struct pi_adapter *pi) ver = RR(0xb); epat_disconnect(pi); - dev_info(&pi->dev, "epat %s, Shuttle EPAT chip %x at 0x%x, ", - EPAT_VERSION, ver, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Shuttle EPAT chip %x at 0x%x, mode %d (%s), delay %d\n", + ver, pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol epat = { diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 48d12f56c501..1216763d0c6d 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -17,8 +17,6 @@ */ -#define EPIA_VERSION "1.02" - #include #include #include @@ -275,10 +273,8 @@ static void epia_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "epia %s, Shuttle EPIA at 0x%x, ", EPIA_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Shuttle EPIA at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol epia = { diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index d0a781f04411..3536d8c07955 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -13,8 +13,6 @@ */ -#define FIT2_VERSION "1.0" - #include #include #include @@ -116,8 +114,8 @@ static void fit2_disconnect(struct pi_adapter *pi) static void fit2_log_adapter(struct pi_adapter *pi) { - dev_info(&pi->dev, "fit2 %s, FIT 2000 adapter at 0x%x, delay %d\n", - FIT2_VERSION, pi->port, pi->delay); + dev_info(&pi->dev, "FIT 2000 adapter at 0x%x, delay %d\n", + pi->port, pi->delay); } diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index f86da2d478cb..9f5320c750e2 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -17,8 +17,6 @@ */ -#define FIT3_VERSION "1.0" - #include #include #include @@ -173,11 +171,8 @@ static void fit3_log_adapter(struct pi_adapter *pi) { char *mode_string[3] = {"4-bit","8-bit","EPP"}; - dev_info(&pi->dev, "fit3 %s, FIT 3000 adapter at 0x%x, " - "mode %d (%s), delay %d\n", - FIT3_VERSION, pi->port, - pi->mode,mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "FIT 3000 adapter at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol fit3 = { diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index ec564e7cb930..ed05e6503147 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -25,8 +25,6 @@ 1.01 GRG 1998.12.20 Added support for soft power switch */ -#define FRIQ_VERSION "1.01" - #include #include #include @@ -219,10 +217,8 @@ static void friq_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "friq %s, Freecom IQ ASIC-2 adapter at 0x%x, ", - FRIQ_VERSION,pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); + dev_info(&pi->dev, "Freecom IQ ASIC-2 adapter at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); pi->private = 1; friq_connect(pi); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 5ea16a247257..c0d50e2ed57d 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -23,8 +23,6 @@ */ -#define FRPW_VERSION "1.03" - #include #include #include @@ -268,11 +266,9 @@ static void frpw_log_adapter(struct pi_adapter *pi) { char *mode_string[6] = {"4-bit","8-bit","EPP", "EPP-8","EPP-16","EPP-32"}; - dev_info(&pi->dev, "frpw %s, Freecom (%s) adapter at 0x%x, ", - FRPW_VERSION,((pi->private%2) == 0)?"Xilinx":"ASIC",pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "Freecom (%s) adapter at 0x%x, mode %d (%s), delay %d\n", + ((pi->private % 2) == 0) ? "Xilinx" : "ASIC", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol frpw = { diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index ea1b931ce20d..3fab7a896e79 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -18,8 +18,6 @@ */ -#define KBIC_VERSION "1.01" - #include #include #include @@ -234,10 +232,8 @@ static void kbic_log_adapter(struct pi_adapter *pi, char *chip) { char *mode_string[6] = {"4-bit","5/3","8-bit", "EPP-8","EPP_16","EPP-32"}; - dev_info(&pi->dev, "kbic %s, KingByte %s at 0x%x, ", KBIC_VERSION, chip, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "KingByte %s at 0x%x, mode %d (%s), delay %d\n", + chip, pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static void k951_log_adapter(struct pi_adapter *pi) diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index b22c283709de..742051f6ea10 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -9,8 +9,6 @@ */ -#define KTTI_VERSION "1.0" - #include #include #include @@ -93,9 +91,8 @@ static void ktti_disconnect(struct pi_adapter *pi) static void ktti_log_adapter(struct pi_adapter *pi) { - dev_info(&pi->dev, "ktti %s, KT adapter at 0x%x, delay %d\n", - KTTI_VERSION, pi->port, pi->delay); - + dev_info(&pi->dev, "KT adapter at 0x%x, delay %d\n", + pi->port, pi->delay); } static struct pi_protocol ktti = { diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index c76d4fb84c61..9cc8be9fa562 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -12,8 +12,6 @@ */ -#define ON20_VERSION "1.01" - #include #include #include @@ -115,10 +113,8 @@ static void on20_log_adapter(struct pi_adapter *pi) { char *mode_string[2] = {"4-bit","8-bit"}; - dev_info(&pi->dev, "on20 %s, OnSpec 90c20 at 0x%x, ", ON20_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "OnSpec 90c20 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol on20 = { diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 5406e76ea727..e37f69db5f76 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -16,8 +16,6 @@ */ -#define ON26_VERSION "1.04" - #include #include #include @@ -280,10 +278,8 @@ static void on26_log_adapter(struct pi_adapter *pi) { char *mode_string[5] = {"4-bit","8-bit","EPP-8", "EPP-16","EPP-32"}; - dev_info(&pi->dev, "on26 %s, OnSpec 90c26 at 0x%x, ", ON26_VERSION, pi->port); - dev_info(&pi->dev, "mode %d (%s), delay %d\n", pi->mode, - mode_string[pi->mode],pi->delay); - + dev_info(&pi->dev, "OnSpec 90c26 at 0x%x, mode %d (%s), delay %d\n", + pi->port, pi->mode, mode_string[pi->mode], pi->delay); } static struct pi_protocol on26 = { From patchwork Mon Mar 6 17:27:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65027 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1995136wrd; Mon, 6 Mar 2023 10:12:29 -0800 (PST) X-Google-Smtp-Source: AK7set80PjUooy0z5t8RY1Pa004pXGBCQNLsRuQbD8jFZtU7yjHUSN/ZluiqlCpyi5LbMIHs0C1u X-Received: by 2002:a17:90b:3881:b0:234:409:9752 with SMTP id mu1-20020a17090b388100b0023404099752mr12095319pjb.25.1678126349079; Mon, 06 Mar 2023 10:12:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126349; cv=none; d=google.com; s=arc-20160816; b=1G2sqwpBIM+ukO4d/v4Jp27ZYvRbLeiq6K6u239diqSacj+rwrY3obYB/9Pl7053X3 lZM4msn/ZwWzBO8gZYl6LijL/ppSktkx6xxn74J467WAeiB+I8a02QMFt8/fj8cUDP7A 3DKLvI5xUPZ3o96oJTTRzmnjwp52TBvypQlkW8X2iDeOWokcK21UHW+EXbEJa3AYe8kY pPIJqv0TIy1aNgq73OlWx8KRa1wyOyeqrsohWNqk1B+cD3v+MY5eFz1pWjx1t2ajhpU5 /oDuD9/ZmZQRHN2Km8WlOs5nSMQLHAcXcGKjMYwmTSNT1bQHqtnP4hywEM+ZHa4Dj6k0 G72A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2PmbqHUmX3A12qnhARxxuA5ts9TV7jgqTCjyf3t085c=; b=ftu/SiGmX83n5l/3fHa/8Qt/QmMdBHKxEpsi95x/7kyEF1gtNVV26V1RHW6B0F7IP0 zhcjI3orUCbe6Sg4au8X4y0r/FKXGCwqOZ6cExNUHc1/4CITUoTiE4a3TjRWg3P9AQsv +lbDuI5JPnwSXuWB1st1zMo4Gu3mhT5db0LUc5f0IHza7ljxOoKCsnztOqCc6A75qFjR fN8eAipXrfDQuErBpleAvTvlh+Nn9PR0+Etg+XZ6ikfSyHxIQaZTPEm5M5c/wh7RxK/w vPGR9hs5Vv0pRID029YdmAYQtUa7tUtPU+1NgWvltvbol8x+qUqImoXwrD6kaaZG/RIm G7EA== 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 s205-20020a632cd6000000b004fd21719183si9109802pgs.605.2023.03.06.10.12.16; Mon, 06 Mar 2023 10:12:29 -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 S231135AbjCFR4N (ORCPT + 99 others); Mon, 6 Mar 2023 12:56:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230465AbjCFRzr (ORCPT ); Mon, 6 Mar 2023 12:55:47 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC47F3E616; Mon, 6 Mar 2023 09:55:16 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id B96097A071E; Mon, 6 Mar 2023 18:28:29 +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: Mon, 6 Mar 2023 18:27:48 +0100 Message-Id: <20230306172752.7727-15-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759643014719632258?= X-GMAIL-MSGID: =?utf-8?q?1759643014719632258?= Remove now useless verbose parameter of bpck6 module. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck6.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index f144e1b3cacb..f0ab30fa739a 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -30,10 +30,6 @@ #include "ppc6lnx.c" #include -/* PARAMETERS */ -static bool verbose; /* set this to 1 to see debugging messages and whatnot */ - - #define PPCSTRUCT(pi) ((Interface *)(pi->private)) /****************************************************************/ @@ -220,5 +216,4 @@ static struct pi_protocol bpck6 = { MODULE_LICENSE("GPL"); MODULE_AUTHOR("Micro Solutions Inc."); MODULE_DESCRIPTION("BACKPACK Protocol module, compatible with PARIDE"); -module_param(verbose, bool, 0644); module_pata_parport_driver(bpck6); From patchwork Mon Mar 6 17:27:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65052 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2014866wrd; Mon, 6 Mar 2023 10:54:28 -0800 (PST) X-Google-Smtp-Source: AK7set+kYfA9mn+YaxvIUcapz4crNP7t8iIt62+z2V6LvmLd84nDhGrOfPvzhpWW/i7byYV4j9Sf X-Received: by 2002:a17:906:fe07:b0:8f2:da10:c69e with SMTP id wy7-20020a170906fe0700b008f2da10c69emr16757380ejb.52.1678128868180; Mon, 06 Mar 2023 10:54:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678128868; cv=none; d=google.com; s=arc-20160816; b=WiU5/XssuBNJRrihtYRN3bAhSQAPQriq6ayzbwxK0LOgZTBvbChMYL0Stm0Q6IyK4b dGOv9Pjm3zk4G6pAZmcaVUVrbvGKyOztJPdc7nciKIbR4fy1tGuW+/369ljWROLxJLT7 Zlhq1mfWOoziUw3a45lErqKZgYMCpPl3q8XgwVpxYeHVzzfhZKP8bXs83j0y1mBaKk5t TT+JXk479t1OLIA5Im5hdbOUZkb8+h+vinw7Rm/c8eAWm4ijkLMfn6TrAH4U1CRydChJ dm27EpauFYwdSUmRJPk5ukpNKbbfl3aIiym772jJN+9lnwO6sZoTYwuccBAciqg5s3ZF xkTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=8CPxa2uDe9SrdrvTrz38u9QxISNWhKyXHO36854its4=; b=UjdyIve60EqDR7ahCOndHye0Eg4YNR7jWVJsPP1TJJW5UE5LSNmkrNrh6nY6fD3Lrw 91XxOVEin7yhz7x1vXcAlqwHMTPQqmzwNR9jczXmJNJuPS2LvvYspREQrMGxs9UR++0I eKst/JicN1hySGDOr1iKi/rqLz+D45kt69ISIQtSk/y/mbG7g6zST0WDtj9NStCOcgvi 5Clwo2+Dvljy5rpeO4DODOAHoawvYaPAz4vciv80FZqwglRHzySwWOW/Md78cYEW+nfi IpxL8qDaFp9SPt4z0f6tmzv1PS6EXqiunuK3kj0AF7KQwW4zoPTqDtTcKro04dxrpkil Oxbg== 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 kb15-20020a1709070f8f00b008c9eb8758desi265559ejc.915.2023.03.06.10.54.04; Mon, 06 Mar 2023 10:54: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 S230030AbjCFSYR (ORCPT + 99 others); Mon, 6 Mar 2023 13:24:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbjCFSYQ (ORCPT ); Mon, 6 Mar 2023 13:24:16 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B4B93B0C2; Mon, 6 Mar 2023 10:23:59 -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 D5F7A7A0728; Mon, 6 Mar 2023 18:28:29 +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: Mon, 6 Mar 2023 18:27:49 +0100 Message-Id: <20230306172752.7727-16-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759645655982914253?= X-GMAIL-MSGID: =?utf-8?q?1759645655982914253?= verbose parameter of test_proto() is now unused, remove it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 2 +- drivers/ata/pata_parport/epat.c | 2 +- drivers/ata/pata_parport/epia.c | 2 +- drivers/ata/pata_parport/friq.c | 2 +- drivers/ata/pata_parport/frpw.c | 2 +- drivers/ata/pata_parport/pata_parport.c | 2 +- include/linux/pata_parport.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 793ef2c7849e..2072e291fd16 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -274,7 +274,7 @@ static void bpck_force_spp(struct pi_adapter *pi) #define TEST_LEN 16 -static int bpck_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int bpck_test_proto(struct pi_adapter *pi, char *scratch) { int i, e, l, h, om; char buf[TEST_LEN]; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 12dd53a06dd0..4877b39ed04c 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -246,7 +246,7 @@ static void epat_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int epat_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int epat_test_proto(struct pi_adapter *pi, char *scratch) { int k, j, f, cc; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 1216763d0c6d..e7401351463a 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -232,7 +232,7 @@ static void epia_write_block(struct pi_adapter *pi, char *buf, int count) } -static int epia_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int epia_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, f; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index ed05e6503147..df15b210f355 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -178,7 +178,7 @@ static void friq_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int friq_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int friq_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, r; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index c0d50e2ed57d..0d4e84806350 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -219,7 +219,7 @@ static int frpw_test_pnp(struct pi_adapter *pi) a hack :-( */ -static int frpw_test_proto(struct pi_adapter *pi, char *scratch, int verbose) +static int frpw_test_proto(struct pi_adapter *pi, char *scratch) { int j, k, r; int e[2] = {0,0}; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index f42a2cafc382..27aa2419af02 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -306,7 +306,7 @@ static int pi_test_proto(struct pi_adapter *pi, char *scratch) parport_claim_or_block(pi->pardev); if (pi->proto->test_proto) - res = pi->proto->test_proto(pi, scratch, 1); + res = pi->proto->test_proto(pi, scratch); else res = default_test_proto(pi, scratch); parport_release(pi->pardev); diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index c44d30b3e886..e45bb1896003 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -67,7 +67,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); - int (*test_proto)(struct pi_adapter *pi, char *scratch, int verbose); + int (*test_proto)(struct pi_adapter *pi, char *scratch); void (*log_adapter)(struct pi_adapter *pi); int (*init_proto)(struct pi_adapter *pi); From patchwork Mon Mar 6 17:27:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65030 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1996778wrd; Mon, 6 Mar 2023 10:15:38 -0800 (PST) X-Google-Smtp-Source: AK7set+Z3Jw8uYQJqBoGZXhJ1QwuVC+8v0BnPYF9vBWBdSjH9VGt0+CROVQPS1cqNtQ5GXSvLIAK X-Received: by 2002:a17:902:e748:b0:19e:82d5:634c with SMTP id p8-20020a170902e74800b0019e82d5634cmr13164436plf.53.1678126538079; Mon, 06 Mar 2023 10:15:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126538; cv=none; d=google.com; s=arc-20160816; b=n7Gj325BXE1tzl3GPDnOHpaC77L5N+E0n3lBx/LG4B2BxB1pw3EjLhFL1N6lJrNfl7 g0168FdjZhiM99tdk6Xm2KG9AboGV0mwdiAjmELmlV8PsNaJrjIZE8HX+AonW43pp8aC PKqUDbp6zStA56M0rb2hD/silB75iltnTvPtETpzQWtNVMHNF+P7c2ID5/kRgpUQAEPs 86GF1PPGYP64zS7u26uTCVMEtoczWnS/BteynibCYVBa3EDfLenTMtUjFqSQvm/Z1sam LQ+YRbu0nWMWWQiofBRnZDKs263GHfoTg619icBntYXK1Eyr9lISpF4wo1+DtH1e4+vf izIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=U3HCiBl3Cisz+dPUfsgmfQRWXnyPRXivKPTQoZtZb4g=; b=0b5rImFTJ5PYLlFDRJdA/k7ZbdFg6KSLIqRewsWlm+y6wcQqR2jrZ0wgRZVyM64B7I IHxVbeo1h0KEE1SLJS7dq7K+fCj8ArECyE8MPiZiwm4Dfm6C/ooXhW7PzlGoNbSOANSo cbqhv9Tz5ZcIh8XA2avg74lpyX37u6zNTcVMY2LY/IOYx1ZaDenJ5RAzsGUGpwoJRwWJ kx4I9elHJTyV6/nPxfgo5YMkrDyzWw2i5Eq6ilyGIo2/6na8Yp99k+S4E1AS7IFozFAG a8y6g2zA2yieuNITTwdwjk3xFudIeaWRatShwm6dQV77+qRr6iRDhPv3LILkZzHead52 k3Rw== 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 bd8-20020a170902830800b0019e64891004si9380702plb.395.2023.03.06.10.15.25; Mon, 06 Mar 2023 10:15:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbjCFRym (ORCPT + 99 others); Mon, 6 Mar 2023 12:54:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbjCFRyZ (ORCPT ); Mon, 6 Mar 2023 12:54:25 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5FF69460A0; Mon, 6 Mar 2023 09:53:57 -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 020B47A0738; Mon, 6 Mar 2023 18:28:30 +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: Mon, 6 Mar 2023 18:27:50 +0100 Message-Id: <20230306172752.7727-17-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759643212790876730?= X-GMAIL-MSGID: =?utf-8?q?1759643212790876730?= Don't pass around a pointer to scratch buffer. Use local buffers in protocols that need it. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 2 +- drivers/ata/pata_parport/epat.c | 3 ++- drivers/ata/pata_parport/epia.c | 3 ++- drivers/ata/pata_parport/friq.c | 3 ++- drivers/ata/pata_parport/frpw.c | 3 ++- drivers/ata/pata_parport/pata_parport.c | 23 +++++++++++------------ include/linux/pata_parport.h | 2 +- 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 2072e291fd16..ecb98bf0e6de 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -274,7 +274,7 @@ static void bpck_force_spp(struct pi_adapter *pi) #define TEST_LEN 16 -static int bpck_test_proto(struct pi_adapter *pi, char *scratch) +static int bpck_test_proto(struct pi_adapter *pi) { int i, e, l, h, om; char buf[TEST_LEN]; diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 4877b39ed04c..609614b2c69e 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -246,10 +246,11 @@ static void epat_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int epat_test_proto(struct pi_adapter *pi, char *scratch) +static int epat_test_proto(struct pi_adapter *pi) { int k, j, f, cc; int e[2] = {0,0}; + char scratch[512]; epat_connect(pi); cc = RR(0xd); diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index e7401351463a..970532619aeb 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -232,10 +232,11 @@ static void epia_write_block(struct pi_adapter *pi, char *buf, int count) } -static int epia_test_proto(struct pi_adapter *pi, char *scratch) +static int epia_test_proto(struct pi_adapter *pi) { int j, k, f; int e[2] = {0,0}; + char scratch[512]; epia_connect(pi); for (j=0;j<2;j++) { diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index df15b210f355..1888e8bcb884 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -178,10 +178,11 @@ static void friq_disconnect(struct pi_adapter *pi) w2(pi->saved_r2); } -static int friq_test_proto(struct pi_adapter *pi, char *scratch) +static int friq_test_proto(struct pi_adapter *pi) { int j, k, r; int e[2] = {0,0}; + char scratch[512]; pi->saved_r0 = r0(); w0(0xff); udelay(20); CMD(0x3d); /* turn the power on */ diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 0d4e84806350..484b5b9d31eb 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -219,10 +219,11 @@ static int frpw_test_pnp(struct pi_adapter *pi) a hack :-( */ -static int frpw_test_proto(struct pi_adapter *pi, char *scratch) +static int frpw_test_proto(struct pi_adapter *pi) { int j, k, r; int e[2] = {0,0}; + char scratch[512]; if ((pi->private>>1) != pi->port) pi->private = frpw_test_pnp(pi) + 2*pi->port; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 27aa2419af02..77a3e5a3f062 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -276,7 +276,7 @@ static void pi_release(struct pi_adapter *pi) module_put(pi->proto->owner); } -static int default_test_proto(struct pi_adapter *pi, char *scratch) +static int default_test_proto(struct pi_adapter *pi) { int j, k; int e[2] = { 0, 0 }; @@ -300,21 +300,21 @@ static int default_test_proto(struct pi_adapter *pi, char *scratch) return e[0] && e[1]; /* not here if both > 0 */ } -static int pi_test_proto(struct pi_adapter *pi, char *scratch) +static int pi_test_proto(struct pi_adapter *pi) { int res; parport_claim_or_block(pi->pardev); if (pi->proto->test_proto) - res = pi->proto->test_proto(pi, scratch); + res = pi->proto->test_proto(pi); else - res = default_test_proto(pi, scratch); + res = default_test_proto(pi); parport_release(pi->pardev); return res; } -static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) +static bool pi_probe_mode(struct pi_adapter *pi, int max) { int best, range; @@ -326,7 +326,7 @@ static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) range = 8; if (range == 8 && pi->port % 8) return false; - return !pi_test_proto(pi, scratch); + return !pi_test_proto(pi); } best = -1; for (pi->mode = 0; pi->mode < max; pi->mode++) { @@ -335,14 +335,14 @@ static bool pi_probe_mode(struct pi_adapter *pi, int max, char *scratch) range = 8; if (range == 8 && pi->port % 8) break; - if (!pi_test_proto(pi, scratch)) + if (!pi_test_proto(pi)) best = pi->mode; } pi->mode = best; return best > -1; } -static bool pi_probe_unit(struct pi_adapter *pi, int unit, char *scratch) +static bool pi_probe_unit(struct pi_adapter *pi, int unit) { int max, s, e; @@ -367,14 +367,14 @@ static bool pi_probe_unit(struct pi_adapter *pi, int unit, char *scratch) for (pi->unit = s; pi->unit < e; pi->unit++) { if (pi->proto->probe_unit(pi)) { parport_release(pi->pardev); - return pi_probe_mode(pi, max, scratch); + return pi_probe_mode(pi, max); } } parport_release(pi->pardev); return false; } - return pi_probe_mode(pi, max, scratch); + return pi_probe_mode(pi, max); } static void pata_parport_dev_release(struct device *dev) @@ -419,7 +419,6 @@ static struct pi_adapter *pi_init_one(struct parport *parport, struct pi_protocol *pr, int mode, int unit, int delay) { struct pardev_cb par_cb = { }; - char scratch[512]; const struct ata_port_info *ppi[] = { &pata_parport_port_info }; struct ata_host *host; struct pi_adapter *pi; @@ -469,7 +468,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport, if (!pi->pardev) goto out_module_put; - if (!pi_probe_unit(pi, unit, scratch)) { + if (!pi_probe_unit(pi, unit)) { dev_info(&pi->dev, "Adapter not found\n"); goto out_unreg_parport; } diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index e45bb1896003..bbfa4e63ee85 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -67,7 +67,7 @@ struct pi_protocol { int (*test_port)(struct pi_adapter *pi); int (*probe_unit)(struct pi_adapter *pi); - int (*test_proto)(struct pi_adapter *pi, char *scratch); + int (*test_proto)(struct pi_adapter *pi); void (*log_adapter)(struct pi_adapter *pi); int (*init_proto)(struct pi_adapter *pi); From patchwork Mon Mar 6 17:27:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65031 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1996788wrd; Mon, 6 Mar 2023 10:15:39 -0800 (PST) X-Google-Smtp-Source: AK7set+13hiAJhp9GbfLnhGuz0q6l7j4JgLMXDLX0gxcQqMlYQhckZBsaoWKCw6BUC/snCej68ue X-Received: by 2002:a05:6a20:8e0a:b0:c7:6a98:5bd8 with SMTP id y10-20020a056a208e0a00b000c76a985bd8mr16334225pzj.0.1678126538990; Mon, 06 Mar 2023 10:15:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126538; cv=none; d=google.com; s=arc-20160816; b=Xa4Fsdhqde8e1xfeYJVnt6D5dh3rGGujzUc6h8iYoUkdcySt3rdvt1OhLGLTiuuUC2 s9ltNl9BoyEY/J+AlOeZwVJ2Jt0sgRB999ua3BrjUqLqjU9Obfxq/wtij+CUZdYvjB8J CBhRemfF/f6X+pt9c+TiYtZthvgMd2RtFiw56FwP+JMrRMj1XRUJEn5MRs6QqmcSPvT4 NwQ/BsQ+NfKjcP2tA7Q+Mwy+wuC3fUzYFASPg5uRiHUz3Y6hkSRNIFI988aV7n5uNLs0 zE002c1D8h1dMTSCPVDV1orZ7d8swQQiH6Vjztq20BjQC4eBJukAAG/tX23LNXfkuhrf UIRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pTX9mRfiomkNj4AQv0GV413xKe5oUC8I8pvFw0AS6CQ=; b=g+vJGAzgT6r2D1pr6ridxXPppYGwXwHkRxoVrRbLOw7n0zUR46AfOrj07aeaAS1CXF 0FW2WHXNjxGWGgeyK/3A4xd/tF7oXkmIVtkf2XyflL0pT2xism7CRF/larl+iSAu5+cY 6A48a+2j3wFc+KBw4PQZXu/Ic0zIKcLiyhiEKQbMjzc6x5Eqdtrprm/5/Liitpj0e4cH 2ofSWjf2S7qwJXkm4mMW1B6MyISebF7/oTnhiolbWfAT3iGaI9wFSxQDCk2OkxtF+fl8 jzq+zl+CuciDdUzq4nleXgDW8EieCP+OU8Lq3dR9z1TRpOekdNncZTRy03tRihPvyQm5 c6Kw== 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 j192-20020a638bc9000000b00491ad1ca2f2si9595590pge.835.2023.03.06.10.15.26; Mon, 06 Mar 2023 10:15:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbjCFRy2 (ORCPT + 99 others); Mon, 6 Mar 2023 12:54:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229772AbjCFRyY (ORCPT ); Mon, 6 Mar 2023 12:54:24 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5FA713C794; Mon, 6 Mar 2023 09:53:56 -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 1A6FB7A073E; Mon, 6 Mar 2023 18:28:30 +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: Mon, 6 Mar 2023 18:27:51 +0100 Message-Id: <20230306172752.7727-18-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759643213792288903?= X-GMAIL-MSGID: =?utf-8?q?1759643213792288903?= Remove obsolete changelogs from protocol drivers. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 6 ------ drivers/ata/pata_parport/bpck.c | 7 ------- drivers/ata/pata_parport/bpck6.c | 8 -------- drivers/ata/pata_parport/comm.c | 6 ------ drivers/ata/pata_parport/dstr.c | 6 ------ drivers/ata/pata_parport/epat.c | 7 ------- drivers/ata/pata_parport/epia.c | 7 ------- drivers/ata/pata_parport/friq.c | 5 ----- drivers/ata/pata_parport/frpw.c | 10 ---------- drivers/ata/pata_parport/kbic.c | 6 ------ drivers/ata/pata_parport/on20.c | 6 ------ drivers/ata/pata_parport/on26.c | 9 --------- 12 files changed, 83 deletions(-) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index 8995a4a08b76..f0d63b8513e0 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -9,12 +9,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index ecb98bf0e6de..472029a21d59 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -7,13 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto, pi->delay - 1.02 GRG 1998.08.15 default pi->delay returned to 4 - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index f0ab30fa739a..683a11131acd 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -11,14 +11,6 @@ */ -/* - This is Ken's linux wrapper for the PPC library - Version 1.0.0 is the backpack driver for which source is not available - Version 2.0.0 is the first to have source released - Version 2.0.1 is the "Cox-ified" source code - Version 2.0.2 - fixed version string usage, and made ppc functions static -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 6e05b50c322c..0483caa80544 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -8,12 +8,6 @@ use this adapter. */ -/* Changes: - - 1.01 GRG 1998.05.05 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index 64e45eed9588..c5af7a5fa636 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -7,12 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 609614b2c69e..0315f98326f8 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -9,13 +9,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 Joshua b. Jore CPP(renamed), epat_connect, epat_disconnect - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 970532619aeb..77869639773d 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -10,13 +10,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 GRG 1998.06.17 support older versions of EPIA - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 1888e8bcb884..8883b3c509cc 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -20,11 +20,6 @@ */ -/* Changes: - - 1.01 GRG 1998.12.20 Added support for soft power switch -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 484b5b9d31eb..1ef8be79d793 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -13,16 +13,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - fix chip detect - added EPP-16 and EPP-32 - 1.02 GRG 1998.09.23 added hard reset to initialisation process - 1.03 GRG 1998.12.14 made hard reset conditional - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 3fab7a896e79..29f4f1e14d21 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -12,12 +12,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 9cc8be9fa562..6956b91efb47 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -6,12 +6,6 @@ Onspec 90c20 parallel to IDE adapter. */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - -*/ - #include #include #include diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index e37f69db5f76..1d90eb9b541e 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -7,15 +7,6 @@ */ -/* Changes: - - 1.01 GRG 1998.05.06 init_proto, release_proto - 1.02 GRG 1998.09.23 updates for the -E rev chip - 1.03 GRG 1998.12.14 fix for slave drives - 1.04 GRG 1998.12.20 yet another bug fix - -*/ - #include #include #include From patchwork Mon Mar 6 17:27:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65055 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2014909wrd; Mon, 6 Mar 2023 10:54:36 -0800 (PST) X-Google-Smtp-Source: AK7set/cvGAj1b7FbiKcGVYUNQZgzkpt9jx1Pu8lf9C+1z2xaqnyCYYMxy/+VzNZoNs168KZSizm X-Received: by 2002:a17:906:48c9:b0:88e:2ff5:85d2 with SMTP id d9-20020a17090648c900b0088e2ff585d2mr11866828ejt.25.1678128876657; Mon, 06 Mar 2023 10:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678128876; cv=none; d=google.com; s=arc-20160816; b=cd3gCEy2WkpGyqyeBa/DS7Cm4+6nlT8mWhEP+NLfPvNU/2R/SlbPMPCGviRkYa8Qjk Z3gZ3zLxFRMPmmjPxSO++8gAXJMe70t8nz3o+38KEvpu6i4wOVeljkHaa+IKq6Hv90TJ H3An+Iyx/R/SjotW5rhGQSwuziW5FL9Jtu201j7CHFRBl7bzHHMC6DR/m2ZIW5NOo8d9 T4t2o0K7EJT2c8B+JNBRyAuh+pSOi/8HeEe1ORIT3AZRW6aKUAEWTSF4YQqS6SrCfc// vlInSzrKYBn25bMlzRbBbHmCXFH15H2whSNOhmguU+NdLjBhTq7/G/qWmDHwOu0Kjcpl dbHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=IRliRIPBIbwUf4YkJK28gHu9fmCAELQ8dhcppOTNLAQ=; b=Ev9ecMZLncpgimxEBoL5/WxUsUM1VEwU0FsydDLq9Jg+wYpntpqLHFyN+vAgcf4zSu zUYYcbvOWkCEGTuD7I8xFJAfWNIidG90RIVVkRIoz2luqt6y+ky4WOaV4a7L0g6d58+5 QBT/c+6EzCb5gmrDMNpKMMFW8cchd5kS/nED99oOyU27d8RxzFd06JXwBxlwm/OlfIDa /XaV8OMlMT+SLE0lz6kyi+ebEKZ46USXB/BGxSrMyQaIGL6RvAwLuJCB0eE6+YWu2OII Vwx4QtEozTc/EzbeY5EaomNHR8Bn/qYFloiuxEtO03wiDnqbQ//5EYJsUiHiQBkuQuh2 xAhA== 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 l21-20020a170906795500b008d19011d63asi1291442ejo.4.2023.03.06.10.54.13; Mon, 06 Mar 2023 10:54:36 -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 S230409AbjCFSeX (ORCPT + 99 others); Mon, 6 Mar 2023 13:34:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230396AbjCFSeJ (ORCPT ); Mon, 6 Mar 2023 13:34:09 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B54473C1E; Mon, 6 Mar 2023 10:33:34 -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 34B327A0741; Mon, 6 Mar 2023 18:28:30 +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: Mon, 6 Mar 2023 18:27:52 +0100 Message-Id: <20230306172752.7727-19-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759645665166859850?= X-GMAIL-MSGID: =?utf-8?q?1759645665166859850?= Now that paride is gone, pata_parport.h does not need to be in include/linux. Move it to drivers/ata/pata_parport. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/aten.c | 3 +-- drivers/ata/pata_parport/bpck.c | 3 +-- drivers/ata/pata_parport/bpck6.c | 3 +-- drivers/ata/pata_parport/comm.c | 3 +-- drivers/ata/pata_parport/dstr.c | 3 +-- drivers/ata/pata_parport/epat.c | 3 +-- drivers/ata/pata_parport/epia.c | 3 +-- drivers/ata/pata_parport/fit2.c | 3 +-- drivers/ata/pata_parport/fit3.c | 3 +-- drivers/ata/pata_parport/friq.c | 3 +-- drivers/ata/pata_parport/frpw.c | 3 +-- drivers/ata/pata_parport/kbic.c | 3 +-- drivers/ata/pata_parport/ktti.c | 3 +-- drivers/ata/pata_parport/on20.c | 3 +-- drivers/ata/pata_parport/on26.c | 3 +-- drivers/ata/pata_parport/pata_parport.c | 2 +- {include/linux => drivers/ata/pata_parport}/pata_parport.h | 0 17 files changed, 16 insertions(+), 31 deletions(-) rename {include/linux => drivers/ata/pata_parport}/pata_parport.h (100%) diff --git a/drivers/ata/pata_parport/aten.c b/drivers/ata/pata_parport/aten.c index f0d63b8513e0..1bd248c42f8b 100644 --- a/drivers/ata/pata_parport/aten.c +++ b/drivers/ata/pata_parport/aten.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) ((((a>>4)&0x0f)|(b&0xf0))^0x88) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index 472029a21d59..1c5035a09554 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" #undef r2 #undef w2 diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 683a11131acd..964bc688e280 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -18,9 +18,8 @@ #include #include #include - #include "ppc6lnx.c" -#include +#include "pata_parport.h" #define PPCSTRUCT(pi) ((Interface *)(pi->private)) diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 0483caa80544..4c2f9ad60ad8 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -15,8 +15,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/dstr.c b/drivers/ata/pata_parport/dstr.c index c5af7a5fa636..2524684be206 100644 --- a/drivers/ata/pata_parport/dstr.c +++ b/drivers/ata/pata_parport/dstr.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/epat.c b/drivers/ata/pata_parport/epat.c index 0315f98326f8..b146999368ae 100644 --- a/drivers/ata/pata_parport/epat.c +++ b/drivers/ata/pata_parport/epat.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)+(b&0xf0)) #define j53(a,b) (((a>>3)&0x1f)+((b<<4)&0xe0)) diff --git a/drivers/ata/pata_parport/epia.c b/drivers/ata/pata_parport/epia.c index 77869639773d..f6db2f79fe99 100644 --- a/drivers/ata/pata_parport/epia.c +++ b/drivers/ata/pata_parport/epia.c @@ -17,8 +17,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads on port 1, 8-bit writes 1 5/3 reads on ports 1 & 2, 8-bit writes diff --git a/drivers/ata/pata_parport/fit2.c b/drivers/ata/pata_parport/fit2.c index 3536d8c07955..fd3b2ce426a5 100644 --- a/drivers/ata/pata_parport/fit2.c +++ b/drivers/ata/pata_parport/fit2.c @@ -20,8 +20,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0)) diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c index 9f5320c750e2..75df656ac472 100644 --- a/drivers/ata/pata_parport/fit3.c +++ b/drivers/ata/pata_parport/fit3.c @@ -24,8 +24,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>3)&0x0f)|((b<<1)&0xf0)) diff --git a/drivers/ata/pata_parport/friq.c b/drivers/ata/pata_parport/friq.c index 8883b3c509cc..1647264cd9a8 100644 --- a/drivers/ata/pata_parport/friq.c +++ b/drivers/ata/pata_parport/friq.c @@ -27,8 +27,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define CMD(x) w2(4);w0(0xff);w0(0xff);w0(0x73);w0(0x73);\ w0(0xc9);w0(0xc9);w0(0x26);w0(0x26);w0(x);w0(x); diff --git a/drivers/ata/pata_parport/frpw.c b/drivers/ata/pata_parport/frpw.c index 1ef8be79d793..3ec0abf16fa6 100644 --- a/drivers/ata/pata_parport/frpw.c +++ b/drivers/ata/pata_parport/frpw.c @@ -20,8 +20,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define cec4 w2(0xc);w2(0xe);w2(0xe);w2(0xc);w2(4);w2(4);w2(4); #define j44(l,h) (((l>>4)&0x0f)|(h&0xf0)) diff --git a/drivers/ata/pata_parport/kbic.c b/drivers/ata/pata_parport/kbic.c index 29f4f1e14d21..8213e62f8f00 100644 --- a/drivers/ata/pata_parport/kbic.c +++ b/drivers/ata/pata_parport/kbic.c @@ -19,8 +19,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define r12w() (delay_p,inw(pi->port+1)&0xffff) diff --git a/drivers/ata/pata_parport/ktti.c b/drivers/ata/pata_parport/ktti.c index 742051f6ea10..4890b1f12348 100644 --- a/drivers/ata/pata_parport/ktti.c +++ b/drivers/ata/pata_parport/ktti.c @@ -16,8 +16,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define j44(a,b) (((a>>4)&0x0f)|(b&0xf0)) diff --git a/drivers/ata/pata_parport/on20.c b/drivers/ata/pata_parport/on20.c index 6956b91efb47..276ace12d490 100644 --- a/drivers/ata/pata_parport/on20.c +++ b/drivers/ata/pata_parport/on20.c @@ -13,8 +13,7 @@ #include #include #include - -#include +#include "pata_parport.h" #define op(f) w2(4);w0(f);w2(5);w2(0xd);w2(5);w2(0xd);w2(5);w2(4); #define vl(v) w2(4);w0(v);w2(5);w2(7);w2(5);w2(4); diff --git a/drivers/ata/pata_parport/on26.c b/drivers/ata/pata_parport/on26.c index 1d90eb9b541e..dc47a54b121f 100644 --- a/drivers/ata/pata_parport/on26.c +++ b/drivers/ata/pata_parport/on26.c @@ -14,8 +14,7 @@ #include #include #include - -#include +#include "pata_parport.h" /* mode codes: 0 nybble reads, 8-bit writes 1 8-bit reads and writes diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 77a3e5a3f062..a1dc639665dc 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -6,7 +6,7 @@ #include #include #include -#include +#include "pata_parport.h" #define DRV_NAME "pata_parport" diff --git a/include/linux/pata_parport.h b/drivers/ata/pata_parport/pata_parport.h similarity index 100% rename from include/linux/pata_parport.h rename to drivers/ata/pata_parport/pata_parport.h