From patchwork Tue Jul 20 14:46:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 481535 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5238005jao; Tue, 20 Jul 2021 08:27:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm9PFR8iXizNeElMqt53Faace20e+kyLORd0pnhhEMV6Eg1VSFhm/PTrOvSBHJvRjRn8+o X-Received: by 2002:a5d:9b14:: with SMTP id y20mr22956513ion.8.1626794875978; Tue, 20 Jul 2021 08:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626794875; cv=none; d=google.com; s=arc-20160816; b=KhU3iINOBVJyhIYtOyGKIgEp5d45KvbbEBc1F7Lfk4wqEObV6gZrk6eKboI16lj9+F 28Av19sCfbg6OoEnd56Cbicb1KqSDCInRT7rpjhlzVMzs6Fow5AwCuWbrRiTD6+RYCB7 QLqvf46eOXPlj5ZHq3c7FGvPRAWMYAmRTBgzVoaNQcJtdVU83bOpLhTWflIdQufGRSu8 1cFgm0H9uQy7boPAtnGtsUK0mIhgKppz7fFgexXcuoPU3xH6UlGl976/tf9bjbdM7xbT LLBsCYHGE+6vjkq1pIczHXToXgjFbF5+9tZxKC7dW387RwAgimKHz8ncR1s7ZLGRAHDj 4cdQ== 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=uuISp+6o7eQhf/Vtn2K8m0j/SP/5EjoPlJDPT3pEDdI=; b=tl1dQOa0b5RzmN7Tp59vIc+HMJlrjoPu1FCocvwnF7C/p2TN3EFAA/ajkj/AUhCfXR 6UbqSYZl3sn3IXlhkJaV8UztAoy4px8JsNmpH9b8Gg21iCuLrsLTNH12Ja/KbyrCCKzD Z8gPzwykEr+uktpLdUAKkBzBggw7YWEcgRtCYCnQ91t+kaJqGBrfFxs+cXtfBS/alDQQ dZicSnbdYBaLbLMSb+6Rc4Zi5il+TkCWnaApRJC/dXygUPq5jYvVRs0dmAW+uHKjuuLD dshXK+R5g+hxXeXY58JMGdLU/2R33fyVIV2oGfAOG7ozwKJ3IIP2rKzEWzIT2Z8ObPA5 oc8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IWgFpSCz; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o7si26753193ilc.64.2021.07.20.08.27.55; Tue, 20 Jul 2021 08:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IWgFpSCz; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241118AbhGTOk1 (ORCPT + 8 others); Tue, 20 Jul 2021 10:40:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:57356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239525AbhGTOUs (ORCPT ); Tue, 20 Jul 2021 10:20:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F31B06128A; Tue, 20 Jul 2021 14:47:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626792441; bh=kpHbOB2ACnJvk6XXUBuWOthVbzfT+czPTSvWCHQbRf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IWgFpSCzJathPKg+Zu+eEuyhFMrz/yk1TDuPeyVmH+KfQoAMbUlpmKU5B0XlaKY2h LAF2ZEDyxBqtD/sAPMbNdD4kBbUDcVCYA9ZFm2Lq4DMsdl0Dfe9sUta+ZKHOgX5xGc RP1Ea+63Y5hP2Afkgsa1wvuEDYuXZ+X/+P2KmcH9cfl5FjfR6bbSxQp5p3SGaRNZ8x C9RKWqzjKYUyJTa07uErBE58PTNn1MEGFCdR63A3cw4h6X57Nzmwm1+IYmG1/Fgds6 XKFaj0IumIz7gdft5+/euU2vc3WPbsyaqZ88U8b7XSjw9amCAqe0AJaZK9KsTTwsN5 ZRn+2p7bD/+Dw== From: Arnd Bergmann To: netdev@vger.kernel.org Cc: Christoph Hellwig , Arnd Bergmann Subject: [PATCH net-next v2 25/31] wan: cosa: remove dead cosa_net_ioctl() function Date: Tue, 20 Jul 2021 16:46:32 +0200 Message-Id: <20210720144638.2859828-26-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210720144638.2859828-1-arnd@kernel.org> References: <20210720144638.2859828-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann The ndo_do_ioctl callback is never called with the COSAIO* commands, so this is never used. Call the hdlc_ioctl function directly instead. Any user space code that relied on this function working as intended has never worked in a mainline kernel since before linux-1.0. Signed-off-by: Arnd Bergmann --- drivers/net/wan/cosa.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) -- 2.29.2 diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c index 43caab0b7dee..4c0e9cf02217 100644 --- a/drivers/net/wan/cosa.c +++ b/drivers/net/wan/cosa.c @@ -267,7 +267,6 @@ static netdev_tx_t cosa_net_tx(struct sk_buff *skb, struct net_device *d); static char *cosa_net_setup_rx(struct channel_data *channel, int size); static int cosa_net_rx_done(struct channel_data *channel); static int cosa_net_tx_done(struct channel_data *channel, int size); -static int cosa_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); /* Character device */ static char *chrdev_setup_rx(struct channel_data *channel, int size); @@ -415,7 +414,7 @@ static const struct net_device_ops cosa_ops = { .ndo_open = cosa_net_open, .ndo_stop = cosa_net_close, .ndo_start_xmit = hdlc_start_xmit, - .ndo_do_ioctl = cosa_net_ioctl, + .ndo_do_ioctl = hdlc_ioctl, .ndo_tx_timeout = cosa_net_timeout, }; @@ -1169,18 +1168,6 @@ static int cosa_ioctl_common(struct cosa_data *cosa, return -ENOIOCTLCMD; } -static int cosa_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) -{ - int rv; - struct channel_data *chan = dev_to_chan(dev); - - rv = cosa_ioctl_common(chan->cosa, chan, cmd, - (unsigned long)ifr->ifr_data); - if (rv != -ENOIOCTLCMD) - return rv; - return hdlc_ioctl(dev, ifr, cmd); -} - static long cosa_chardev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {