From patchwork Sat Feb 18 22:01:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59033 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569529wrn; Sat, 18 Feb 2023 14:04:05 -0800 (PST) X-Google-Smtp-Source: AK7set99G2cskCZzc93hv69xEJxoD3r3WDu+RNKvtz6PVmrDS2fntMKTBaxLJc+O60viyFHDf83b X-Received: by 2002:a62:7bd2:0:b0:5a8:a570:4597 with SMTP id w201-20020a627bd2000000b005a8a5704597mr5727596pfc.5.1676757845675; Sat, 18 Feb 2023 14:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757845; cv=none; d=google.com; s=arc-20160816; b=Tc0Hd/SJGygyNXNAqTeYy77ijx9SZYHrFAq7wqyei58uhHfgrcaytlYVwtQhtvct7i 5izB8NEW8yexmi0+Ub0OX68nT1vLYHZ2j4BwxkFuTKnnJqe1P9AlT9eDb0xUoBNmJqxy Ds19radKlLK6gojHP+bmNOAlH4/kllDlQrA9OryJyB/Lcw30rO+ZkIMHVDoeauy6B4sy S27LFsw+Ew7EWx8jCmxetE2XnU/j2i9qeBn74BIylXA9bXOhfq6PmOU07akCIBQAWdwD W6OSNEJqOOQo8maccZmtearAyjIzPf6cYHfmODWRYyw/F9FHB707+SPV+AohsNnS+ddT OHUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=itaEl2/MV7NrB1NLxH/2G5OlmXYqlrvaP8KEI3d5iUU=; b=TnHBS/PKAwwYecxoZ9/wOl8/5HZwN+iXxV729ecHAevkc20RAfO/+QK5b68DDBxFh5 NtpRvxGOazBfaOX2Z25lUCFZWO++2uMuX4oZQqT9oKM/9M9fBaM5DCIuVrVQwQ44LvLu KCySNkn7Q1VRKgneousXMfcAyQuEHNQpg6qmbeH9/sQKOLVT0QmqxO+eBA5mMrRf9PZo oP8//udnvd0cbgClkNnUZyTfxGLunZ/qUflVAOaMyo+5IF1h7FbXDWOyNKvP39I9I+q0 w/A6gMeO7rFtQYW+WVUF7eOClYXaDcBjoaxzS1RngfT/J3KLwGT8KA0tsUlBydx6lEtC 8Wwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a056a0015c900b005a919e42ba8si10020158pfu.194.2023.02.18.14.03.52; Sat, 18 Feb 2023 14:04:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbjBRWCM (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbjBRWCH (ORCPT ); Sat, 18 Feb 2023 17:02:07 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E1BC12873; Sat, 18 Feb 2023 14:02:04 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 847F07A058D; Sat, 18 Feb 2023 23:02:02 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/18] pata_parport: Remove pi_swab16 and pi_swab32 Date: Sat, 18 Feb 2023 23:01:23 +0100 Message-Id: <20230218220138.5692-4-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758208034898603411?= X-GMAIL-MSGID: =?utf-8?q?1758208034898603411?= Convert comm and kbic drivers to use standard swab16. Remove pi_swab16 and pi_swab32. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/comm.c | 7 +++++-- drivers/ata/pata_parport/kbic.c | 7 +++++-- include/linux/pata_parport.h | 17 ----------------- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 1775e7ed9336..11ed9fb57744 100644 --- a/drivers/ata/pata_parport/comm.c +++ b/drivers/ata/pata_parport/comm.c @@ -165,11 +165,14 @@ static void comm_write_block( PIA *pi, char * buf, int count ) break; case 3: w3(0x48); (void)r1(); - for (k=0;kport + 4)) #define r4l() (delay_p, inl(pi->port + 4)) -static inline u16 pi_swab16(char *b, int k) -{ - union { u16 u; char t[2]; } r; - - r.t[0] = b[2 * k + 1]; r.t[1] = b[2 * k]; - return r.u; -} - -static inline u32 pi_swab32(char *b, int k) -{ - union { u32 u; char f[4]; } r; - - r.f[0] = b[4 * k + 1]; r.f[1] = b[4 * k]; - r.f[2] = b[4 * k + 3]; r.f[3] = b[4 * k + 2]; - return r.u; -} - struct pi_protocol { char name[8];