Commit 8356894
committed
coresight: tmc: re-implementing tmc_read_prepare/unprepare() functions
In their current implementation the tmc_read_prepare/unprepare()
are a lump of if/else that is difficult to read. This patch is
alleviating that by using a switch statement. The latter also
allows for a better control on the error path.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b1789b793eb4627928f55a6acea8da7c25e5c6b4)1 parent 66c6e11 commit 8356894
1 file changed
Lines changed: 36 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
| 443 | + | |
443 | 444 | | |
444 | | - | |
445 | | - | |
446 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
447 | 448 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 449 | + | |
| 450 | + | |
452 | 451 | | |
453 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
454 | 462 | | |
| 463 | + | |
455 | 464 | | |
456 | 465 | | |
457 | | - | |
458 | | - | |
459 | 466 | | |
460 | | - | |
461 | 467 | | |
462 | 468 | | |
463 | 469 | | |
| |||
472 | 478 | | |
473 | 479 | | |
474 | 480 | | |
475 | | - | |
| 481 | + | |
| 482 | + | |
476 | 483 | | |
477 | | - | |
478 | | - | |
479 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
480 | 487 | | |
481 | | - | |
482 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
483 | 498 | | |
| 499 | + | |
484 | 500 | | |
485 | 501 | | |
486 | | - | |
487 | | - | |
488 | 502 | | |
| 503 | + | |
| 504 | + | |
489 | 505 | | |
490 | 506 | | |
491 | 507 | | |
| |||
0 commit comments