* [PATCH net-next] rtase: Refine the if statement
@ 2024-12-06 8:48 Justin Lai
2024-12-06 10:44 ` Michal Swiatkowski
2024-12-08 2:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: Justin Lai @ 2024-12-06 8:48 UTC (permalink / raw)
To: kuba
Cc: davem, edumazet, pabeni, andrew+netdev, linux-kernel, netdev,
horms, michal.kubiak, pkshih, larry.chiu, Justin Lai
Refine the if statement to improve readability.
Signed-off-by: Justin Lai <justinlai0215@realtek.com>
---
drivers/net/ethernet/realtek/rtase/rtase_main.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/realtek/rtase/rtase_main.c b/drivers/net/ethernet/realtek/rtase/rtase_main.c
index 6106aa5333bc..585d0b21c9e0 100644
--- a/drivers/net/ethernet/realtek/rtase/rtase_main.c
+++ b/drivers/net/ethernet/realtek/rtase/rtase_main.c
@@ -2018,7 +2018,7 @@ static int rtase_init_board(struct pci_dev *pdev, struct net_device **dev_out,
SET_NETDEV_DEV(dev, &pdev->dev);
ret = pci_enable_device(pdev);
- if (ret < 0)
+ if (ret)
goto err_out_free_dev;
/* make sure PCI base addr 1 is MMIO */
@@ -2034,7 +2034,7 @@ static int rtase_init_board(struct pci_dev *pdev, struct net_device **dev_out,
}
ret = pci_request_regions(pdev, KBUILD_MODNAME);
- if (ret < 0)
+ if (ret)
goto err_out_disable;
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
@@ -2110,7 +2110,7 @@ static int rtase_init_one(struct pci_dev *pdev,
dev_dbg(&pdev->dev, "Automotive Switch Ethernet driver loaded\n");
ret = rtase_init_board(pdev, &dev, &ioaddr);
- if (ret != 0)
+ if (ret)
return ret;
tp = netdev_priv(dev);
@@ -2120,7 +2120,7 @@ static int rtase_init_one(struct pci_dev *pdev,
/* identify chip attached to board */
ret = rtase_check_mac_version_valid(tp);
- if (ret != 0) {
+ if (ret) {
dev_err(&pdev->dev,
"unknown chip version: 0x%08x, contact rtase maintainers (see MAINTAINERS file)\n",
tp->hw_ver);
@@ -2131,7 +2131,7 @@ static int rtase_init_one(struct pci_dev *pdev,
rtase_init_hardware(tp);
ret = rtase_alloc_interrupt(pdev, tp);
- if (ret < 0) {
+ if (ret) {
dev_err(&pdev->dev, "unable to alloc MSIX/MSI\n");
goto err_out_del_napi;
}
@@ -2176,7 +2176,7 @@ static int rtase_init_one(struct pci_dev *pdev,
netif_carrier_off(dev);
ret = register_netdev(dev);
- if (ret != 0)
+ if (ret)
goto err_out_free_dma;
netdev_dbg(dev, "%pM, IRQ %d\n", dev->dev_addr, dev->irq);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] rtase: Refine the if statement
2024-12-06 8:48 [PATCH net-next] rtase: Refine the if statement Justin Lai
@ 2024-12-06 10:44 ` Michal Swiatkowski
2024-12-06 16:41 ` Jakub Kicinski
2024-12-08 2:50 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 5+ messages in thread
From: Michal Swiatkowski @ 2024-12-06 10:44 UTC (permalink / raw)
To: Justin Lai
Cc: kuba, davem, edumazet, pabeni, andrew+netdev, linux-kernel,
netdev, horms, michal.kubiak, pkshih, larry.chiu
On Fri, Dec 06, 2024 at 04:48:51PM +0800, Justin Lai wrote:
> Refine the if statement to improve readability.
>
> Signed-off-by: Justin Lai <justinlai0215@realtek.com>
> ---
> drivers/net/ethernet/realtek/rtase/rtase_main.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
[...]
I am not sure if it is worth to change. However, looks correct:
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> --
> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] rtase: Refine the if statement
2024-12-06 10:44 ` Michal Swiatkowski
@ 2024-12-06 16:41 ` Jakub Kicinski
2024-12-09 5:42 ` Michal Swiatkowski
0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2024-12-06 16:41 UTC (permalink / raw)
To: Michal Swiatkowski
Cc: Justin Lai, davem, edumazet, pabeni, andrew+netdev, linux-kernel,
netdev, horms, michal.kubiak, pkshih, larry.chiu
On Fri, 6 Dec 2024 11:44:58 +0100 Michal Swiatkowski wrote:
> I am not sure if it is worth to change.
True, tho, FWIW, if it's the maintainer of the codebase sending the
change it's generally fine. Our "no pointless churn" rule is primarily
for randoes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] rtase: Refine the if statement
2024-12-06 8:48 [PATCH net-next] rtase: Refine the if statement Justin Lai
2024-12-06 10:44 ` Michal Swiatkowski
@ 2024-12-08 2:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-08 2:50 UTC (permalink / raw)
To: Justin Lai
Cc: kuba, davem, edumazet, pabeni, andrew+netdev, linux-kernel,
netdev, horms, michal.kubiak, pkshih, larry.chiu
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 6 Dec 2024 16:48:51 +0800 you wrote:
> Refine the if statement to improve readability.
>
> Signed-off-by: Justin Lai <justinlai0215@realtek.com>
> ---
> drivers/net/ethernet/realtek/rtase/rtase_main.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Here is the summary with links:
- [net-next] rtase: Refine the if statement
https://git.kernel.org/netdev/net-next/c/7ea2745766d7
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] 5+ messages in thread
* Re: [PATCH net-next] rtase: Refine the if statement
2024-12-06 16:41 ` Jakub Kicinski
@ 2024-12-09 5:42 ` Michal Swiatkowski
0 siblings, 0 replies; 5+ messages in thread
From: Michal Swiatkowski @ 2024-12-09 5:42 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Justin Lai, davem, edumazet, pabeni, andrew+netdev, linux-kernel,
netdev, horms, michal.kubiak, pkshih, larry.chiu
On Fri, Dec 06, 2024 at 08:41:58AM -0800, Jakub Kicinski wrote:
> On Fri, 6 Dec 2024 11:44:58 +0100 Michal Swiatkowski wrote:
> > I am not sure if it is worth to change.
>
> True, tho, FWIW, if it's the maintainer of the codebase sending the
> change it's generally fine. Our "no pointless churn" rule is primarily
> for randoes.
Sure, thanks for letting me know.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-09 5:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 8:48 [PATCH net-next] rtase: Refine the if statement Justin Lai
2024-12-06 10:44 ` Michal Swiatkowski
2024-12-06 16:41 ` Jakub Kicinski
2024-12-09 5:42 ` Michal Swiatkowski
2024-12-08 2:50 ` patchwork-bot+netdevbpf
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).