Repository navigation
Commit f6195aa
ring-buffer: Place duplicate expression into a single function
While discussing the strictness of the 80 character limit on the
Kernel Summit Discussion mailing list, I showed examples that I
broke that limit slightly with some algorithms. In discussing with
John Linville, what looked better, I realized that two of the
80 char breaking culprits were an identical expression.
As a clean up, this patch moves the identical expression into its
own helper function and that is used instead. As a side effect,
the offending code is now under the 80 character limit. :-)
This clean up code also changes the expression from
(A - B) - C to A - (B + C)
This makes the code look a little nicer too.
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>1 parent c9cf4a0 commit f6195aa
1 file changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2606 | 2606 | | |
2607 | 2607 | | |
2608 | 2608 | | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
2609 | 2622 | | |
2610 | 2623 | | |
2611 | 2624 | | |
| |||
2614 | 2627 | | |
2615 | 2628 | | |
2616 | 2629 | | |
2617 | | - | |
2618 | 2630 | | |
2619 | 2631 | | |
2620 | 2632 | | |
2621 | 2633 | | |
2622 | 2634 | | |
2623 | | - | |
2624 | | - | |
2625 | 2635 | | |
2626 | | - | |
| 2636 | + | |
2627 | 2637 | | |
2628 | 2638 | | |
2629 | 2639 | | |
| |||
2684 | 2694 | | |
2685 | 2695 | | |
2686 | 2696 | | |
2687 | | - | |
2688 | | - | |
| 2697 | + | |
2689 | 2698 | | |
2690 | 2699 | | |
2691 | 2700 | | |
| |||
0 commit comments