From: Jakub Kicinski <kuba@kernel.org>
To: "Álvaro Fernández Rojas" <noltari@gmail.com>
Cc: f.fainelli@gmail.com, jonas.gorski@gmail.com, andrew@lunn.ch,
olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: dsa: b53: mmap: fix device tree support
Date: Wed, 15 Mar 2023 00:06:57 -0700 [thread overview]
Message-ID: <20230315000657.1ab9d9f4@kernel.org> (raw)
In-Reply-To: <20230310121059.4498-1-noltari@gmail.com>
On Fri, 10 Mar 2023 13:10:59 +0100 Álvaro Fernández Rojas wrote:
> diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
> index e968322dfbf0..24ea2e19dfa6 100644
> --- a/drivers/net/dsa/b53/b53_mmap.c
> +++ b/drivers/net/dsa/b53/b53_mmap.c
> @@ -263,7 +263,7 @@ static int b53_mmap_probe_of(struct platform_device *pdev,
> if (of_property_read_u32(of_port, "reg", ®))
> continue;
>
> - if (reg < B53_CPU_PORT)
> + if (reg <= B53_CPU_PORT)
> pdata->enabled_ports |= BIT(reg);
Should we switch to B53_N_PORTS instead?
That's the bound used by the local "for each port" macro:
#define b53_for_each_port(dev, i) \
for (i = 0; i < B53_N_PORTS; i++) \
if (dev->enabled_ports & BIT(i))
next prev parent reply other threads:[~2023-03-15 7:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 12:10 [PATCH] net: dsa: b53: mmap: fix device tree support Álvaro Fernández Rojas
2023-03-15 7:06 ` Jakub Kicinski [this message]
2023-03-15 18:29 ` Florian Fainelli
2023-03-16 17:28 ` [PATCH v2] " Álvaro Fernández Rojas
2023-03-16 17:30 ` Florian Fainelli
2023-03-18 5:00 ` patchwork-bot+netdevbpf
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=20230315000657.1ab9d9f4@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=jonas.gorski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=noltari@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).