From patchwork Tue Jul 20 14:46:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 481544 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5241686jao; Tue, 20 Jul 2021 08:32:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvxy2TH4vsDL5xUKyyog1Bar6hFUvi8Ltu2AWd3AdOjx4W+wCfA6hVbJwGVLTYThja6qd/ X-Received: by 2002:a05:6602:2245:: with SMTP id o5mr23868376ioo.20.1626795123037; Tue, 20 Jul 2021 08:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626795123; cv=none; d=google.com; s=arc-20160816; b=P4Fp0b1mNPk1llxQ5yPlBQtXm78ACN+UpgK4K64UpmkzXZAjEhfocr+0kW4J6ihh0c uLywfbvJT4Cyo3aRxLrMY0SZhbq8lxVfsykWWwnzU1CTzc7HHQb0tvWO0eok+WLQ8as9 gaOVj5FnLSZFOfdtCs6cpPiw1wElShilHDez1ZaLyHus0OUNl24WWOi8SoEePAeMCmmF pu7xDCmINy8qTGMcpAqPpFgQbvA4GLwH/XBJ7IHc35Dl/T6MjTY7r81+7NGiBF4rjRJZ a9l1eqGJJtpBjuq7M/nlGJ4uhye6PhY9bkRnhiGAC/a7Ni0wfL9wuqzZryGyANZ7iAA0 SjJQ== 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=MW0Et6yn0x/FzoWqZyHCCSafPHixrgl7p0tVSbvI/SQ=; b=Ee8DVyMJ09G1yLk4X/92X6Mjfr0B0ZNzF+cQXMrAxFHckj7NYF+yOK4lwX+tcOIXe3 FqACgVnZQ7GXlyc3AV4CCtzrQi5w7B+iiSURzi8DA7wg3BXXgU7SHnq7RFkiO9GaterN AjOEzw+7S5vpxFGf2QmS283VZvqVIZM3HouT834JOuUDtaRetZv+1/RVuyDLYD1G93v3 X91IHcRcwYY2E+Lvrvu2zMWBKvtk7A+Vdei8Osf4Qp5HuB9PF910XxwvREdhEWP3FBJO fHtqWcZmzs0H/Ff/nxlSNTg9fwahOD4aETvqeZFyZgzJpEOaZirmRceCrCYGW0tZxY9H I3lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nGvTGWF7; 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.32.02; Tue, 20 Jul 2021 08:32:03 -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=nGvTGWF7; 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 S240252AbhGTOtL (ORCPT + 8 others); Tue, 20 Jul 2021 10:49:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:57366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239959AbhGTOVt (ORCPT ); Tue, 20 Jul 2021 10:21:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A5D0561287; Tue, 20 Jul 2021 14:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626792439; bh=bQyvPlSHaN7O4KBdIUZXvJlU77ZYJ1DL+/RyCtFKyWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nGvTGWF7PD3vpUbSrTk1jBsTNJFYzZ1PUZVYkpBLobrbGcXtonsbza706Z9T9qoAw BPW17w6li1S4ypCzGMhrysVjImsY9ageJm1e5Sm8Dkwe0/cc1OqsVThOBC1anijbz2 VqF+QH5qNt+WiHY+E2rjMSRaJ8TMX5+xJkRvplJZHK0QN6oGmnjTUskwDCFWYObQf5 R95vz3msPRXUoDUJCiquGigCKpqSolRw99MpEBUqCzawYn/ziqlF26rv5bPQ6dM0OS 13MJYauSNiy2zUEyZBjQOPBnBy9zAv7eNaIEjf5G0uFnFxWN9cdgWBSEbS65VSu11j QP8Yozye+Lnug== From: Arnd Bergmann To: netdev@vger.kernel.org Cc: Christoph Hellwig , Arnd Bergmann Subject: [PATCH net-next v2 23/31] ppp: use ndo_siocdevprivate Date: Tue, 20 Jul 2021 16:46:30 +0200 Message-Id: <20210720144638.2859828-24-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 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.29.2 diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 930e49ef15f6..216a9f4e9750 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -1452,11 +1452,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; @@ -1585,7 +1585,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, .ndo_fill_forward_path = ppp_fill_forward_path, };