On Saturday 12 December 2009, Marek Vasut wrote:
> > Also, can you restructure it so that you don't just add a bit
> > "if (there's a custom erase_page) { ... }"?  That's the sort
> > of thing which is easier to just require.
> 
> Require? Why? No other driver probably needs it/will find it useful.

To streamline and simplify the primary code paths.  It's better to

        ptr->op(...)

than to

        if (ptr->op)
                ptr->op(...);
        else
                inlined default version ptr->op();

Admittedly this is one of the ways the current source is less
clean than it should be.  But that's not a reason to perpetuate
such practices.

- Dave

> > Either provide the
> > current logic in a separate routine that gets patched into the
> > ops vector of any driver that doesn't have it, or ...


_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to