From patchwork Fri Nov 6 22:17:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 320876 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1674877ilc; Fri, 6 Nov 2020 14:19:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoGHRmdcpK5R74BbdWIsp8Y7/9By17iKsmYkIdO3tzAwu8wZYk00Nn1Pjxb9RA7lvn+KVz X-Received: by 2002:a50:d84a:: with SMTP id v10mr4398000edj.84.1604701159818; Fri, 06 Nov 2020 14:19:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604701159; cv=none; d=google.com; s=arc-20160816; b=Sqhd8aQD5TxWKYhEvtcrvhPaImGzCQfjpVbYEDNemFkDGRw3QbzkWa+iSgmUFvW2E0 diMWiNcooH1uGLnDrHTsN7xoXTjZ8LY8BO8GUsFiirqoqjB63yAK5YfTzPmgdmtWgiWV dwZ/um6wWDQsQvY/Keuh/bo6nQJSkBYfjRm0OfUK5d8ykXHARLBUwdkcqtXOkdhcZ1Rv SGSi2UWJRWf6Gd9rGtjkrj/XOYMB/ldCP+GrPM7oP+WUfgZ3HWs0YgnApTadcP9BFf3+ dbZ4h+ZgsMjNWSSUipyBSiQjqKUmqrQu2sxporkieBOyhjLYVrBhCEtjo0MbfFcNdnaT ks/Q== 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=sJLYaYNAIQAqC3z2Lje8ev/I8/a9VYZj8SEFU68xiV4=; b=PBBpiS7f7f+15D/y1Z95CTmnS2XHd5zRgHKvpIc0Nmidc2GzkjXIbP4qvot43N91EK MkV0dfL+IGE3jzLlgfv7lfbyTfVKdn2W903l+t9Kim1k/jvm3an7cRIalV4LzdRZAlSp 9i2C48H+5BQXooJqEqfNnJNDXbdSpsR460lru1Z3u2FSq/e6UVc7pvPcvECuCV/IOzX9 WRynPTFe2VzFgegd9oDZKUMlFxgKuto/MbkOgs5LbXjEOgCXjkgnkT3P70hm/UBEVrKQ 86IIQSY2Sxij9h/aocVC/r9y9yKpVMDAg82D4HAZw6wWVo2qclsEScwgyQUqts+4qwuh 8tVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l61PuB19; 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 k12si1809018ejd.562.2020.11.06.14.19.19; Fri, 06 Nov 2020 14:19:19 -0800 (PST) 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=default header.b=l61PuB19; 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 S1729247AbgKFWTP (ORCPT + 8 others); Fri, 6 Nov 2020 17:19:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:42770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729226AbgKFWTM (ORCPT ); Fri, 6 Nov 2020 17:19:12 -0500 Received: from localhost.localdomain (HSI-KBW-46-223-126-90.hsi.kabel-badenwuerttemberg.de [46.223.126.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 542E02224A; Fri, 6 Nov 2020 22:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604701151; bh=HjouUAoEbv0fMI8xUTp5LuywhWHtVz/DrEjJeJXaZ4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l61PuB19EoIDJZjY/OHKZxkG09zPGFkevmFhYWsFiBqosQE0ecG7xL6atVeYECwMo DxMtxYUguIBvP4yLPd+c8cS0A3QN8z3HxXeTwnPuPiLb2SRN67oZltz0EcMBaHMB3K iR+t+muAhkns1/PKithlvzGD6M/1YHQcLqsvxXxE= From: Arnd Bergmann To: netdev@vger.kernel.org Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, bridge@lists.linux-foundation.org, linux-hams@vger.kernel.org, Jakub Kicinski , Christoph Hellwig , Alexander Viro , Johannes Berg , Andrew Lunn , Heiner Kallweit Subject: [RFC net-next 27/28] ppp: use ndo_siocdevprivate Date: Fri, 6 Nov 2020 23:17:42 +0100 Message-Id: <20201106221743.3271965-28-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201106221743.3271965-1-arnd@kernel.org> References: <20201106221743.3271965-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann ppp has a custom statistics interface using SIOCDEVPRIVATE ioctl commands that works correctly in compat mode. Convert it to use ndo_siocdevprivate as a cleanup. Signed-off-by: Arnd Bergmann --- drivers/net/ppp/ppp_generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.27.0 diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 7d005896a0f9..c39ba3d27283 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -1342,11 +1342,11 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev) } static int -ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +ppp_net_siocdevprivate(struct net_device *dev, struct ifreq *ifr, + void __user *addr, int cmd) { struct ppp *ppp = netdev_priv(dev); int err = -EFAULT; - void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data; struct ppp_stats stats; struct ppp_comp_stats cstats; char *vers; @@ -1454,7 +1454,7 @@ static const struct net_device_ops ppp_netdev_ops = { .ndo_init = ppp_dev_init, .ndo_uninit = ppp_dev_uninit, .ndo_start_xmit = ppp_start_xmit, - .ndo_do_ioctl = ppp_net_ioctl, + .ndo_siocdevprivate = ppp_net_siocdevprivate, .ndo_get_stats64 = ppp_get_stats64, };