On Saturday 21 July 2007 11:42, Robert P. J. Day wrote: > i just tried to use the % operator to calculate a remainder, and i > got the above error message. this happened when i tried to use a > modulus of 15. > > the same expression worked fine when i used a modulus of 16, so i'm > assuming the latter operation was optimized to just use a bit mask, > while using 15 required an actual call to __moddi3, which failed. > > so how do i get that feature? i've seen kernel code that uses > non-power-of-2 moduli, so it's obviously doable. am i forgetting to > include the proper header file? thanks. > Is the base type of the expression you use % against 64bit? In that case I think you need to use do_div64... Regards, tavi -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ