Hello, I wrote:
+ if (id[ATA_ID_MAJOR_VER] == 0xFFFF) + return 0; + return (id[ATA_ID_MAJOR_VER] & (1 << v)) ? 1 : 0;
Refer to afa_dev_cf_sata() on how it's done in really optimal way.
To what ? - there is no ata or afa_dev_cf_sata ?
Very funny. Meant to be ata_dev_is_sata(), of course.
We don't have one of those either - do you mean ata_id_is_sata ?
Sure I have, just got used to its original name, ide_dev_is_sata().
If so then yes that looks like it might be slightly cleaner although its probably one instruction difference from the .s files.
That extra *if* cost more than instruction I think.
At least 2 on x86.
I'll redo it that way
OK, just leave ata_dev_is_cfa() alone and rename the patch.
Just reposted my patch with better description. MBR, Sergei -- 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