* [PATCH] net: broadcom: Fix return type for implementation of
@ 2022-09-02 7:54 GUO Zihua
2022-09-02 15:35 ` Florian Fainelli
2022-09-03 4:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: GUO Zihua @ 2022-09-02 7:54 UTC (permalink / raw)
To: netdev; +Cc: rafal, bcm-kernel-feedback-list
Since Linux now supports CFI, it will be a good idea to fix mismatched
return type for implementation of hooks. Otherwise this might get
cought out by CFI and cause a panic.
bcm4908_enet_start_xmit() would return either NETDEV_TX_BUSY or
NETDEV_TX_OK, so change the return type to netdev_tx_t directly.
Signed-off-by: GUO Zihua <guozihua@huawei.com>
---
drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c
index c131d8118489..e5e17a182f9d 100644
--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
@@ -507,7 +507,7 @@ static int bcm4908_enet_stop(struct net_device *netdev)
return 0;
}
-static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netdev)
{
struct bcm4908_enet *enet = netdev_priv(netdev);
struct bcm4908_enet_dma_ring *ring = &enet->tx_ring;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: broadcom: Fix return type for implementation of
2022-09-02 7:54 [PATCH] net: broadcom: Fix return type for implementation of GUO Zihua
@ 2022-09-02 15:35 ` Florian Fainelli
2022-09-03 4:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2022-09-02 15:35 UTC (permalink / raw)
To: GUO Zihua, netdev; +Cc: rafal, bcm-kernel-feedback-list
On 9/2/2022 12:54 AM, GUO Zihua wrote:
> Since Linux now supports CFI, it will be a good idea to fix mismatched
> return type for implementation of hooks. Otherwise this might get
> cought out by CFI and cause a panic.
>
> bcm4908_enet_start_xmit() would return either NETDEV_TX_BUSY or
> NETDEV_TX_OK, so change the return type to netdev_tx_t directly.
>
> Signed-off-by: GUO Zihua <guozihua@huawei.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: broadcom: Fix return type for implementation of
2022-09-02 7:54 [PATCH] net: broadcom: Fix return type for implementation of GUO Zihua
2022-09-02 15:35 ` Florian Fainelli
@ 2022-09-03 4:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-03 4:30 UTC (permalink / raw)
To: GUO Zihua; +Cc: netdev, rafal, bcm-kernel-feedback-list
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 2 Sep 2022 15:54:07 +0800 you wrote:
> Since Linux now supports CFI, it will be a good idea to fix mismatched
> return type for implementation of hooks. Otherwise this might get
> cought out by CFI and cause a panic.
>
> bcm4908_enet_start_xmit() would return either NETDEV_TX_BUSY or
> NETDEV_TX_OK, so change the return type to netdev_tx_t directly.
>
> [...]
Here is the summary with links:
- net: broadcom: Fix return type for implementation of
https://git.kernel.org/netdev/net-next/c/12f7bd252221
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-03 4:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 7:54 [PATCH] net: broadcom: Fix return type for implementation of GUO Zihua
2022-09-02 15:35 ` Florian Fainelli
2022-09-03 4:30 ` patchwork-bot+netdevbpf
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.