From: Simon Horman <simon.horman@corigine.com>
To: MD Danish Anwar <danishanwar@ti.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
Roger Quadros <rogerq@kernel.org>,
Vignesh Raghavendra <vigneshr@ti.com>,
Andrew Lunn <andrew@lunn.ch>,
Richard Cochran <richardcochran@gmail.com>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Rob Herring <robh+dt@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
nm@ti.com, srk@ti.com, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, netdev@vger.kernel.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v11 03/10] net: ti: icssg-prueth: Add Firmware config and classification APIs.
Date: Tue, 25 Jul 2023 09:25:48 +0200 [thread overview]
Message-ID: <ZL94/L1RMlU5TiAb@corigine.com> (raw)
In-Reply-To: <20230724112934.2637802-4-danishanwar@ti.com>
On Mon, Jul 24, 2023 at 04:59:27PM +0530, MD Danish Anwar wrote:
> Add icssg_config.h / .c and icssg_classifier.c files. These are firmware
> configuration and classification related files. These will be used by
> ICSSG ethernet driver.
>
> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Hi Danish,
some feedback from my side.
...
> diff --git a/drivers/net/ethernet/ti/icssg_classifier.c b/drivers/net/ethernet/ti/icssg_classifier.c
...
> +void icssg_class_set_mac_addr(struct regmap *miig_rt, int slice, u8 *mac)
This function appears to be unused.
Perhaps it would be better placed in a later patch?
Or perhaps not, if it makes it hard to split up the patches nicely.
In which case, perhaps the __maybe_unused annotation could be added,
temporarily.
Flagged by clang-16 W=1, and gcc=12 W=1 builds.
Likewise for other issues flagged below regarding
function declarations/definitions.
> +{
> + regmap_write(miig_rt, offs[slice].mac0, (u32)(mac[0] | mac[1] << 8 |
> + mac[2] << 16 | mac[3] << 24));
> + regmap_write(miig_rt, offs[slice].mac1, (u32)(mac[4] | mac[5] << 8));
> +}
> +
> +/* disable all RX traffic */
> +void icssg_class_disable(struct regmap *miig_rt, int slice)
This function is only used in this file.
Please consider making it static.
...
> +void icssg_class_default(struct regmap *miig_rt, int slice, bool allmulti)
This function also appears to be unused.
...
> +/* required for SAV check */
> +void icssg_ft1_set_mac_addr(struct regmap *miig_rt, int slice, u8 *mac_addr)
This function also appears to be unused.
...
> diff --git a/drivers/net/ethernet/ti/icssg_config.c b/drivers/net/ethernet/ti/icssg_config.c
...
> +void icssg_config_ipg(struct prueth_emac *emac)
This function is also only used in this file.
...
> +static void icssg_init_emac_mode(struct prueth *prueth)
> +{
> + /* When the device is configured as a bridge and it is being brought
> + * back to the emac mode, the host mac address has to be set as 0.
> + */
> + u8 mac[ETH_ALEN] = { 0 };
> +
> + if (prueth->emacs_initialized)
> + return;
> +
> + regmap_update_bits(prueth->miig_rt, FDB_GEN_CFG1,
> + SMEM_VLAN_OFFSET_MASK, 0);
> + regmap_write(prueth->miig_rt, FDB_GEN_CFG2, 0);
> + /* Clear host MAC address */
> + icssg_class_set_host_mac_addr(prueth->miig_rt, mac);
icssg_class_set_host_mac_addr() is defined in icssg_classifier.c
but used here in icssg_config.c.
Please consider providing a declaration of this function,
ideally in a .h file.
...
> +int emac_set_port_state(struct prueth_emac *emac,
> + enum icssg_port_state_cmd cmd)
This function also appears to be unused.
...
> +void icssg_config_set_speed(struct prueth_emac *emac)
Ditto.
...
next prev parent reply other threads:[~2023-07-25 7:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 11:29 [PATCH v11 00/10] Introduce ICSSG based ethernet Driver MD Danish Anwar
2023-07-24 11:29 ` [PATCH v11 01/10] net: ti: icssg-prueth: Add Firmware Interface for ICSSG Ethernet driver MD Danish Anwar
2023-07-24 11:29 ` [PATCH v11 02/10] net: ti: icssg-prueth: Add mii helper apis and macros MD Danish Anwar
2023-07-24 11:29 ` [PATCH v11 03/10] net: ti: icssg-prueth: Add Firmware config and classification APIs MD Danish Anwar
2023-07-25 7:25 ` Simon Horman [this message]
2023-07-25 7:40 ` [EXTERNAL] " Md Danish Anwar
2023-07-25 7:44 ` Simon Horman
2023-07-25 7:58 ` [EXTERNAL] " Md Danish Anwar
2023-07-26 7:42 ` Simon Horman
2023-07-26 15:40 ` Jakub Kicinski
2023-07-27 8:54 ` [EXTERNAL] " Anwar, Md Danish
2023-07-27 8:54 ` Anwar, Md Danish
2023-07-24 11:29 ` [PATCH v11 04/10] net: ti: icssg-prueth: Add icssg queues APIs and macros MD Danish Anwar
2023-07-24 11:29 ` [PATCH v11 05/10] dt-bindings: net: Add ICSSG Ethernet MD Danish Anwar
2023-07-24 11:29 ` [PATCH v11 06/10] net: ti: icssg-prueth: Add ICSSG ethernet driver MD Danish Anwar
2023-07-26 4:09 ` Jakub Kicinski
2023-07-26 10:31 ` [EXTERNAL] " Md Danish Anwar
2023-07-26 15:37 ` Jakub Kicinski
2023-07-27 9:12 ` [EXTERNAL] " Anwar, Md Danish
2023-07-27 9:12 ` Anwar, Md Danish
2023-07-24 11:29 ` [PATCH v11 07/10] net: ti: icssg-prueth: Add ICSSG Stats MD Danish Anwar
2023-07-26 3:50 ` Jakub Kicinski
2023-07-26 10:36 ` [EXTERNAL] " Md Danish Anwar
2023-07-26 15:39 ` Jakub Kicinski
2023-07-27 4:51 ` [EXTERNAL] " Anwar, Md Danish
2023-07-27 4:51 ` Anwar, Md Danish
2023-07-24 11:29 ` [PATCH v11 08/10] net: ti: icssg-prueth: Add Standard network staticstics MD Danish Anwar
2023-07-24 11:29 ` [PATCH v11 09/10] net: ti: icssg-prueth: Add ethtool ops for ICSSG Ethernet driver MD Danish Anwar
2023-07-24 11:29 ` [PATCH v11 10/10] net: ti: icssg-prueth: Add Power management support MD Danish Anwar
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=ZL94/L1RMlU5TiAb@corigine.com \
--to=simon.horman@corigine.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=rogerq@kernel.org \
--cc=srk@ti.com \
--cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.