Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Michael Bruck
On Mon, May 18, 2009 at 10:56 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: I agree.  I'll get to reviewing the patches in depth tonight and hopefully get them committed. It would be great to have Magnus Lundin's changes committed too, just to keep things in sync... Which ones do you

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Øyvind Harboe
On Mon, May 18, 2009 at 11:12 AM, Michael Bruck mbr...@digenius.de wrote: On Mon, May 18, 2009 at 10:56 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: I agree.  I'll get to reviewing the patches in depth tonight and hopefully get them committed. It would be great to have Magnus Lundin's

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Michael Bruck
On Mon, May 18, 2009 at 11:25 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Mon, May 18, 2009 at 11:12 AM, Michael Bruck mbr...@digenius.de wrote: On Mon, May 18, 2009 at 10:56 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: I agree.  I'll get to reviewing the patches in depth tonight

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Øyvind Harboe
Do we have a time frame for that? Can't Magnus split these changes up into small independent pieces and commit them to the trunk regularly? This way he can update his working tree from the trunk and get my and other's commits without everybody's work stalling until he has finished the whole

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Michael Bruck
On Mon, May 18, 2009 at 1:24 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: Do we have a time frame for that? Can't Magnus split these changes up into small independent pieces and commit them to the trunk regularly? This way he can update his working tree from the trunk and get my and

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Øyvind Harboe
Then why not just copy the current trunk to something like branches/merge-ftd2232-vs-r1809 and then commit the change there so that it can be tested? It's even easier than that :-) jtag.c needs a few tweaks and a bit of testing and it can be committed first without further ado. It just needs

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Øyvind Harboe
If you post patches and vouch for them, then I, or another committer who beats me to it, will commit them promptly. Currently the problem is that there are patches posted, but nobody has time to say anything as to whether they are ready for testing. I think it would be *greatly* helpful if we

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Michael Bruck
On Mon, May 18, 2009 at 3:28 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: If you post patches and vouch for them, then I, or another committer who beats me to it, will commit them promptly. Currently the problem is that there are patches posted, but nobody has time to say anything as to

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Øyvind Harboe
I broke it down as small as possible. The change is trivial. I tested it here as far as possible. I can't test *all* of the functions as my target doesn't use them, but again, the rewrite is absolutely trivial. Did Rick want something *else* or something *more*? If he wanted something *more*

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Michael Bruck
On Mon, May 18, 2009 at 3:53 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: I broke it down as small as possible. The change is trivial. I tested it here as far as possible. I can't test *all* of the functions as my target doesn't use them, but again, the rewrite is absolutely trivial. Did

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-18 Thread Rick Altherr
On May 17, 2009, at 1:51 AM, Michael Bruck wrote: The code in jtag.c currently manipulates the command queue pointers directly in every function. This increases potential for errors and makes the code less readable by distracting the reader from the core algorithm contained in every function.

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-17 Thread David Brownell
On Sunday 17 May 2009, Michael Bruck wrote: -   jtag_command_t **last_cmd; -   last_cmd = jtag_get_last_command_p(); - -   *last_cmd = cmd_queue_alloc(sizeof(jtag_command_t)); -   (*last_cmd)-next = NULL; -   last_comand_pointer = ((*last_cmd)-next); -   

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-17 Thread Rick Altherr
On May 17, 2009, at 1:43 PM, David Brownell wrote: On Sunday 17 May 2009, Michael Bruck wrote: - jtag_command_t **last_cmd; - last_cmd = jtag_get_last_command_p(); - - *last_cmd = cmd_queue_alloc(sizeof(jtag_command_t)); - (*last_cmd)-next = NULL; -

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-17 Thread David Brownell
On Sunday 17 May 2009, Rick Altherr wrote: Rather than combine them, I'd like to see jtag_queue_command() enforce   validation of the command to be enqueued.  Then the patterns would be: cmd = cmd_queue_alloc(); cmd-type = JTAG_SCAN; Then how about passing JTAG_* to the allocator?

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-17 Thread Michael Bruck
On Sun, May 17, 2009 at 10:54 PM, Rick Altherr kc8...@kc8apf.net wrote: On May 17, 2009, at 1:43 PM, David Brownell wrote: On Sunday 17 May 2009, Michael Bruck wrote: -       jtag_command_t **last_cmd; -       last_cmd = jtag_get_last_command_p(); - -       *last_cmd =

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-17 Thread Michael Bruck
On Sun, May 17, 2009 at 11:15 PM, David Brownell davi...@pacbell.net wrote: On Sunday 17 May 2009, Rick Altherr wrote: Rather than combine them, I'd like to see jtag_queue_command() enforce validation of the command to be enqueued.  Then the patterns would be: cmd = cmd_queue_alloc();

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-17 Thread David Brownell
On Sunday 17 May 2009, Michael Bruck wrote: I did not primarily want to compact code but separate layers. The function wraps the queue manipulation. The data structure initialization itself is much more code than just the type field so I don't like the idea of tearing it apart. I understand.

Re: [Openocd-development] [PATCH] insulate queue pointer manipulation from general jtag.c code

2009-05-17 Thread Rick Altherr
On May 17, 2009, at 2:17 PM, Michael Bruck wrote: ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development Rather than combine them, I'd like to see