realtek: Drop unnecessary newlines
authorSven Eckelmann <[email protected]>
Sun, 23 Nov 2025 16:21:41 +0000 (17:21 +0100)
committerHauke Mehrtens <[email protected]>
Mon, 24 Nov 2025 23:28:51 +0000 (00:28 +0100)
It is recommended in the Linux kernel coding style not to add multiple
newlines after another.

Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <[email protected]>
13 files changed:
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/debugfs.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/qos.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/tc.c
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c

index 90a7d5dc656d9f5197274ea2c04653309455866f..2c36093807b7b82da080d3dd624d3d12fae5f895 100644 (file)
@@ -871,7 +871,6 @@ out_free:
        return NULL;
 }
 
-
 static struct rtl83xx_route *rtl83xx_host_route_alloc(struct rtl838x_switch_priv *priv, u32 ip)
 {
        struct rtl83xx_route *r;
@@ -1693,7 +1692,6 @@ static const struct of_device_id rtl83xx_switch_of_ids[] = {
        { /* sentinel */ }
 };
 
-
 MODULE_DEVICE_TABLE(of, rtl83xx_switch_of_ids);
 
 static struct platform_driver rtl83xx_switch_driver = {
index 2f9df5f3ca35778383515089bbb7973d2a1d84b8..ec64c42528c175d2c1a1cfc54c378d9cd9377180 100644 (file)
@@ -442,7 +442,6 @@ static const struct file_operations port_egress_fops = {
        .write = port_egress_rate_write,
 };
 
-
 static const struct debugfs_reg32 port_ctrl_regs[] = {
        { .name = "port_isolation", .offset = RTL838X_PORT_ISO_CTRL(0), },
        { .name = "mac_force_mode", .offset = RTL838X_MAC_FORCE_MODE_CTRL, },
index 3dc652965156b6c5277433f12bff9383dde4d5e2..d99d4d646bdcd32ae49269ba43351de6eb7713f7 100644 (file)
@@ -421,10 +421,8 @@ const struct rtldsa_mib_desc rtldsa_931x_mib = {
        .list = rtldsa_931x_mib_list
 };
 
-
 /* DSA callbacks */
 
-
 static enum dsa_tag_protocol rtl83xx_get_tag_protocol(struct dsa_switch *ds,
                                                      int port,
                                                      enum dsa_tag_protocol mprot)
@@ -1291,7 +1289,6 @@ static int rtldsa_get_sset_count(struct dsa_switch *ds, int port, int sset)
        return mib_desc->list_count;
 }
 
-
 static void rtldsa_get_eth_phy_stats(struct dsa_switch *ds, int port,
                                     struct ethtool_eth_phy_stats *phy_stats)
 {
@@ -1414,7 +1411,6 @@ static void rtldsa_get_rmon_stats(struct dsa_switch *ds, int port,
                rmon_stats->hist[i] = counters->rx_pkts[i].val;
        }
 
-
        for (int i = 0; i < ARRAY_SIZE(mib_desc->tx_pkts); i++) {
                if (mib_desc->tx_pkts[i].reg == MIB_REG_INVALID)
                        break;
index 31ef9320f22f420bd8aa4b1556f06fe8dcc7f1c1..7a551217f3bbb4777a2c4d5f11817460824ac8a1 100644 (file)
@@ -288,7 +288,6 @@ static void rtl839x_rate_control_init(struct rtl838x_switch_priv *priv)
 }
 
 
-
 static void rtl838x_setup_prio2queue_matrix(int *min_queues)
 {
        u32 v = 0;
index 387d274e398ffc16455dde60677a68f41786214d..7ac04a0d2e915d6c0f6c2784c0514f440009b3d8 100644 (file)
@@ -83,7 +83,6 @@ enum template_field_id {
  */
 #define N_FIXED_TEMPLATES 5
 static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = {
-
        {
          TEMPLATE_FIELD_SPM0, TEMPLATE_FIELD_SPM1, TEMPLATE_FIELD_OTAG,
          TEMPLATE_FIELD_SMAC0, TEMPLATE_FIELD_SMAC1, TEMPLATE_FIELD_SMAC2,
@@ -548,12 +547,10 @@ static void rtl838x_enable_flood(int port, bool enable)
 
 static void rtl838x_enable_mcast_flood(int port, bool enable)
 {
-
 }
 
 static void rtl838x_enable_bcast_flood(int port, bool enable)
 {
-
 }
 
 static void rtl838x_set_static_move_action(int port, bool forward)
index 2edcfd4239e38b4f2bdfd3983f801846121693ed..2303ce26122f9b0e1adf9c0a7cdb10a893c084f3 100644 (file)
@@ -89,7 +89,6 @@ enum template_field_id {
 /* Number of fixed templates predefined in the SoC */
 #define N_FIXED_TEMPLATES 5
 static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = {
-
        {
          TEMPLATE_FIELD_SPM0, TEMPLATE_FIELD_SPM1, TEMPLATE_FIELD_ITAG,
          TEMPLATE_FIELD_SMAC0, TEMPLATE_FIELD_SMAC1, TEMPLATE_FIELD_SMAC2,
@@ -586,12 +585,10 @@ static void rtl839x_enable_flood(int port, bool enable)
 
 static void rtl839x_enable_mcast_flood(int port, bool enable)
 {
-
 }
 
 static void rtl839x_enable_bcast_flood(int port, bool enable)
 {
-
 }
 
 static void rtl839x_set_static_move_action(int port, bool forward)
index ce8e4ff6cd33b9d6134ff8aff719267447422d34..55cf4f32eef05f2ab5b9cb50799d316d2b2f10f3 100644 (file)
@@ -6,7 +6,6 @@
 #include <net/dsa.h>
 #include "rtl838x.h"
 
-
 #define RTL8380_VERSION_A 'A'
 #define RTL8390_VERSION_A 'A'
 #define RTL8380_VERSION_B 'B'
index 4b4896b50dd3a0f55db20b3b807090587601fc6b..42e3601a180ac743098aa8f2897b072ae58c2259 100644 (file)
@@ -96,7 +96,6 @@ enum template_field_id {
 #define N_FIXED_TEMPLATES 5
 /* RTL9300 specific predefined templates */
 static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = {
-
        {
          TEMPLATE_FIELD_DMAC0, TEMPLATE_FIELD_DMAC1, TEMPLATE_FIELD_DMAC2,
          TEMPLATE_FIELD_SMAC0, TEMPLATE_FIELD_SMAC1, TEMPLATE_FIELD_SMAC2,
@@ -1401,7 +1400,6 @@ static void rtl930x_route_write(int idx, struct rtl83xx_route *rt)
        rtl_table_release(r);
 }
 
-
 /* Get the destination MAC and L3 egress interface ID of a nexthop entry from
  * the SoC's L3_NEXTHOP table
  */
@@ -2052,7 +2050,6 @@ static void rtl930x_pie_init(struct rtl838x_switch_priv *priv)
        template_selectors = 2 | (3 << 4);
        for (int i = priv->n_pie_blocks * 3 / 4; i < priv->n_pie_blocks; i++)
                sw_w32(template_selectors, RTL930X_PIE_BLK_TMPLTE_CTRL(i));
-
 }
 
 #ifdef CONFIG_NET_DSA_RTL83XX_RTL930X_L3_OFFLOAD
index 8bcbb3be8c7c677d85ca19f2f69da360aba2c48e..2c2d627fe256a1ce1c3a44f412f19b75d0f3221c 100644 (file)
@@ -82,7 +82,6 @@ enum template_field_id {
 #define N_FIXED_TEMPLATES 5
 /* RTL931x specific predefined templates */
 static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS_RTL931X] = {
-
        {
                TEMPLATE_FIELD_DMAC0, TEMPLATE_FIELD_DMAC1, TEMPLATE_FIELD_DMAC2,
                TEMPLATE_FIELD_SMAC0, TEMPLATE_FIELD_SMAC1, TEMPLATE_FIELD_SMAC2,
@@ -878,7 +877,6 @@ static void rtl931x_write_mcast_pmask(int idx, u64 portmask)
        rtl_table_release(q);
 }
 
-
 static int rtl931x_set_ageing_time(unsigned long msec)
 {
        int t = sw_r32(RTL931X_L2_AGE_CTRL);
@@ -1446,7 +1444,6 @@ static void rtl931x_pie_init(struct rtl838x_switch_priv *priv)
        template_selectors = 2 | (3 << 4);
        for (int i = priv->n_pie_blocks * 3 / 4; i < priv->n_pie_blocks; i++)
                sw_w32(template_selectors, RTL931X_PIE_BLK_TMPLTE_CTRL(i));
-
 }
 
 static void rtl931x_vlan_port_keep_tag_set(int port, bool keep_outer, bool keep_inner)
index 38f4eeb9bdc1fbb1f49bcd3b8211856ffc0e1ba3..118839a31f2d766be89b55adde66b2e81911e2d7 100644 (file)
@@ -356,7 +356,6 @@ static int rtl83xx_setup_tc_cls_flower(struct rtl838x_switch_priv *priv,
        }
 }
 
-
 static int rtl83xx_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
                                     void *cb_priv)
 {
index 055983cf8b02fde0b7ca1959b1463dd9ef7ceb35..771aa43edc2cd28e5f8f8fb92b4ff29a95e5fa0a 100644 (file)
@@ -1077,7 +1077,6 @@ static int rtl838x_eth_tx(struct sk_buff *skb, struct net_device *dev)
 
        /* We can send this packet if CPU owns the descriptor */
        if (!(ring->tx_r[q][ring->c_tx[q]] & 0x1)) {
-
                /* Set descriptor for tx */
                h = &ring->tx_header[q][ring->c_tx[q]];
                h->size = len;
index 76914dc614fa278f86d1457abaf3324b55ddd15e..54de5ff9b046410b08535a9454064c9328605f14 100644 (file)
@@ -374,7 +374,6 @@ inline u32 rtl839x_get_mac_link_spd_sts(int port)
        return (speed & 0x3);
 }
 
-
 inline u32 rtl930x_get_mac_link_spd_sts(int port)
 {
        int r = RTL930X_MAC_LINK_SPD_STS + ((port >> 3) << 2);
index 79a2007db9081240aa2467c510f5081551e59cde..9b18a66c924b1cd204f0f70c464e09501cd1b4a5 100644 (file)
@@ -626,7 +626,6 @@ static void rtpcs_930x_sds_mode_set(struct rtpcs_ctrl *ctrl, int sds,
                rtpcs_930x_sds_submode_set(ctrl, sds, submode);
 }
 
-
 static void rtpcs_930x_sds_tx_config(struct rtpcs_ctrl *ctrl, int sds,
                                     phy_interface_t phy_if)
 {
@@ -1444,7 +1443,6 @@ static void rtpcs_930x_sds_do_rx_calibration_5(struct rtpcs_ctrl *ctrl, u32 sds_
                rtpcs_930x_sds_do_rx_calibration_5_2(ctrl, sds_num);
 }
 
-
 static void rtpcs_930x_sds_do_rx_calibration_dfe_disable(struct rtpcs_ctrl *ctrl, u32 sds_num)
 {
        u32 tap1_list[4] = {0};
@@ -1964,7 +1962,6 @@ static void rtpcs_931x_sds_disable(struct rtpcs_ctrl *ctrl, u32 sds)
 static void rtpcs_931x_sds_symerr_clear(struct rtpcs_ctrl *ctrl, u32 sds,
                                        phy_interface_t mode)
 {
-
        switch (mode) {
        case PHY_INTERFACE_MODE_NA:
                break;
@@ -2027,7 +2024,6 @@ static void rtpcs_931x_sds_fiber_mode_set(struct rtpcs_ctrl *ctrl, u32 sds,
                val = 0x39;
                break; */
 
-
        case PHY_INTERFACE_MODE_USXGMII:
                val = 0x1B;
                break;
@@ -2390,7 +2386,6 @@ static int rtpcs_931x_setup_serdes(struct rtpcs_ctrl *ctrl, int sds,
 
                        rtpcs_sds_write_bits(ctrl, sds, 0x81, 0x1, 7, 4, 0xf);
                        rtpcs_sds_write_bits(ctrl, sds, 0x81, 0x1, 3, 0, 0xf);
-
                }
 
                rtpcs_sds_write_bits(ctrl, sds, 0x40, 0xE, 12, 12, 1);
@@ -2422,7 +2417,6 @@ static int rtpcs_931x_setup_serdes(struct rtpcs_ctrl *ctrl, int sds,
 
                        rtpcs_sds_write_bits(ctrl, sds, 0x6, 0x2, 12, 12, 0);
                } else {
-
                        rtpcs_sds_write_bits(ctrl, sds, 0x2e, 0xd, 6, 0, 0x0);
                        rtpcs_sds_write_bits(ctrl, sds, 0x2e, 0xd, 7, 7, 0x1);