From: Ondrej Zary Date: Sat, 18 Feb 2023 22:01:23 +0000 (+0100) Subject: ata: pata_parport: Remove pi_swab16 and pi_swab32 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e02c625de580a1bc8166c5f95f23a50fa59ee1bf;p=linux.git ata: pata_parport: Remove pi_swab16 and pi_swab32 Convert comm and kbic drivers to use standard swab16. Remove pi_swab16 and pi_swab32. Reviewed-by: Sergey Shtylyov Signed-off-by: Ondrej Zary Signed-off-by: Damien Le Moal --- diff --git a/drivers/ata/pata_parport/comm.c b/drivers/ata/pata_parport/comm.c index 1775e7ed9336b..11ed9fb57744c 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];