On Wed, 2006-11-22 at 17:59 -0200, Henrique de Moraes Holschuh wrote: > From: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx> > > - if (!acpi_evalf(gfan_handle, &s, NULL, "d")) > + if (unlikely(!acpi_evalf(gfan_handle, &status, NULL, "d"))) > - if (!acpi_ec_read(fan_status_offset, &status)) > - len += sprintf(p + len, "status:\t\tunreadable\n"); > + if (unlikely(!acpi_ec_read(fan_status_offset, &status))) > + return -EIO; > - if (!acpi_ec_read(fan_rpm_offset, &lo) || > - !acpi_ec_read(fan_rpm_offset + 1, &hi)) > - len += sprintf(p + len, "speed:\t\tunreadable\n"); > + if (unlikely(!acpi_ec_read(fan_rpm_offset, &lo) || > + !acpi_ec_read(fan_rpm_offset + 1, &hi))) > + return -EIO; Hmm, just one little thing, which is probably not worth modifying. AFAIK likely/unlikely is only used at often processed optimized code. It might make sense here in general, but is normally not used for better reading and as it's just not worth it. I might be wrong and someone wants to correct me, it's just that other kernel parts don't show these often. Thomas ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ ibm-acpi-devel mailing list ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel