Messages in this thread | | | Date | Tue, 30 Apr 2024 09:46:11 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH net-next v2] net: ti: icssg_prueth: Add SW TX / RX Coalescing based on hrtimers |
| |
On Mon, Apr 29, 2024 at 07:30:34PM +0100, Simon Horman wrote: > > - num_tx_packets = emac_tx_complete_packets(emac, tx_chn->id, budget); > > + num_tx_packets = emac_tx_complete_packets(emac, tx_chn->id, budget, > > + &tdown); > > > > if (num_tx_packets >= budget) > > return budget; > > > > - if (napi_complete_done(napi_tx, num_tx_packets)) > > - enable_irq(tx_chn->irq); > > + if (napi_complete_done(napi_tx, num_tx_packets)) { > > + if (unlikely(tx_chn->tx_pace_timeout_ns && !tdown)) { > > + hrtimer_start(&tx_chn->tx_hrtimer, > > + ns_to_ktime(tx_chn->tx_pace_timeout_ns), > > + HRTIMER_MODE_REL_PINNED); > > + } else { > > + enable_irq(tx_chn->irq); > > + } > > This compiles with gcc-13 and clang-18 W=1 > (although the inner {} are unnecessary). >
A lot of people have the rule that multi line indents get curly braces even when they're not required. I feel like it does help readability.
regards, dan carpenter
| |