Hi Tomas! On Thu, Jan 18, 2018 at 12:00:15AM +0100, Tomas Vanek wrote: > iterate_protect_blocks = false; > > is set and no more used. It is intentional guard if somebody touches > the code and uses the flag in the following for cycle, he gets the > correct value as expected by flag name.
I would say that changing it is confusing. I think for clarity function might have to require that prot_blocks array is present for iterate_protect_blocks operation. But your decision was that if it's not present, it means that protection blocks and sectors are the same. That's fine. But that doesn't change the fact that the function was called with intent to iterate_protect_blocks, so I see no reason to change it to false. I see you were the first to actually document a function in nor/core.c but would you mind changing that comment to a Doxygen-style function description so that we would get it in Developer's Guide: http://openocd.org/doc-release/doxygen/flash_2nor_2core_8c.html#aa2385863add6d8b1158ec7d5cb3aa1c1 -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:[email protected] ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
