From patchwork Sat Feb 11 14:42:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 55820 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1522016wrn; Sat, 11 Feb 2023 06:44:05 -0800 (PST) X-Google-Smtp-Source: AK7set/6Pb9afcorU1hdWwf8NfzSEoR77M6mbun7J3xMb1GG6GmPOv3IxRDRmkeZly2ySmrIRJIx X-Received: by 2002:a50:baa8:0:b0:4aa:a4dd:9746 with SMTP id x37-20020a50baa8000000b004aaa4dd9746mr20008530ede.39.1676126645062; Sat, 11 Feb 2023 06:44:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676126645; cv=none; d=google.com; s=arc-20160816; b=S7KshKVzaooIPhVgY7YmwdX/IX8FTZUBs6ls4k4l3Eoanr+fvU9P9EtGC8BfO3xUxs RIDyfgfmaqHLnzpn9x/dbNSDerjB99HBBrjVcqFRNuJzFTuv8/cVk8jY4iPcCdQu4BSH 9seBfz/Zaul7WKo0ugqodVQuo3qAgLMhn1l9ZY4ylSBNFRN9C2+Bx2XXJuv0/BZzcy/I qS41ClyFQsc+gTlQct0hJsDLKDTVyyG7WMAH29TAkvNc48GN0hxz4WDbU6LEEuCnw/kJ vdb4NblIGqSZn+78oEreQF8ApLLCoHvRIfmVF3q2dh3NgTOJwVbgMBasIjqqmNtXflkB l2WA== 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=RRBHdEhYY4B64ky6WcnnDXtLh/pDNnf27WLtImk75oQ=; b=lYkrO/lti5Ny7VTBtBbl7JliampEdHSnEBGUG3ozJb8c8Y+rnVq3WyXh7E5Yge+DYm mzhp/b1UFWDzJLSJCS0Gdc7nw4YnDBupW28uM6/PMVaQQlLiXJRaNsKPbeycHSjElrvd 03CgpxjRk2XaJXTFQ0BkzCpYNgzozBBN94xRkvPvXaCoCzaROSuvyxQLmMHvi50e3PEs mjRVMagcEFy2uKSUiNzgVBwjGjkuWonlSpKs2RrqW2TRels4sFFep5wRUbhjLw/lDtGA 5yRaaRJRXviT4ZvlaMsztuF9XfH8gSpVQ5oaVuz6oNHd0TiXaPMI1LY5a1X+aAHUGNZK kK7w== 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 o7-20020a056402038700b004ab15dcb783si6815640edv.400.2023.02.11.06.43.41; Sat, 11 Feb 2023 06:44:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbjBKOm5 (ORCPT + 99 others); Sat, 11 Feb 2023 09:42:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbjBKOmx (ORCPT ); Sat, 11 Feb 2023 09:42:53 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC49F1F49D; Sat, 11 Feb 2023 06:42:50 -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 005CD7A038E; Sat, 11 Feb 2023 15:42:48 +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/12] pata_parport: Remove pi_swab16 and pi_swab32 Date: Sat, 11 Feb 2023 15:42:21 +0100 Message-Id: <20230211144232.15138-2-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230211144232.15138-1-linux@zary.sk> References: <20230211144232.15138-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?1757546173094361806?= X-GMAIL-MSGID: =?utf-8?q?1757546173094361806?= Convert comm and kbic drivers to use standard swab16. Remove pi_swab16 and pi_swab32. The funny thing: pi_swab32 was not swab32 Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- 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];