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]
Date: Mon, 13 May 2024 21:37:51 +0000
From: "Keller, Jacob E" <jacob.e.keller@...el.com>
To: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>, "Kalesh Anakkur
 Purayil" <kalesh-anakkur.purayil@...adcom.com>
CC: "shayd@...dia.com" <shayd@...dia.com>, "Fijalkowski, Maciej"
	<maciej.fijalkowski@...el.com>, "Polchlopek, Mateusz"
	<mateusz.polchlopek@...el.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "jiri@...dia.com" <jiri@...dia.com>, "Kubiak,
 Michal" <michal.kubiak@...el.com>, "intel-wired-lan@...ts.osuosl.org"
	<intel-wired-lan@...ts.osuosl.org>, "pio.raczynski@...il.com"
	<pio.raczynski@...il.com>, "Samudrala, Sridhar"
	<sridhar.samudrala@...el.com>, "Drewek, Wojciech"
	<wojciech.drewek@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>
Subject: RE: [Intel-wired-lan] [iwl-next v2 05/15] ice: allocate devlink for
 subfunction



> -----Original Message-----
> From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Sent: Monday, May 13, 2024 3:23 AM
> To: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@...adcom.com>
> Cc: shayd@...dia.com; Fijalkowski, Maciej <maciej.fijalkowski@...el.com>;
> Polchlopek, Mateusz <mateusz.polchlopek@...el.com>; netdev@...r.kernel.org;
> jiri@...dia.com; Kubiak, Michal <michal.kubiak@...el.com>; intel-wired-
> lan@...ts.osuosl.org; pio.raczynski@...il.com; Samudrala, Sridhar
> <sridhar.samudrala@...el.com>; Keller, Jacob E <jacob.e.keller@...el.com>;
> Drewek, Wojciech <wojciech.drewek@...el.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>
> Subject: Re: [Intel-wired-lan] [iwl-next v2 05/15] ice: allocate devlink for
> subfunction
> 
> On Mon, May 13, 2024 at 02:55:48PM +0530, Kalesh Anakkur Purayil wrote:
> > On Mon, May 13, 2024 at 2:03 PM Michal Swiatkowski
> > > +       struct devlink_port_attrs attrs = {};
> > > +       struct devlink_port *devlink_port;
> > > +       struct ice_dynamic_port *dyn_port;
> > [Kalesh] Try to maintain RCT order for variable declaration.
> 
> Maybe I don't understand RCT order correctly, but based on my
> understanding it is fine. Which declaration here break RCT order?
> 
> Do you mean that ice_dynamic_port is longer than devlink_port and should
> be moved up? Didn't know that RCT is also applied to inner part of
> declaration. If there will be more comments I will move it in another
> spin.
> 

RCT (Reverse Christmas Tree) order would be to put the longest declaration line first then the rest in order down to shortest. RCT is preferred over using initializers in the case where initializers would add a dependency that forces a non-RCT ordering. In that case, you would delay initialization to a block after the declarations.

So here, you would put dyn_port first, then attrs, then devlink_port.

Thanks,
Jake

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ