Commit 9a7f4bc
usb: xhci: move debug capabilities from trb_in_td() to handle_tx_event()
Function trb_in_td() currently includes debug capabilities that are
triggered when its debug argument is set to true. The only consumer of
these debug capabilities is handle_tx_event(), which calls trb_in_td()
twice, once for its primary functionality and a second time solely for
debugging purposes if the first call returns 'NULL'.
This approach is inefficient and can lead to confusion, as trb_in_td()
executes the same code with identical arguments twice, differing only in
the debug output during the second execution.
To enhance clarity and efficiency, move the debug capabilities out of
trb_in_td() and integrates them directly into handle_tx_event().
This change reduces the argument count of trb_in_td() and ensures that
debug steps are executed only when necessary, streamlining the function's
operation.
Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20250306144954.3507700-12-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent d71cb7d commit 9a7f4bc
1 file changed
Lines changed: 17 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
| 284 | + | |
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
| |||
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | 303 | | |
314 | 304 | | |
315 | 305 | | |
| |||
1075 | 1065 | | |
1076 | 1066 | | |
1077 | 1067 | | |
1078 | | - | |
| 1068 | + | |
1079 | 1069 | | |
1080 | 1070 | | |
1081 | 1071 | | |
| |||
1165 | 1155 | | |
1166 | 1156 | | |
1167 | 1157 | | |
1168 | | - | |
| 1158 | + | |
1169 | 1159 | | |
1170 | 1160 | | |
1171 | 1161 | | |
| |||
2800 | 2790 | | |
2801 | 2791 | | |
2802 | 2792 | | |
2803 | | - | |
| 2793 | + | |
2804 | 2794 | | |
2805 | 2795 | | |
2806 | 2796 | | |
| |||
2833 | 2823 | | |
2834 | 2824 | | |
2835 | 2825 | | |
2836 | | - | |
| 2826 | + | |
2837 | 2827 | | |
2838 | 2828 | | |
2839 | 2829 | | |
| |||
2893 | 2883 | | |
2894 | 2884 | | |
2895 | 2885 | | |
2896 | | - | |
2897 | | - | |
2898 | | - | |
2899 | | - | |
2900 | | - | |
2901 | | - | |
| 2886 | + | |
2902 | 2887 | | |
2903 | 2888 | | |
2904 | 2889 | | |
| |||
2955 | 2940 | | |
2956 | 2941 | | |
2957 | 2942 | | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
2958 | 2954 | | |
2959 | 2955 | | |
2960 | 2956 | | |
| |||
0 commit comments