android_kernel_motorola_sm6225/drivers/ide
Linus Torvalds 1a7809e349 ide: re-code ide_fixstring() loop to be less evil
On Friday 25 July 2008, Linus Torvalds wrote:
> 
> On Fri, 25 Jul 2008, Ben Dooks wrote:
> > 
> > personally, i would much prefer to see the loop being less evil
> > like:
> > 
> > 	for (p = s; p < end; p += 2)
> > 		be16_to_cpus((u16 *)p);
> 
> Well, in this case, the code actually depends on 'p' being back at the 
> start of the buffer by the end of it all, so it would need some more 
> changes than that. 
> 
> But yes, I applied David's patch, but I _also_ suspect that we would be 
> better off without code that does horrid things like casts and assignments 
> inside the function arguments.
> 
> So it would be nice to re-code that loop to be more readable. But due to 
> the reliance of 'p' being 's' after the loop, the minimal patch would be 
> something like the appended.
> 
> Bartlomiej - take this or not, I'm not going to commit it - I haven't 
> tested it, nor do I even have any machines that would trigger it. So this 
> is more a "maybe something like this" than anything else.

From: Linus Torvalds <torvalds@linux-foundation.org>
CC: Ben Dooks <ben-linux@fluff.org>
Cc: David Miller <davem@davemloft.net>
Cc: harvey.harrison@gmail.com
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-10 22:39:22 +02:00
..
arm ide: make drive->id an union (take 2) 2008-10-10 22:39:19 +02:00
h8300 ide: add ide_host_add() helper 2008-07-23 19:55:57 +02:00
legacy ide: remove drive->driveid 2008-10-10 22:39:19 +02:00
mips IDE: Fix platform device registration in Swarm IDE driver (v2) 2008-10-05 18:23:28 +02:00
pci ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ppc ide: make drive->id an union (take 2) 2008-10-10 22:39:19 +02:00
ide-acpi.c ide: make drive->id an union (take 2) 2008-10-10 22:39:19 +02:00
ide-atapi.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ide-cd.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ide-cd.h ide-cd: convert to using the new atapi_flags 2008-07-23 19:56:02 +02:00
ide-cd_ioctl.c ide: ide-cd_ioctl.c fix sparse integer as NULL pointer warnings 2008-07-23 19:56:02 +02:00
ide-cd_verbose.c block: replace sizeof(rq->cmd) with BLK_MAX_CDB 2008-04-29 14:48:55 +02:00
ide-disk.c ide: remove no longer needed ide_drive_t fields 2008-10-10 22:39:22 +02:00
ide-dma.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ide-floppy.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ide-generic.c ide-generic: remove ide_default_{io_base,irq}() inlines (take 3) 2008-07-24 22:53:31 +02:00
ide-io.c ide: remove no longer needed ide_drive_t fields 2008-10-10 22:39:22 +02:00
ide-iops.c ide: re-code ide_fixstring() loop to be less evil 2008-10-10 22:39:22 +02:00
ide-lib.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ide-pio-blacklist.c ide: move PIO blacklist to ide-pio-blacklist.c 2008-07-16 20:33:39 +02:00
ide-pnp.c ide: add ide_host_add() helper 2008-07-23 19:55:57 +02:00
ide-probe.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ide-proc.c ide: WIN_* -> ATA_CMD_* 2008-10-10 22:39:21 +02:00
ide-scan-pci.c ide: replace remaining __FUNCTION__ occurrences 2008-04-26 22:25:20 +02:00
ide-tape.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ide-taskfile.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
ide-timings.c ide: remove drive->driveid 2008-10-10 22:39:19 +02:00
ide.c ide: use ATA_* defines instead of *_STAT and *_ERR ones 2008-10-10 22:39:21 +02:00
Kconfig IDE: Fix platform device registration in Swarm IDE driver (v2) 2008-10-05 18:23:28 +02:00
Makefile ide: remove stale comments from drivers/ide/Makefile 2008-07-24 22:53:36 +02:00
setup-pci.c ide: drop 'name' parameter from ->init_chipset method 2008-07-24 22:53:33 +02:00