From patchwork Mon Jul 17 03:11:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Yunchuan X-Patchwork-Id: 121021 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp884641vqt; Sun, 16 Jul 2023 20:37:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlFf/Z0YTOZc8MPRLNpD0eotszL4Mhu6iq92N5xeqBcydGgxVdSGiU4aVW39iAm7ahhFWeOI X-Received: by 2002:a17:902:6a8c:b0:1b8:90bd:d157 with SMTP id n12-20020a1709026a8c00b001b890bdd157mr11370817plk.26.1689565058746; Sun, 16 Jul 2023 20:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689565058; cv=none; d=google.com; s=arc-20160816; b=d+hhdp4d1rLcGPsLTEVJAhuc3ez9ZJCt/juDNWcyp/mqWBH9NtNdNjutCabRCgmy8X cE/ir0JrEOOFJuffTro9WosDVly9V2N1NxrYMy+5XivDqF3Sh5GtWNkn8U/zwWaITwNs 7g9RNiUvehqD9GkGqv3Fu7AXIU4V2HsrEdPRPUMFwL4mV22YlpAoJGV9F9JvFhS2DKBL f2+LpU010i8Nb7n+bEuV+eHofGdO9K4MSkvwLthTwrbm2QAfTyTSraDSkJdKUxTtngj5 UItfd3426iZY8NI5mEZolAVOjO4JhUflyhzzh1wOqpK76a2JfBY+m4nGgbpQYUHnKCCu mF+A== 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 :message-id:date:subject:cc:to:from; bh=EVnNb3HPiqiJixui28J63Wh09sP9c6151aaKLoiYHaQ=; fh=h5cCB7cZyuL1WJASUsw0XLzy+nlkIWJl668ijkKbiIM=; b=mGksIydrT+cpTJ1K2xL/QzDZulPoTI0AhbHnHAbn2PlxEA/N/HYFJF+s2JAJIt0AIE BL/JYocexovCyg6CNZlmYTKPE7cYRwpri2tSM5twwmH29PNPIZzJWtJ+kIBe6xx6HDpr QOjL/lDYyuN26RUUqgFjjVvNOEdaeJDkEz+msR+sgLWXCuQxUtIkV2a/+TntGWBj7hKT 63PpzvrNwPvnIyH7MQAeGbmVT8aZrhcbZVod+SKLzmLv/SjYuxwvoNcZ936XplWVaUzU 8RahG5me7bY19V3usjHWjCETcCAwy9HjMO/GjVzXfpYF17liNBJfEJ/m/YaHBmQVHhOI XJtw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ld5-20020a170902fac500b001b3d6c68bd1si10513350plb.643.2023.07.16.20.37.24; Sun, 16 Jul 2023 20:37:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231268AbjGQDLo (ORCPT + 99 others); Sun, 16 Jul 2023 23:11:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231263AbjGQDLb (ORCPT ); Sun, 16 Jul 2023 23:11:31 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 74BEFE41; Sun, 16 Jul 2023 20:11:24 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 5BCED6012605B; Mon, 17 Jul 2023 11:11:22 +0800 (CST) X-MD-Sfrom: yunchuan@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Wu Yunchuan To: mostrows@earthlink.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, xeb@mail.ru Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Wu Yunchuan , Guillaume Nault Subject: [PATCH net-next v3 2/9] net: ppp: Remove unnecessary (void*) conversions Date: Mon, 17 Jul 2023 11:11:15 +0800 Message-Id: <20230717031115.54432-1-yunchuan@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RDNS_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771015722952551990 X-GMAIL-MSGID: 1771637371078974605 No need cast (void*) to (struct sock *). Signed-off-by: Wu Yunchuan Reviewed-by: Guillaume Nault --- drivers/net/ppp/pppoe.c | 4 ++-- drivers/net/ppp/pptp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index 3b79c603b936..ba8b6bd8233c 100644 --- a/drivers/net/ppp/pppoe.c +++ b/drivers/net/ppp/pppoe.c @@ -968,7 +968,7 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb) ***********************************************************************/ static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb) { - struct sock *sk = (struct sock *)chan->private; + struct sock *sk = chan->private; return __pppoe_xmit(sk, skb); } @@ -976,7 +976,7 @@ static int pppoe_fill_forward_path(struct net_device_path_ctx *ctx, struct net_device_path *path, const struct ppp_channel *chan) { - struct sock *sk = (struct sock *)chan->private; + struct sock *sk = chan->private; struct pppox_sock *po = pppox_sk(sk); struct net_device *dev = po->pppoe_dev; diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c index 32183f24e63f..6b3d3df99549 100644 --- a/drivers/net/ppp/pptp.c +++ b/drivers/net/ppp/pptp.c @@ -148,7 +148,7 @@ static struct rtable *pptp_route_output(struct pppox_sock *po, static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb) { - struct sock *sk = (struct sock *) chan->private; + struct sock *sk = chan->private; struct pppox_sock *po = pppox_sk(sk); struct net *net = sock_net(sk); struct pptp_opt *opt = &po->proto.pptp; @@ -575,7 +575,7 @@ static int pptp_create(struct net *net, struct socket *sock, int kern) static int pptp_ppp_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg) { - struct sock *sk = (struct sock *) chan->private; + struct sock *sk = chan->private; struct pppox_sock *po = pppox_sk(sk); struct pptp_opt *opt = &po->proto.pptp; void __user *argp = (void __user *)arg;