On Friday 27 November 2009, Dean Glazeski wrote: > On Fri, Nov 27, 2009 at 2:12 AM, David Brownell <davi...@pacbell.net> wrote: > > > On Monday 23 November 2009, Dean Glazeski wrote: > > > point. The new play area is http://repo.or.cz/w/openocd/dnglaze.git. > > I've > > > > I merged a few of these. The page command refactoring: > > > > + if (oob && NAND_CMD_READ0 && nand->page_size <= 512) { > > + cmd = NAND_CMD_READOOB; > > + } > > > > looks buggy for "&& NAND_CMD_READ0 && " ... and I'd drop the > > needless brackets. > > > You make a good point and I did think of that when I originally wrote this.
What -- that "&& constant ..." is a constant? I think you misread that ... > To tell you the truth, I'm not entirely certain how to do this better. I > suppose the logic could be pulled back to before the function call, but the > logic is redundant as it would be placed before every read command function > call. Would it be better to create a read version of the page command > function that has this logic? I'm not sure. I don't object to having a special case there which *works* ... > > Later in that file nand_read_page_raw() reads > > > > + uint8_t command = NAND_CMD_READ0; > > + int retval; > > + > > + retval = nand_page_command(nand, page, command, !data); > > > > where "command" as a variable looks needless. > > > > Yeah, that's a remnant of me trying to do the above logic outside of the > function. It is needless. I've been backed up recently with some VLSI > layout, so we'll see if I can beat you to cleaning up some of the other > non-applied patches :). I'm not doing it so ... it'll have to be you. ;) _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development