From: Sven Eckelmann Date: Sun, 23 Nov 2025 12:23:52 +0000 (+0100) Subject: realtek: Fix block comment style X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=7704e500e5a72e07505ba800ef9c074798f0c6a8;p=openwrt%2Fstaging%2Fxback.git realtek: Fix block comment style In net code, it is preferred to have block comments which * either are one line: `/* ... */` * multiple lines with: - starting with the first comment line directly: `/* ...` - each line is intended with the first asterisk: ` * ...` - the last line is just the end of the comment: ` */` Signed-off-by: Sven Eckelmann Link: https://github.com/openwrt/openwrt/pull/20906 Signed-off-by: Hauke Mehrtens --- diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c index ded16a480e..da57163dda 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c @@ -1349,8 +1349,8 @@ static int rtl83xx_fib_event(struct notifier_block *this, unsigned long event, v memcpy(&fib_work->fen_info, ptr, sizeof(fib_work->fen_info)); /* Take referece on fib_info to prevent it from being - * freed while work is queued. Release it afterwards. - */ + * freed while work is queued. Release it afterwards. + */ fib_info_hold(fib_work->fen_info.fi); } else if (info->family == AF_INET6) { diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/qos.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/qos.c index 3d8a6e9acb..f4255018dd 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/qos.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/qos.c @@ -251,7 +251,8 @@ static void rtl839x_rate_control_init(struct rtl838x_switch_priv *priv) /* Set default burst rates on all ports (the same for 1G / 10G) with a PHY * for UC, MC and BC * For 1G port, the minimum burst rate is 1700, maximum 65535, - * For 10G ports it is 2650 and 1048575 respectively */ + * For 10G ports it is 2650 and 1048575 respectively + */ for (int p = 0; p < priv->cpu_port; p++) { if (priv->ports[p].phy && !priv->ports[p].is10G) { sw_w32_mask(0xffff, 0x8000, RTL839X_STORM_CTRL_PORT_UC_1(p)); diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c index 1d931524b6..343af465e4 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c @@ -511,11 +511,13 @@ static void rtl838x_l2_learning_setup(void) { /* Set portmask for broadcast traffic and unknown unicast address flooding * to the reserved entry in the portmask table used also for - * multicast flooding */ + * multicast flooding + */ sw_w32(UNKNOWN_MC_PMASK << 9 | UNKNOWN_MC_PMASK, RTL838X_L2_FLD_PMSK); /* Enable learning constraint system-wide (bit 0), per-port (bit 1) - * and per vlan (bit 2) */ + * and per vlan (bit 2) + */ sw_w32(0x7, RTL838X_L2_LRN_CONSTRT_EN); /* Limit learning to maximum: 16k entries, after that just flood (bits 0-1) */ @@ -1115,7 +1117,8 @@ static int rtl838x_write_pie_action(u32 r[], struct pie_rule *pr) * they have different precedence depending on their type and this precedence * defines which Action Information Field (0-4) in the IACL table stores * the additional data of the action (like e.g. the port number a packet is - * forwarded to) */ + * forwarded to) + */ /* TODO: count bits in selectors to limit to a maximum number of actions */ if (pr->fwd_sel) { /* Forwarding action */ data = pr->fwd_act << 13; diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h index c8f8d3807b..66885ea6b5 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h @@ -885,7 +885,8 @@ enum egr_filter { /* Intermediate representation of a Packet Inspection Engine Rule * as suggested by the Kernel's tc flower offload subsystem * Field meaning is universal across SoC families, but data content is specific - * to SoC family (e.g. because of different port ranges) */ + * to SoC family (e.g. because of different port ranges) + */ struct pie_rule { int id; enum pie_phase phase; /* Phase in which this template is applied */ diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c index 9a99879844..b578ffbb7e 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c @@ -556,7 +556,8 @@ static void rtl839x_l2_learning_setup(void) { /* Set portmask for broadcast (offset bit 12) and unknown unicast (offset 0) * address flooding to the reserved entry in the portmask table used - * also for multicast flooding */ + * also for multicast flooding + */ sw_w32(UNKNOWN_MC_PMASK << 12 | UNKNOWN_MC_PMASK, RTL839X_L2_FLD_PMSK); /* Limit learning to maximum: 32k entries, after that just flood (bits 0-1) */ diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c index 2ae7b75506..c6b03c81b7 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c @@ -1472,11 +1472,11 @@ static void rtl930x_get_l3_nexthop(int idx, u16 *dmac_id, u16 *interface) // Currently not used -// /* Creates an interface for a route by setting up the HW tables in the SoC +// /* Creates an interface for a route by setting up the HW tables in the SoC */ // static int rtl930x_l3_intf_add(struct rtl838x_switch_priv *priv, struct rtl838x_l3_intf *intf) // { // int i, intf_id, mtu_id; -// /* number of MTU-values < 16384 *\/ +// /* number of MTU-values < 16384 */ // /* Use the same IPv6 mtu as the ip4 mtu for this route if unset */ // intf->ip6_mtu = intf->ip6_mtu ? intf->ip6_mtu : intf->ip4_mtu;