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: <20241220064634.10b127f9@kernel.org>
Date: Fri, 20 Dec 2024 06:46:34 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Cc: Tariq Toukan <tariqt@...dia.com>, Jianbo Liu <jianbol@...dia.com>,
 <netdev@...r.kernel.org>, Saeed Mahameed <saeedm@...dia.com>, Gal Pressman
 <gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Mark Bloch
 <mbloch@...dia.com>, "David S. Miller" <davem@...emloft.net>, Paolo Abeni
 <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, Andrew Lunn
 <andrew+netdev@...n.ch>
Subject: Re: [PATCH net 4/4] net/mlx5e: Keep netdev when leave switchdev for
 devlink set legacy only

On Fri, 20 Dec 2024 09:48:11 +0100 Przemek Kitszel wrote:
> >   	mlx5_core_uplink_netdev_set(mdev, NULL);
> >   	mlx5e_dcbnl_delete_app(priv);
> > -	unregister_netdev(priv->netdev);
> > -	_mlx5e_suspend(adev, false);
> > +	/* When unload driver, the netdev is in registered state  
> 
> /*
>   * Netdev dropped the special comment allowance rule,
>   * now you have to put one line almost blank at the front.
>   */

Incorrect, we still prefer the old comment style, we just give a pass 
now to people who have a strong preference the opposite way.

> > +	 * if it's from legacy mode. If from switchdev mode, it
> > +	 * is already unregistered before changing to NIC profile.
> > +	 */
> > +	if (priv->netdev->reg_state == NETREG_REGISTERED) {
> > +		unregister_netdev(priv->netdev);
> > +		_mlx5e_suspend(adev, false);
> > +	} else {
> > +		struct mlx5_core_dev *pos;
> > +		int i;
> > +
> > +		if (test_bit(MLX5E_STATE_DESTROYING, &priv->state))  
> 
> you have more than one statement/expression inside the if,
> so you must wrap with braces

I'm not aware of that as a hard rule either.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ