Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp288985imn; Thu, 28 Jul 2022 00:06:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tw5zTgkvWo5MBigDl260gqAgS+Zm1RzmK18ccnjCz9wUns36XU6ul8cDSj6lxJRfAeWmo3 X-Received: by 2002:a17:902:c948:b0:16d:c0ae:accc with SMTP id i8-20020a170902c94800b0016dc0aeacccmr2892555pla.168.1658991991587; Thu, 28 Jul 2022 00:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658991991; cv=none; d=google.com; s=arc-20160816; b=m6Bex2M3SH7Dq3yCaNsONWgMzn0mWFNw8H3eMsfmz+z/y0Q3q2WnVYV0TTarDg5nxZ zsAzBCnUfhUU6GqmwtdP04IA6ewR6u6zQ9eGGwJPbBJ9QfXlwDEtjLOL6MHhT7yCYGnG cMtXC7ZrRHCnVnJG9aDBH0skNnar7UF/Xf79rmM/zRGmqC2SvRns0We8Y1p6pt48pw4t iXJhtQs2I/fskXu/1qS+pFtsPlyqi3Zpg3asJEHZlPNmHL6MjcHidGlmAGu0MOQsbwsA BwlzXQsN7t0VTVosagxKQWQF+uRY+/WvvdIF490XUNh5+xkVQtaFu5heSVZZafnAXIci edug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aNGQLRTnPxlP6A96D7J1ivHff8xTlXOO4TAacZru318=; b=eDIGii6ZD3k/HHme/eug18KNEOvSstk78EeaceHRl85y/KZ9NLsf0XzGyEb5m5LN7E FwaD0xn/wVDTEmH/MhqxclZ84x2Hk4BIyuP70Y4fVL0b12y5+1/lAkLUbopQyEwjrayS BH3rNeEdlwJOPT4m+I4UacqnSICtCy7LcgTiFr0JZybF9kei+Ci0nJLYwn30+gu+edBX ZOSGj3C/9D+QYh78EM92IGXAuVZ6IUN2qwTTlGyXg+QY48Nh8KQFHPTL7vogapp0B7m6 gFxqUKIDOPFHEaAL/r0AV/V2Q5cG1GhQ5Y6+BTjjTl/AKqb2P24s0HCwIaLlJw+qerT0 3m1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NixWIxUe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020a17090a8d0e00b001f2503c248fsi4443334pjo.14.2022.07.28.00.06.15; Thu, 28 Jul 2022 00:06:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NixWIxUe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234654AbiG1HDm (ORCPT + 99 others); Thu, 28 Jul 2022 03:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234201AbiG1HDP (ORCPT ); Thu, 28 Jul 2022 03:03:15 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65EE65F9A9 for ; Thu, 28 Jul 2022 00:03:12 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id f15so1011454edc.4 for ; Thu, 28 Jul 2022 00:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aNGQLRTnPxlP6A96D7J1ivHff8xTlXOO4TAacZru318=; b=NixWIxUerULCg3FM+cnzFFOF13OA6uqtP9jW5CJygFwUBq6CkojjWu3Ex8IMlgKxPg e47d34vcuwDsFDJm3JWApkUUIPvEBe5EKLPqbtsImbdiBwY9Lf5/JidqqrNnDg6LR1XH Se0Mlb3kDA68wzj4aX6IKP8edThjDkhrYgsoI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aNGQLRTnPxlP6A96D7J1ivHff8xTlXOO4TAacZru318=; b=aVTA/3I/2QPiamAT8K+yKjpRBrr6x4x0av4azaIE5RQxZjVWs0LdtqzQwmjb1dngIS Mu2CmulI7e7CEIL359kEtK2tAc7DCDfvBHydUuyWW5ab5TjeyUP9vSBxK9BDRL5Im01B TOa/LOedJFYC3YrGwtVGZewjcoiGq+vNnlPEZgxecrboTLJLp8KrDNIDoJ4pOg5Gsm6W TXIv/A0r4Tv+dF1hSbGSrYvG68HyBTw8wNowvt0jO+0j2xYNwf+MMN7ZvBLQ8Wu/lXQS uaVNXZ6E0g/jWUwQbpyYAZ/W+X7LfCXoxdWoxQfKCDE7K6svEjMd1KT2mxMxXV2PkqkM eGJw== X-Gm-Message-State: AJIora/MrRS3rpoX8Fsf5YUQBfUnFAAah9mhsscqIbtxFUGjJfuxBxLc Ur7uymbat7X5tSnORCgGAzRDo6XYyOH+kw== X-Received: by 2002:a05:6402:2b88:b0:43a:6c58:6c64 with SMTP id fj8-20020a0564022b8800b0043a6c586c64mr27065401edb.348.1658991790073; Thu, 28 Jul 2022 00:03:10 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id r18-20020aa7d152000000b0042de3d661d2sm154742edo.1.2022.07.28.00.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 00:03:09 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-can@vger.kernel.org, Marc Kleine-Budde , Jeroen Hofstee , michael@amarulasolutions.com, Amarula patchwork , Oliver Hartkopp , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wolfgang Grandegger , netdev@vger.kernel.org Subject: [PATCH v4 5/7] can: slcan: use the generic can_change_mtu() Date: Thu, 28 Jul 2022 09:02:52 +0200 Message-Id: <20220728070254.267974-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220728070254.267974-1-dario.binacchi@amarulasolutions.com> References: <20220728070254.267974-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- (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 bd8e84ded051..d12d98426f37 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -742,16 +742,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