realtek: Drop unnecessary newlines

It is recommended in the Linux kernel coding style not to add multiple
newlines after another.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Sven Eckelmann 2025-11-23 17:21:41 +01:00 committed by Hauke Mehrtens
parent 583807806c
commit 4bd1cb66df
13 changed files with 0 additions and 30 deletions

View File

@ -871,7 +871,6 @@ out_free:
return NULL; return NULL;
} }
static struct rtl83xx_route *rtl83xx_host_route_alloc(struct rtl838x_switch_priv *priv, u32 ip) static struct rtl83xx_route *rtl83xx_host_route_alloc(struct rtl838x_switch_priv *priv, u32 ip)
{ {
struct rtl83xx_route *r; struct rtl83xx_route *r;
@ -1693,7 +1692,6 @@ static const struct of_device_id rtl83xx_switch_of_ids[] = {
{ /* sentinel */ } { /* sentinel */ }
}; };
MODULE_DEVICE_TABLE(of, rtl83xx_switch_of_ids); MODULE_DEVICE_TABLE(of, rtl83xx_switch_of_ids);
static struct platform_driver rtl83xx_switch_driver = { static struct platform_driver rtl83xx_switch_driver = {

View File

@ -442,7 +442,6 @@ static const struct file_operations port_egress_fops = {
.write = port_egress_rate_write, .write = port_egress_rate_write,
}; };
static const struct debugfs_reg32 port_ctrl_regs[] = { static const struct debugfs_reg32 port_ctrl_regs[] = {
{ .name = "port_isolation", .offset = RTL838X_PORT_ISO_CTRL(0), }, { .name = "port_isolation", .offset = RTL838X_PORT_ISO_CTRL(0), },
{ .name = "mac_force_mode", .offset = RTL838X_MAC_FORCE_MODE_CTRL, }, { .name = "mac_force_mode", .offset = RTL838X_MAC_FORCE_MODE_CTRL, },

View File

@ -421,10 +421,8 @@ const struct rtldsa_mib_desc rtldsa_931x_mib = {
.list = rtldsa_931x_mib_list .list = rtldsa_931x_mib_list
}; };
/* DSA callbacks */ /* DSA callbacks */
static enum dsa_tag_protocol rtl83xx_get_tag_protocol(struct dsa_switch *ds, static enum dsa_tag_protocol rtl83xx_get_tag_protocol(struct dsa_switch *ds,
int port, int port,
enum dsa_tag_protocol mprot) 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; return mib_desc->list_count;
} }
static void rtldsa_get_eth_phy_stats(struct dsa_switch *ds, int port, static void rtldsa_get_eth_phy_stats(struct dsa_switch *ds, int port,
struct ethtool_eth_phy_stats *phy_stats) 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; rmon_stats->hist[i] = counters->rx_pkts[i].val;
} }
for (int i = 0; i < ARRAY_SIZE(mib_desc->tx_pkts); i++) { for (int i = 0; i < ARRAY_SIZE(mib_desc->tx_pkts); i++) {
if (mib_desc->tx_pkts[i].reg == MIB_REG_INVALID) if (mib_desc->tx_pkts[i].reg == MIB_REG_INVALID)
break; break;

View 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) static void rtl838x_setup_prio2queue_matrix(int *min_queues)
{ {
u32 v = 0; u32 v = 0;

View File

@ -83,7 +83,6 @@ enum template_field_id {
*/ */
#define N_FIXED_TEMPLATES 5 #define N_FIXED_TEMPLATES 5
static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = { static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = {
{ {
TEMPLATE_FIELD_SPM0, TEMPLATE_FIELD_SPM1, TEMPLATE_FIELD_OTAG, TEMPLATE_FIELD_SPM0, TEMPLATE_FIELD_SPM1, TEMPLATE_FIELD_OTAG,
TEMPLATE_FIELD_SMAC0, TEMPLATE_FIELD_SMAC1, TEMPLATE_FIELD_SMAC2, 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_mcast_flood(int port, bool enable)
{ {
} }
static void rtl838x_enable_bcast_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) static void rtl838x_set_static_move_action(int port, bool forward)

View File

@ -89,7 +89,6 @@ enum template_field_id {
/* Number of fixed templates predefined in the SoC */ /* Number of fixed templates predefined in the SoC */
#define N_FIXED_TEMPLATES 5 #define N_FIXED_TEMPLATES 5
static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = { static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = {
{ {
TEMPLATE_FIELD_SPM0, TEMPLATE_FIELD_SPM1, TEMPLATE_FIELD_ITAG, TEMPLATE_FIELD_SPM0, TEMPLATE_FIELD_SPM1, TEMPLATE_FIELD_ITAG,
TEMPLATE_FIELD_SMAC0, TEMPLATE_FIELD_SMAC1, TEMPLATE_FIELD_SMAC2, 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_mcast_flood(int port, bool enable)
{ {
} }
static void rtl839x_enable_bcast_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) static void rtl839x_set_static_move_action(int port, bool forward)

View File

@ -6,7 +6,6 @@
#include <net/dsa.h> #include <net/dsa.h>
#include "rtl838x.h" #include "rtl838x.h"
#define RTL8380_VERSION_A 'A' #define RTL8380_VERSION_A 'A'
#define RTL8390_VERSION_A 'A' #define RTL8390_VERSION_A 'A'
#define RTL8380_VERSION_B 'B' #define RTL8380_VERSION_B 'B'

View File

@ -96,7 +96,6 @@ enum template_field_id {
#define N_FIXED_TEMPLATES 5 #define N_FIXED_TEMPLATES 5
/* RTL9300 specific predefined templates */ /* RTL9300 specific predefined templates */
static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = { static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS] = {
{ {
TEMPLATE_FIELD_DMAC0, TEMPLATE_FIELD_DMAC1, TEMPLATE_FIELD_DMAC2, TEMPLATE_FIELD_DMAC0, TEMPLATE_FIELD_DMAC1, TEMPLATE_FIELD_DMAC2,
TEMPLATE_FIELD_SMAC0, TEMPLATE_FIELD_SMAC1, TEMPLATE_FIELD_SMAC2, 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); rtl_table_release(r);
} }
/* Get the destination MAC and L3 egress interface ID of a nexthop entry from /* Get the destination MAC and L3 egress interface ID of a nexthop entry from
* the SoC's L3_NEXTHOP table * 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); template_selectors = 2 | (3 << 4);
for (int i = priv->n_pie_blocks * 3 / 4; i < priv->n_pie_blocks; i++) 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)); sw_w32(template_selectors, RTL930X_PIE_BLK_TMPLTE_CTRL(i));
} }
#ifdef CONFIG_NET_DSA_RTL83XX_RTL930X_L3_OFFLOAD #ifdef CONFIG_NET_DSA_RTL83XX_RTL930X_L3_OFFLOAD

View File

@ -82,7 +82,6 @@ enum template_field_id {
#define N_FIXED_TEMPLATES 5 #define N_FIXED_TEMPLATES 5
/* RTL931x specific predefined templates */ /* RTL931x specific predefined templates */
static enum template_field_id fixed_templates[N_FIXED_TEMPLATES][N_FIXED_FIELDS_RTL931X] = { 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_DMAC0, TEMPLATE_FIELD_DMAC1, TEMPLATE_FIELD_DMAC2,
TEMPLATE_FIELD_SMAC0, TEMPLATE_FIELD_SMAC1, TEMPLATE_FIELD_SMAC2, 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); rtl_table_release(q);
} }
static int rtl931x_set_ageing_time(unsigned long msec) static int rtl931x_set_ageing_time(unsigned long msec)
{ {
int t = sw_r32(RTL931X_L2_AGE_CTRL); 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); template_selectors = 2 | (3 << 4);
for (int i = priv->n_pie_blocks * 3 / 4; i < priv->n_pie_blocks; i++) 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)); 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) static void rtl931x_vlan_port_keep_tag_set(int port, bool keep_outer, bool keep_inner)

View 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, static int rtl83xx_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
void *cb_priv) void *cb_priv)
{ {

View 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 */ /* We can send this packet if CPU owns the descriptor */
if (!(ring->tx_r[q][ring->c_tx[q]] & 0x1)) { if (!(ring->tx_r[q][ring->c_tx[q]] & 0x1)) {
/* Set descriptor for tx */ /* Set descriptor for tx */
h = &ring->tx_header[q][ring->c_tx[q]]; h = &ring->tx_header[q][ring->c_tx[q]];
h->size = len; h->size = len;

View File

@ -374,7 +374,6 @@ inline u32 rtl839x_get_mac_link_spd_sts(int port)
return (speed & 0x3); return (speed & 0x3);
} }
inline u32 rtl930x_get_mac_link_spd_sts(int port) inline u32 rtl930x_get_mac_link_spd_sts(int port)
{ {
int r = RTL930X_MAC_LINK_SPD_STS + ((port >> 3) << 2); int r = RTL930X_MAC_LINK_SPD_STS + ((port >> 3) << 2);

View 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); rtpcs_930x_sds_submode_set(ctrl, sds, submode);
} }
static void rtpcs_930x_sds_tx_config(struct rtpcs_ctrl *ctrl, int sds, static void rtpcs_930x_sds_tx_config(struct rtpcs_ctrl *ctrl, int sds,
phy_interface_t phy_if) 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); 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) static void rtpcs_930x_sds_do_rx_calibration_dfe_disable(struct rtpcs_ctrl *ctrl, u32 sds_num)
{ {
u32 tap1_list[4] = {0}; 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, static void rtpcs_931x_sds_symerr_clear(struct rtpcs_ctrl *ctrl, u32 sds,
phy_interface_t mode) phy_interface_t mode)
{ {
switch (mode) { switch (mode) {
case PHY_INTERFACE_MODE_NA: case PHY_INTERFACE_MODE_NA:
break; break;
@ -2027,7 +2024,6 @@ static void rtpcs_931x_sds_fiber_mode_set(struct rtpcs_ctrl *ctrl, u32 sds,
val = 0x39; val = 0x39;
break; */ break; */
case PHY_INTERFACE_MODE_USXGMII: case PHY_INTERFACE_MODE_USXGMII:
val = 0x1B; val = 0x1B;
break; 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, 7, 4, 0xf);
rtpcs_sds_write_bits(ctrl, sds, 0x81, 0x1, 3, 0, 0xf); rtpcs_sds_write_bits(ctrl, sds, 0x81, 0x1, 3, 0, 0xf);
} }
rtpcs_sds_write_bits(ctrl, sds, 0x40, 0xE, 12, 12, 1); 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); rtpcs_sds_write_bits(ctrl, sds, 0x6, 0x2, 12, 12, 0);
} else { } else {
rtpcs_sds_write_bits(ctrl, sds, 0x2e, 0xd, 6, 0, 0x0); rtpcs_sds_write_bits(ctrl, sds, 0x2e, 0xd, 6, 0, 0x0);
rtpcs_sds_write_bits(ctrl, sds, 0x2e, 0xd, 7, 7, 0x1); rtpcs_sds_write_bits(ctrl, sds, 0x2e, 0xd, 7, 7, 0x1);