On Sat, Apr 10, 2010 at 6:55 PM, Antonio Borneo <[email protected]> wrote: > Hi, > in "src/helper/membuf.c" there are several unused functions. > > I was working at a cleanup, and I noticed: > - functions in "membuf.c" just put string messages in a buffer, to be > eventually printed later. > - such functions are only referenced in "src/flash/nor/at91sam3.c". > - buffer is printed in "at91sam3.c" through command_print() or LOG_INFO(). > - one of the unused function is the one that free() the buffer. This > means in "at91sam3.c" there are buffers that are never freed. > > I believe would be better to revisit the file "at91sam3.c" and replace > all usage of "membuf.c" with direct prints through command_print() or > LOG_INFO(). > After that, the whole helper file "membuf.c" could be removed. > Any comment?
Sounds great! I'm a great fan of deleting code and moving "general" functions that are only used once and never will be used anywhere else into the specific module to reduce interface surface area between modules. Makes the whole system easier to understand and maintain. > I'm available to make this job, but I have no possibility to test the > code, since missing the proper target board. > Anyone available to contribute? If you break it apart in clear patches, then this seems like the sort of thing we can clean up and have retested during the release cycle. If a target is never tested, then the policy is to apply cleanups regardless and possibly even remove the specific target/flash support entirely. -- Meet us in Paris at rts EMBEDDED SYSTEMS 2010 - March 30. and April 1. http://www.zylin.com/events_rts.html Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
