Commit e287d64
tty: n_tty: clean up process_output_block()
* Use guard(mutex), which results in:
- the function can return directly when "space == 0".
- "i" can now be "unsigned" as it is no longer abused to hold a retval
from tty->ops->write(). Note the compared-to "nr" is already
"unsigned".
* The end label is now dubbed "do_write" as that is what happens there.
Unlike the uncertain "break_out" name.
Signed-off-by: Jiri Slaby (SUSE) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent fdfa49a commit e287d64
1 file changed
+11
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
523 | | - | |
| 522 | + | |
524 | 523 | | |
525 | 524 | | |
526 | | - | |
| 525 | + | |
527 | 526 | | |
528 | 527 | | |
529 | | - | |
530 | | - | |
| 528 | + | |
531 | 529 | | |
532 | | - | |
| 530 | + | |
533 | 531 | | |
534 | 532 | | |
535 | 533 | | |
| |||
541 | 539 | | |
542 | 540 | | |
543 | 541 | | |
544 | | - | |
| 542 | + | |
545 | 543 | | |
546 | 544 | | |
547 | 545 | | |
548 | 546 | | |
549 | | - | |
| 547 | + | |
550 | 548 | | |
551 | | - | |
| 549 | + | |
552 | 550 | | |
553 | 551 | | |
554 | 552 | | |
555 | | - | |
| 553 | + | |
556 | 554 | | |
557 | 555 | | |
558 | 556 | | |
559 | 557 | | |
560 | 558 | | |
561 | 559 | | |
562 | 560 | | |
563 | | - | |
| 561 | + | |
564 | 562 | | |
565 | 563 | | |
566 | 564 | | |
567 | 565 | | |
568 | 566 | | |
569 | 567 | | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
| 568 | + | |
| 569 | + | |
575 | 570 | | |
576 | 571 | | |
577 | 572 | | |
| |||
0 commit comments