lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZK2Wf4man0H4e9Zz@corigine.com>
Date:   Tue, 11 Jul 2023 18:50:55 +0100
From:   Simon Horman <simon.horman@...igine.com>
To:     Su Hui <suhui@...china.com>
Cc:     mostrows@...thlink.net, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, xeb@...l.ru,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org, wuych <yunchuan@...china.com>
Subject: Re: [PATCH net-next v2 03/10] net: ppp: Remove unnecessary (void*)
 conversions

On Mon, Jul 10, 2023 at 02:40:27PM +0800, Su Hui wrote:
> From: wuych <yunchuan@...china.com>
> 
> Pointer variables of void * type do not require type cast.
> 
> Signed-off-by: wuych <yunchuan@...china.com>
> ---
>  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;

Hi,

Please don't break reverse xmas tree ordering - longest line to shortest -
of local variable declarations in Networking code.

-- 
pw-bot: changes-requested

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ