Actually, another comment: > + /* Scan the free entry array for a large enough free space. */ > + do { > + if (be16_to_cpu(bests[findex]) != NULLDATAOFF && This could be changed to: if (bests[findex] != cpu_to_be16(NULLDATAOFF) && which might lead to slightly better code generation.