Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C441FC6FD1D for ; Mon, 6 Mar 2023 18:43:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230019AbjCFSnj (ORCPT ); Mon, 6 Mar 2023 13:43:39 -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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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]; -- Ondrej Zary