Skip to contentSkip to conversation

argument type of generic_fls()

KJ walter harms 2 participants 2 messages Aug 13, 2005 Kernel janitors

lore
Share & tools
lore
#0 lore raw

hi list,
after the log2 discussion i was looking for log2 in kernel. i found long_log2() in page_alloc.c. What the author actualy wanted was fls(). To my confusion the generic_fls() searches only 32 bit but has an argument of type int (i would expect uint32).
Will it create confusion with 64bit int systems ? if anyone considers these a problem i would add a flsl() function and replace the int with uint32.

re
walter
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 1 line · walter harms

hi list,

Hi Walter,

Quoted 7 lines

after the log2 discussion i was looking for log2 in kernel. i found long_log2() in page_alloc.c. What the author actualy wanted was fls(). To my confusion the generic_fls() searches only 32 bit but has an argument of type int (i would expect uint32).
Will it create confusion with 64bit int systems ? if anyone considers these a problem i would add a flsl() function and replace the int with uint32.

ints stay 32bit on 64bit systems.

Quoted 2 lines

re
walter

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors