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: <65fdf18b-a40b-4f49-b892-c8446e814e61@intel.com>
Date: Tue, 14 May 2024 08:36:09 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: "Keller, Jacob E" <jacob.e.keller@...el.com>, 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>
Subject: Re: [Intel-wired-lan] [iwl-next v2 05/15] ice: allocate devlink for
 subfunction

On 5/13/24 23:37, Keller, Jacob E wrote:
> 
> 
>> -----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
> 

Documentation/process/maintainer-netdev.rst says nothing about how to
resolve ties, and we sort by byte-count of given line. For me it means
that author is free to decide.
(Thank ASCII gods that we don't accept full width CJK chars;)

Here order is correct, swapping devlink_port and dyn_port lines will
be equally correct.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ