mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: michael@amarulasolutions.com,
	Amarula patchwork <linux-amarula@amarulasolutions.com>,
	Jeroen Hofstee <jhofstee@victronenergy.com>,
	Oliver Hartkopp <socketcan@hartkopp.net>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Paolo Abeni <pabeni@redhat.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH v2 4/6] can: slcan: use the generic can_change_mtu()
Date: Mon, 25 Jul 2022 08:54:17 +0200	[thread overview]
Message-ID: <20220725065419.3005015-5-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com>

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@amarulasolutions.com>
---

(no changes since v1)

 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 09d4abbbd9f4..919311890d2c 100644
--- a/drivers/net/can/slcan/slcan-core.c
+++ b/drivers/net/can/slcan/slcan-core.c
@@ -740,16 +740,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


  parent reply	other threads:[~2022-07-25  6:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25  6:54 [PATCH v2 0/6] can: slcan: extend supported features (step 2) Dario Binacchi
2022-07-25  6:54 ` [PATCH v2 1/6] can: slcan: remove useless header inclusions Dario Binacchi
2022-07-25  6:54 ` [PATCH v2 2/6] can: slcan: remove legacy infrastructure Dario Binacchi
2022-07-25 12:38   ` Marc Kleine-Budde
2022-07-26 10:11     ` Dario Binacchi
2022-07-26 11:58       ` Marc Kleine-Budde
2022-07-26 12:11         ` Dario Binacchi
2022-07-25  6:54 ` [PATCH v2 3/6] can: slcan: change every `slc' occurrence in `slcan' Dario Binacchi
2022-07-25  6:54 ` Dario Binacchi [this message]
2022-07-25  6:54 ` [PATCH v2 5/6] can: slcan: add support for listen-only mode Dario Binacchi
2022-07-25  6:54 ` [PATCH v2 6/6] MAINTAINERS: Add maintainer for the slcan driver Dario Binacchi
2022-07-25 12:41   ` Marc Kleine-Budde
2022-07-25 13:25 ` [PATCH v2 0/6] can: slcan: extend supported features (step 2) Marc Kleine-Budde
2022-07-26 12:14   ` Dario Binacchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220725065419.3005015-5-dario.binacchi@amarulasolutions.com \
    --to=dario.binacchi@amarulasolutions.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhofstee@victronenergy.com \
    --cc=kuba@kernel.org \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@amarulasolutions.com \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=socketcan@hartkopp.net \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®