Attention is currently required from: Felix Singer, Edward O'Callaghan.
Patch set 1:Code-Review +2
1 comment:
File rayer_spi.c:
if (prog_type) {
for (; prog->type != NULL; prog++) {
if (strcasecmp(prog_type, prog->type) == 0) {
break;
}
}
free(prog_type);
if (prog->type == NULL) {
msg_perr("Error: Invalid device type specified.\n");
return 1;
}
}
No, actually I didn't push CB:68238 before which made it unclear what I was thinking. However the idea here was to deconflate the parameter parse logic from the programmer type lookup logic into their own respective functions. This makes the init entry-point more linear in its control flow without all the resource management getting in the way. Hopefully the thinking is a little more clear with CB:68238 push please do let me know if not.
Just took a look at CB:68238 and it makes sense, it's similar to what CB:67906 and CB:67908 try to achieve for ft2232_spi. The only thing is that parameter parsing could be encapsulated a bit more. We commented on CB:68238 with more concrete implementation details.
Actually... We just made CB:68239 to show exactly what we're thinking of. Feel free to integrate it into CB:68238 or keep it as a separate commit.
See CB:68238 for discussion.
To view, visit change 68230. To unsubscribe, or for help writing mail filters, visit settings.