Re: [Openocd-development] If no -expected-id's listed then do not check

2009-09-30 Thread Øyvind Harboe
OK. I'm convinced that we're in pretty good shape now
and that we should let this be until the next crossroads.



-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] If no -expected-id's listed then do not check

2009-09-29 Thread David Brownell
On Tuesday 29 September 2009, Øyvind Harboe wrote:
> If no -expected-id's listed then do not check ID's.

Not really.  First, there's the BYPASS case.  Second,
it isn't "not checking" ... it's just spewing different
noise than came from the message posted earlier today.
(And not what I'd call better noise!)


> The code has not been tested, just posting for comments.

Don't like it... this increases the amount of noise,
and doesn't address the only user-oriented complaint I
had heard:  that there was no way to say "I don't care
about this case, just shut up about it".


> No "0 is wildcard" ref. my "do not override the meaning
> of integers" hobbyhorse.

But it's neither changing any of the longstanding docs saying
that zero is special, nor preventing the parsing code from
accepting such "reserved" values ...

If you're going to get rid of a longstanding special case,
do the whole thing.


Your change was preceded by:


/* ignore expected BYPASS codes; warn otherwise */
if (0 == tap->expected_ids_cnt && !tap->idcode)
return true;

Which is part of the test you added below ...

/* Loop over the expected identification codes and test for a match */


> --- src/jtag/core.c   (revision 2777)
> +++ src/jtag/core.c   (working copy)
> @@ -955,14 +955,19 @@
>
>   /* Loop over the expected identification codes and test for a match */
>   uint8_t ii;
> +
> + if (tap->expected_ids_cnt == 0)
> + {
> + jtag_examine_chain_display(LOG_LVL_WARNING, "NO CHECK",
> + tap->dotted_name, tap->idcode);

This changes a polite, quiet and valid config into
a rude noisy one.


> + /* no id's to match against */
> + return true;
> + }
> +
>   for (ii = 0; ii < tap->expected_ids_cnt; ii++)
>   {
>   if (tap->idcode == tap->expected_ids[ii])
>   return true;
> -
> - /* treat "-expected-id 0" as a "don't-warn" wildcard */
> - if (0 == tap->expected_ids[ii])
> - return true;
>   }
>
>   /* If none of the expected ids matched, warn */

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