Re: [PATCH] ata: endianness annotations in pata drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 18, 2008 at 03:53:02PM -0700, Harvey Harrison wrote:
>  			if (rw == WRITE) {
>  				memcpy(&pad, buf + buflen - slop, slop);
> -				pad = le32_to_cpu(pad);
> +				le32_to_cpus(&pad);
Ewww....
>  				iowrite32(pad, ap->ioaddr.data_addr);

What's wrong with
  				iowrite32(le32_to_cpu(pad),
					  ap->ioaddr.data_addr);
instead of that crap?

>  				pad = ioread32(ap->ioaddr.data_addr);
> -				pad = cpu_to_le32(pad);
> +				cpu_to_le32s(pad);

pad = cpu_to_le32(ioread32(....))
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux