
In message 46B0C928.3020001@googlemail.com you wrote:
CodingStyle: Generally, inline functions are preferable to macros resembling functions.
I know that this is no excuse for bad coding style, but please note that this stuff is already part of U-Boot, see lib_avr32/div64.c and include/asm-avr32/div64.h. My patch only moves the *unmodfied* files to lib_generic for general use, as proposed by HÃ¥vard. Same as U-Boot NG did ;)
Yes, I understood thos. Just thought I might talk you into even more improvements :-)
COBJS = bzlib.o bzlib_crctable.o bzlib_decompress.o \ bzlib_randtable.o bzlib_huffman.o \
crc32.o ctype.o display_options.o ldiv.o sha1.o \
string.o vsprintf.o zlib.ocrc32.o ctype.o display_options.o div64.o ldiv.o sha1.o \
Why should I link this code and increase the memory footprint for all boards, when 99% of them don't need this?
Sorry if I misunderstood anything here. But with putting do_div/__div64_32 to a *library* boards use it only if they need it?
Right. Objects from a librariry get only pulled into the linked image when they are referenced somewhere. Objects explicitely listed on the command line get always included.
I failed to see that this was an object list for another library. Sorry for the false alarm.
Anything wrong with this?
No. I was wrong.
Rejected.
What's your proposal then with the 64bit division issue in nand_util.c?
I withdraw the reject.
Best regards,
Wolfgang Denk