Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net: switchdev: switchdev_handle_fdb_del_to_device(): fix no-op function for disabled CONFIG_NET_SWITCHDEV
@ 2021-07-21 10:15 Marc Kleine-Budde
2021-07-21 10:18 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2021-07-21 10:15 UTC (permalink / raw)
To: netdev; +Cc: kernel, Marc Kleine-Budde, Vladimir Oltean
In patch 8ca07176ab00 ("net: switchdev: introduce a fanout helper for
SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE") new functionality including static
inline no-op functions if CONFIG_NET_SWITCHDEV is disabled was added.
This patch fixes the following build error for disabled
CONFIG_NET_SWITCHDEV:
| In file included from include/net/dsa.h:23,
| from net/core/flow_dissector.c:8:
| include/net/switchdev.h:410:1: error: expected identifier or ‘(’ before ‘{’ token
| 410 | {
| | ^
| include/net/switchdev.h:399:1: warning: ‘switchdev_handle_fdb_del_to_device’ declared ‘static’ but never defined [-Wunused-function]
| 399 | switchdev_handle_fdb_del_to_device(struct net_device *dev,
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 8ca07176ab00 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE")
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
include/net/switchdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index 6f57eb2e89cc..66468ff8cc0a 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -406,7 +406,7 @@ switchdev_handle_fdb_del_to_device(struct net_device *dev,
const struct switchdev_notifier_fdb_info *fdb_info),
int (*lag_del_cb)(struct net_device *dev,
const struct net_device *orig_dev, const void *ctx,
- const struct switchdev_notifier_fdb_info *fdb_info));
+ const struct switchdev_notifier_fdb_info *fdb_info))
{
return 0;
}
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: switchdev: switchdev_handle_fdb_del_to_device(): fix no-op function for disabled CONFIG_NET_SWITCHDEV
2021-07-21 10:15 [PATCH] net: switchdev: switchdev_handle_fdb_del_to_device(): fix no-op function for disabled CONFIG_NET_SWITCHDEV Marc Kleine-Budde
@ 2021-07-21 10:18 ` Marc Kleine-Budde
0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2021-07-21 10:18 UTC (permalink / raw)
To: netdev; +Cc: Vladimir Oltean, kernel
[-- Attachment #1.1: Type: text/plain, Size: 1445 bytes --]
Hello,
On 7/21/21 12:15 PM, Marc Kleine-Budde wrote:
> In patch 8ca07176ab00 ("net: switchdev: introduce a fanout helper for
> SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE") new functionality including static
> inline no-op functions if CONFIG_NET_SWITCHDEV is disabled was added.
>
> This patch fixes the following build error for disabled
> CONFIG_NET_SWITCHDEV:
>
> | In file included from include/net/dsa.h:23,
> | from net/core/flow_dissector.c:8:
> | include/net/switchdev.h:410:1: error: expected identifier or ‘(’ before ‘{’ token
> | 410 | {
> | | ^
> | include/net/switchdev.h:399:1: warning: ‘switchdev_handle_fdb_del_to_device’ declared ‘static’ but never defined [-Wunused-function]
> | 399 | switchdev_handle_fdb_del_to_device(struct net_device *dev,
> | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Fixes: 8ca07176ab00 ("net: switchdev: introduce a fanout helper for SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE")
> Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This patch is for net-next, I've send a v2 with a corrected subject.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-21 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 10:15 [PATCH] net: switchdev: switchdev_handle_fdb_del_to_device(): fix no-op function for disabled CONFIG_NET_SWITCHDEV Marc Kleine-Budde
2021-07-21 10:18 ` Marc Kleine-Budde
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).