diff mbox series

[net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner

Message ID SI2PR04MB50977DA9BB51D9C8FAF6928ADC562@SI2PR04MB5097.apcprd04.prod.outlook.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] bonding: 802.3ad replace MAC_ADDRESS_EQUAL with __agg_has_partner | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 940 this patch: 940
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 5 maintainers not CCed: j.vosburgh@gmail.com pabeni@redhat.com andy@greyhouse.net kuba@kernel.org edumazet@google.com
netdev/build_clang success Errors and warnings before: 957 this patch: 957
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 957 this patch: 957
netdev/checkpatch warning WARNING: From:/Signed-off-by: email name mismatch: 'From: "Jones Syue 薛懷宗" <jonessyue@qnap.com>' != 'Signed-off-by: Jones Syue <jonessyue@qnap.com>'
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-23--03-00 (tests: 1457)

Commit Message

Jones Syue 薛懷宗 Feb. 22, 2024, 9:04 a.m. UTC
They are verifying the same thing: if aggregator has a partner or not.
Replaces macro with inline function would look more clear to understand.

Signed-off-by: Jones Syue <jonessyue@qnap.com>
---
 drivers/net/bonding/bond_3ad.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Jakub Kicinski Feb. 23, 2024, 3:27 a.m. UTC | #1
On Thu, 22 Feb 2024 09:04:36 +0000 Jones Syue 薛懷宗 wrote:
> To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>

You need to CC the maintainers. Please use ./script/get_maintainer.pl
to identify the right recipients and resend the patch.
Jones Syue 薛懷宗 Feb. 23, 2024, 3:54 a.m. UTC | #2
> You need to CC the maintainers. Please use ./script/get_maintainer.pl
> to identify the right recipients and resend the patch.

Thank you for kindly feedback! Sure will resend with correct CC :)

--

Regards,
Jones Syue | 薛懷宗
QNAP Systems, Inc.
Jiri Pirko Feb. 23, 2024, 9:53 a.m. UTC | #3
Fri, Feb 23, 2024 at 04:54:11AM CET, jonessyue@qnap.com wrote:
>> You need to CC the maintainers. Please use ./script/get_maintainer.pl
>> to identify the right recipients and resend the patch.
>
>Thank you for kindly feedback! Sure will resend with correct CC :)

While you are sending next v, please re-phrase the patch desctiption
using imperative mood:

https://www.kernel.org/doc/html/v6.6/process/submitting-patches.html#describe-your-changes


>
>--
>
>Regards,
>Jones Syue | 薛懷宗
>QNAP Systems, Inc.
>
Jones Syue 薛懷宗 Feb. 23, 2024, 2:23 p.m. UTC | #4
> While you are sending next v, please re-phrase the patch desctiption
> using imperative mood:
> https://www.kernel.org/doc/html/v6.6/process/submitting-patches.html#describe-your-changes

Thank you for kindly feedback! Sure will do in next v :)

--

Regards,
Jones Syue | 薛懷宗
QNAP Systems, Inc.
diff mbox series

Patch

diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index f2942e8..eb3c2d1 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2036,9 +2036,7 @@  static void ad_enable_collecting(struct port *port)
  */
 static void ad_disable_distributing(struct port *port, bool *update_slave_arr)
 {
-	if (port->aggregator &&
-	    !MAC_ADDRESS_EQUAL(&port->aggregator->partner_system,
-			       &(null_mac_addr))) {
+	if (port->aggregator && __agg_has_partner(port->aggregator)) {
 		slave_dbg(port->slave->bond->dev, port->slave->dev,
 			  "Disabling distributing on port %d (LAG %d)\n",
 			  port->actor_port_number,
@@ -2078,9 +2076,7 @@  static void ad_enable_collecting_distributing(struct port *port,
 static void ad_disable_collecting_distributing(struct port *port,
 					       bool *update_slave_arr)
 {
-	if (port->aggregator &&
-	    !MAC_ADDRESS_EQUAL(&(port->aggregator->partner_system),
-			       &(null_mac_addr))) {
+	if (port->aggregator && __agg_has_partner(port->aggregator)) {
 		slave_dbg(port->slave->bond->dev, port->slave->dev,
 			  "Disabling port %d (LAG %d)\n",
 			  port->actor_port_number,