[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220716170007.2020037-5-dario.binacchi@amarulasolutions.com>
Date: Sat, 16 Jul 2022 19:00:06 +0200
From: Dario Binacchi <dario.binacchi@...rulasolutions.com>
To: linux-kernel@...r.kernel.org
Cc: Jeroen Hofstee <jhofstee@...tronenergy.com>,
michael@...rulasolutions.com,
Amarula patchwork <linux-amarula@...rulasolutions.com>,
Dario Binacchi <dario.binacchi@...rulasolutions.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jakub Kicinski <kuba@...nel.org>,
Jiri Slaby <jirislaby@...nel.org>,
Marc Kleine-Budde <mkl@...gutronix.de>,
Paolo Abeni <pabeni@...hat.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
Wolfgang Grandegger <wg@...ndegger.com>,
linux-can@...r.kernel.org, netdev@...r.kernel.org
Subject: [RFC PATCH 4/5] can: slcan: use the generic can_change_mtu()
It is useless to define a custom function that does nothing but always
return the same error code. Better to use the generic can_change_mtu()
function.
Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com>
---
drivers/net/can/slcan/slcan-core.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c
index 093d232c13dd..7a1540507ecd 100644
--- a/drivers/net/can/slcan/slcan-core.c
+++ b/drivers/net/can/slcan/slcan-core.c
@@ -727,16 +727,11 @@ static int slcan_netdev_open(struct net_device *dev)
return err;
}
-static int slcan_netdev_change_mtu(struct net_device *dev, int new_mtu)
-{
- return -EINVAL;
-}
-
static const struct net_device_ops slcan_netdev_ops = {
.ndo_open = slcan_netdev_open,
.ndo_stop = slcan_netdev_close,
.ndo_start_xmit = slcan_netdev_xmit,
- .ndo_change_mtu = slcan_netdev_change_mtu,
+ .ndo_change_mtu = can_change_mtu,
};
/******************************************
--
2.32.0
Powered by blists - more mailing lists