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: <8b8d2f27-7295-4740-3264-9b4883153dd5@intel.com>
Date:   Mon, 21 Nov 2022 10:35:34 -0800
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     <netdev@...r.kernel.org>, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next 2/8] devlink: use min_t to calculate data_size



On 11/21/2022 9:51 AM, Jacob Keller wrote:
> On 11/18/2022 5:36 PM, Jakub Kicinski wrote:
>>> diff --git a/net/core/devlink.c b/net/core/devlink.c
>>> index 96afc7013959..932476956d7e 100644
>>> --- a/net/core/devlink.c
>>> +++ b/net/core/devlink.c
>>> @@ -6410,14 +6410,10 @@ static int 
>>> devlink_nl_region_read_snapshot_fill(struct sk_buff *skb,
>>>       *new_offset = start_offset;
>>>       while (curr_offset < end_offset) {
>>> -        u32 data_size;
>>> +        u32 data_size = min_t(u32, end_offset - curr_offset,
>>> +                      DEVLINK_REGION_READ_CHUNK_SIZE);
>>
>> nit: don't put multi-line statements on the declaration line if it's
>> not the only variable.
>>
> 
> Sure, that makes sense.
> 

This becomes the only variable in patch 5 of 8. It ends up making the 
diff look more complicated if I change it back to a combined 
declare+assign in that patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ