>>>>> " " == Meelis Roos <mroos@linux.ee> writes:
> /*
> * Calculate the number of 512byte blocks used.
> */
> static inline unsigned long nfs_calc_block_size(u64 tsize) {
> loff_t used = (tsize + 511) / 512; return (used >
> ULONG_MAX) ? ULONG_MAX : used;
> }
I assumed most compilers would convert that divide into the equivalent
shift instruction: to me these things are much more readable when
written like the above. I should have guessed...
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:12 EST