From: Sasha Neftin <sashaneftin@gmail.com>
To: intel-wired-lan@lists.osuosl.org
Cc: Sasha Neftin <sashaneftin@gmail.com>
Subject: [PATCH iwl-next v1 2/2] igc: clean up redundant braces and code formatting
Date: Sun, 8 Nov 2026 16:45:03 +0200 [thread overview]
Message-ID: <20261108144503.97783-2-sashaneftin@gmail.com> (raw)
In-Reply-To: <20261108144503.97783-1-sashaneftin@gmail.com>
Clean up minor coding style issues in the igc driver:
- Remove unnecessary curly braces around single-statement `if` blocks
in `igc_tx_map()` and `igc_enable_nfc_rule()`.
- Fix line-wrapping and indentation for fragment size calculations.
- Remove trailing empty lines/whitespace.
Signed-off-by: Sasha Neftin <sashaneftin@gmail.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 12 +++++-------
drivers/net/ethernet/intel/igc/igc_ptp.c | 1 -
drivers/net/ethernet/intel/igc/igc_tsn.c | 1 -
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 019f0c2375d7..edfa042ed71a 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -1415,9 +1415,8 @@ static int igc_tx_map(struct igc_ring *tx_ring,
/* Make sure there is space in the ring for the next send. */
igc_maybe_stop_tx(tx_ring, DESC_NEEDED);
- if (netif_xmit_stopped(txring_txq(tx_ring)) || !netdev_xmit_more()) {
+ if (netif_xmit_stopped(txring_txq(tx_ring)) || !netdev_xmit_more())
writel(i, tx_ring->tail);
- }
return 0;
dma_error:
@@ -1617,8 +1616,8 @@ static netdev_tx_t igc_xmit_frame_ring(struct sk_buff *skb,
* otherwise try next time
*/
for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
- count += TXD_USE_COUNT(skb_frag_size(
- &skb_shinfo(skb)->frags[f]));
+ count += TXD_USE_COUNT(skb_frag_size(&skb_shinfo(skb)->
+ frags[f]));
if (igc_maybe_stop_tx(tx_ring, count + 5)) {
/* This is a hard error. Write the tail for packets deferred
@@ -2795,7 +2794,7 @@ static struct igc_xdp_buff *xsk_buff_to_igc_ctx(struct xdp_buff *xdp)
* igc_xdp_buff shares its layout with xdp_buff_xsk and private
* igc_xdp_buff fields fall into xdp_buff_xsk->cb
*/
- return (struct igc_xdp_buff *)xdp;
+ return (struct igc_xdp_buff *)xdp;
}
static int igc_clean_rx_irq_zc(struct igc_q_vector *q_vector, const int budget)
@@ -3900,9 +3899,8 @@ static int igc_enable_nfc_rule(struct igc_adapter *adapter,
{
int err;
- if (rule->flex) {
+ if (rule->flex)
return igc_add_flex_filter(adapter, rule);
- }
if (rule->filter.match_flags & IGC_FILTER_FLAG_ETHER_TYPE) {
err = igc_add_etype_filter(adapter, rule->filter.etype,
diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
index b40aba9ab685..fe808ffeaff7 100644
--- a/drivers/net/ethernet/intel/igc/igc_ptp.c
+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
@@ -649,7 +649,6 @@ static void igc_ptp_enable_tx_timestamp(struct igc_adapter *adapter)
set_bit(IGC_RING_FLAG_TX_HWTSTAMP, &tx_ring->flags);
}
-
}
/**
diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
index d23a45a34fa3..0ccba557918d 100644
--- a/drivers/net/ethernet/intel/igc/igc_tsn.c
+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
@@ -243,7 +243,6 @@ static unsigned int igc_tsn_new_flags(struct igc_adapter *adapter)
{
unsigned int new_flags = adapter->flags & ~IGC_FLAG_TSN_ANY_ENABLED;
-
if (adapter->taprio_offload_enable || is_any_launchtime(adapter) ||
adapter->strict_priority_enable)
new_flags |= IGC_FLAG_TSN_QBV_ENABLED;
--
2.47.3
next prev parent reply other threads:[~2026-11-08 14:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 14:45 [PATCH iwl-next v1 1/2] igc: remove unused extended wakeup filter definitions Sasha Neftin
2026-11-08 14:45 ` Sasha Neftin [this message]
2026-11-08 14:52 ` sashiko-bot
2026-11-09 10:40 ` Loktionov, Aleksandr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261108144503.97783-2-sashaneftin@gmail.com \
--to=sashaneftin@gmail.com \
--cc=intel-wired-lan@lists.osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.