Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: mmyangfl@gmail.com
Cc: netdev@vger.kernel.org, andrew@lunn.ch, olteanv@gmail.com,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com
Subject: Re: [PATCH net-next v2 2/5] net: dsa: motorcomm: Cache port isolation masks
Date: Mon, 30 Nov 2026 12:25:54 +0000	[thread overview]
Message-ID: <179604155444.3146.15503517660024089754@kernel.org> (raw)
In-Reply-To: <20261129115556.1669188-3-mmyangfl@gmail.com>

Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] This patch adds `isolation_mask` to `struct yt921x_port`
  (drivers/net/dsa/motorcomm/chip.h) and sets it in four places in…

--

net: dsa: motorcomm: Cache port isolation masks

This commit adds an isolation_mask field to struct yt921x_port. It keeps
a software copy of each port's YT921X_PORTn_ISOLATION register, updated
after each successful register write.

[ ... ]

> diff --git a/drivers/net/dsa/motorcomm/chip.h b/drivers/net/dsa/motorcomm/chip.h
> index d5ed580f8a78e..39b7721cff402 100644
> --- a/drivers/net/dsa/motorcomm/chip.h
> +++ b/drivers/net/dsa/motorcomm/chip.h
> @@ -464,6 +464,8 @@ struct yt921x_port {
>
>  	unsigned short acl_cnt;
>
> +	u16 isolation_mask;
> +

[Severity: Low]
This isn't a bug, but nothing reads isolation_mask at this commit. Only
these functions write it:

  yt921x_userport_standalone()
  yt921x_isolate()
  yt921x_bridge()
  yt921x_port_setup()

The commit message only says:

  Keep a software copy of PORTn_ISOLATION values for future use.

The code that reads it seems to come later in the series. It is in the
redirect handling in drivers/net/dsa/motorcomm/tc.c, added by "net: dsa:
motorcomm: Reject isolated redirect targets" and "net: dsa: motorcomm:
Recompute redirect rules on bridge changes".

Could the commit message say which later patches use the cache?

>  #if IS_ENABLED(CONFIG_NET_DSA_YT921X_LEDS)
>  	unsigned char led_duty;
>  	unsigned short led_cycle;

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261129115556.1669188-1-mmyangfl%40gmail.com

  reply	other threads:[~2026-11-30 12:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 11:55 [PATCH net-next v2 0/5] net: dsa: motorcomm: Reject isolated redirect targets David Yang
2026-11-29 11:55 ` [PATCH net-next v2 1/5] net: dsa: motorcomm: Remove local cpu_ports_mask David Yang
2026-11-29 11:55 ` [PATCH net-next v2 2/5] net: dsa: motorcomm: Cache port isolation masks David Yang
2026-11-30 12:25   ` netdev-bot+sashiko [this message]
2026-11-29 11:55 ` [PATCH net-next v2 3/5] net: dsa: motorcomm: Reject isolated redirect targets David Yang
2026-11-30 12:25   ` netdev-bot+sashiko
2026-11-29 11:55 ` [PATCH net-next v2 4/5] net: dsa: motorcomm: Recompute redirect rules on bridge changes David Yang
2026-11-30 12:25   ` netdev-bot+sashiko
2026-11-29 11:55 ` [PATCH net-next v2 5/5] net: dsa: motorcomm: Reject bridge flags that break redirect rules David Yang
2026-11-30 12:25   ` netdev-bot+sashiko

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=179604155444.3146.15503517660024089754@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox