From patchwork Tue Jul 26 21:02:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2256 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id BAD6C3F081 for ; Tue, 26 Jul 2022 23:03:31 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id v9-20020a056402348900b0043bcd680e50sf8019817edc.18 for ; Tue, 26 Jul 2022 14:03:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658869411; cv=pass; d=google.com; s=arc-20160816; b=mCvvJucOefd7VpQYFFIngRS6I+AKeDnpOwwBvsk7/ozybMt7RbcWP4pglekv45tcaw pTbg/k1HhY3GUFgaRtjsD1WobJfEzsULb3g6q/xLKuFogSCy/2taBJzwk/fBexfetHxC xweW+HHt/Z44JVeyelFVlQdjpO8ipgG8jOpcmUNTgfrrUHBJMc+Okv95AJ61ZP8GPTG5 0PzmfP3DZFCSIEOZsd0W1vyUfUYocRrM4vNUzaH30YXPZScjztPYAwRE4uY94OVrwItj se+VrryqzRitcALHkXIdKCpTbOwFj5/MKQuv4mwFWCmDPfmwbA/u0hrJEyP3pC4UBvlG N4qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=dFdb06VZCuWHvIOKJPwhd1ruGc7GT0RTyPL3NI0kd38=; b=VfPQW+yQ4kJe9PzBaTpUZyYVZ5WufKyhpf2vMx7YJ7/3vSxU74gH0zhk9i6AxbgiW6 Q3NKcD7Kcqj6EHZaNa/SYqZfX2gEURlwJaAD+SCl2zdG7aqUxsG1pIVeMZIVfC9DaaoX jMUUHUS4vVK/J2g5P3TB2OR90AbvrJllMnkp2d9epL3/0DzrFOZDtJcxgelwu+js/sY7 LJywWyWgUNuu4P0sfJeKGzcDbTLFR6cHwm9uskJ7QSeFjQcaEnUh36iIxgdNoaBobVwk CAdcrdS9xfR6KSi54NZmys5r9E0rkcdQTeE18NIM5Jczqr//nyGGDkxHPCLdD71lk/Z6 YlSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KECnBmgq; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=dFdb06VZCuWHvIOKJPwhd1ruGc7GT0RTyPL3NI0kd38=; b=O9tBf7veIjjq/mrPMIhlM+d3D5z5ckgDlVz/179r25kfWidTyToBGpzQgS75S25qgx Z85IFDefvI20kuSOuZUAA4R8gbv+EVReoNfWX7+bKOLQttiHnjFYJn5+cXByo+jGxXDm GFSBrXw5iIlbfiOBdTNNvFjxQ3DcCXcoUWp7E= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=dFdb06VZCuWHvIOKJPwhd1ruGc7GT0RTyPL3NI0kd38=; b=VX97a0beT/ntF8sPAoQ0mvzTwE4sd5mKHRkodGZVgz0fvo+aHpY7h2KimlMoI7qZ41 d0dPEYFKMVGLFCnfEFUJnoFoUWM7RvljP1bM7mEtxXNan01S1GYN0JrDkJaQq0vFiNgZ FAPMRyPdoRh/5geFXq1yCv7TIivK69AMOzWPHCt0uWrorv+wRcwN85OeI2Y2FyurQXIb 4fW5bvvPRdN99IR5A/wNm65aUpiR+nOyQrFE6CAE0dRVnkMRKkNKnL/GaeYjAFo4CYz7 koFOoCPMpFQZpGNK51ZeP9vkYNKcs13zgxFsY89NTUzllHClC0nW/8tKazui9c+WWTu6 ou9A== X-Gm-Message-State: AJIora+3y8P8QKc9tXZ5KiGJDSHIqPkx3x1WF1GMgo8IyRt4dNvkOuLX RFyzsN8GAFVspS9D7z6345YSaYn0 X-Google-Smtp-Source: AGRyM1shmR51hgUSzkYjrzXpo50RTXKBMHo2LfaPYP5d0aD8f1upKIpNIDN7artT8/mFizM7P/heSw== X-Received: by 2002:a17:907:2e0d:b0:72b:5cf4:464a with SMTP id ig13-20020a1709072e0d00b0072b5cf4464amr15017422ejc.87.1658869411635; Tue, 26 Jul 2022 14:03:31 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:1115:b0:726:d068:52af with SMTP id h21-20020a170906111500b00726d06852afls1352349eja.1.-pod-prod-gmail; Tue, 26 Jul 2022 14:03:30 -0700 (PDT) X-Received: by 2002:a17:907:a413:b0:72f:1959:f35f with SMTP id sg19-20020a170907a41300b0072f1959f35fmr15632210ejc.112.1658869410481; Tue, 26 Jul 2022 14:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658869410; cv=none; d=google.com; s=arc-20160816; b=CivMQQc5uCSr9l1zuOK0460yMB014EBPvOm0sBMIwI2siLTvS6Kz77QUgQ8DRyLoa+ apJtFFRZRjnLsQgBIzH/laP/ZE8vqAWyXhvj8d1wa4kTcnQu8+n5Mtzz+Ejt0vK70m2V tG5TiWYf3NbvdawUhzLY3J8EHsVHRgJNKNaJbGyr0YgqIsNAZOv69Sep2sKn1zfmqCRU PtA2u9Qf6ZrVsu0LTa36s6NofuWrDzEsxj6BuionIKKl3189vLQ6c1bPMM2+235OtPIJ 0x/GXKA9Ekx32Z4Gp5pId28X14Nlt4Ss7p0F3SqELXbkzdeOefF0SzmBr7oDrXLTAwDI 0ZTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=aNGQLRTnPxlP6A96D7J1ivHff8xTlXOO4TAacZru318=; b=DoORM3Y+oaaJi30LDo0RPiQNV5GspqwWgGNacbLRCZE0lw2VKS4sQh/DagxEXnrRmu SrV78tlHt1zRlnB/frlwXkM+wPAnjDiNiN8JxNw2o0R1hmBCr2LK0gX9o+RdMhRCH0iQ E33xRpp6jPJFo6YfJ2EOpRDuxm8iqKVmanWu3B2djMMDyzVhOy6mnY+Gc48X0mHyA/wW i5IGF5FXwAJJyji/VLKCncav0jyB0zjw/5fDvvE8HKbAM0OoZt5mfAHAx+TJZkWg5wbc tOBsniAZZCinBf3LDEYn13ol8ym5f7oBz2hhAJHsM6Aqcwb2Hm/qf5STHyZJz6m+wZWC Y7zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KECnBmgq; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id p19-20020a17090653d300b006fe9e596ab5sor5801835ejo.121.2022.07.26.14.03.30 for (Google Transport Security); Tue, 26 Jul 2022 14:03:30 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:ef8b:b0:72b:4a67:8ae5 with SMTP id ze11-20020a170906ef8b00b0072b4a678ae5mr15506155ejb.763.1658869410261; Tue, 26 Jul 2022 14:03:30 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id y19-20020aa7d513000000b0043a7293a03dsm9092849edq.7.2022.07.26.14.03.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 14:03:29 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-can@vger.kernel.org, Marc Kleine-Budde , Oliver Hartkopp , michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wolfgang Grandegger , netdev@vger.kernel.org Subject: [RFC PATCH v3 5/9] can: slcan: use the generic can_change_mtu() Date: Tue, 26 Jul 2022 23:02:13 +0200 Message-Id: <20220726210217.3368497-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220726210217.3368497-1-dario.binacchi@amarulasolutions.com> References: <20220726210217.3368497-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KECnBmgq; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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, }; /******************************************