net: axienet: remove unnecessary parentheses
authorRadhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Wed, 31 Jul 2024 09:16:07 +0000 (14:46 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Aug 2024 09:25:22 +0000 (10:25 +0100)
Remove unnecessary parentheses around 'ndev->mtu
<= XAE_JUMBO_MTU' and 'ndev->mtu > XAE_MTU'. Reported
by checkpatch.

CHECK: Unnecessary parentheses around 'ndev->mtu > XAE_MTU'
+       if ((ndev->mtu > XAE_MTU) &&
+           (ndev->mtu <= XAE_JUMBO_MTU)) {

CHECK: Unnecessary parentheses around 'ndev->mtu <= XAE_JUMBO_MTU'
+       if ((ndev->mtu > XAE_MTU) &&
+           (ndev->mtu <= XAE_JUMBO_MTU)) {

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c

index 490d647..ca04c29 100644 (file)
@@ -614,8 +614,7 @@ static int axienet_device_reset(struct net_device *ndev)
        lp->options |= XAE_OPTION_VLAN;
        lp->options &= (~XAE_OPTION_JUMBO);
 
-       if ((ndev->mtu > XAE_MTU) &&
-           (ndev->mtu <= XAE_JUMBO_MTU)) {
+       if (ndev->mtu > XAE_MTU && ndev->mtu <= XAE_JUMBO_MTU) {
                lp->max_frm_size = ndev->mtu + VLAN_ETH_HLEN +
                                        XAE_TRL_SIZE;