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] [day] [month] [year] [list]
Date:   Wed, 16 Feb 2022 20:49:39 +0200
From:   Gal Pressman <gal@...dia.com>
To:     Alexander Lobakin <alexandr.lobakin@...el.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        Paolo Abeni <pabeni@...hat.com>,
        Maxim Mikityanskiy <maximmi@...dia.com>
Subject: Re: [PATCH net-next] net: gro: Fix a 'directive in macro's argument
 list' sparse warning

On 16/02/2022 16:06, Alexander Lobakin wrote:
> From: Gal Pressman <gal@...dia.com>
> Date: Wed, 16 Feb 2022 12:31:00 +0200
>
>> Following the cited commit, sparse started complaining about:
>> ../include/net/gro.h:58:1: warning: directive in macro's argument list
>> ../include/net/gro.h:59:1: warning: directive in macro's argument list
>>
>> Fix that by moving the defines out of the struct_group() macro.
> Ah, correct, sorry that I missed it during the initial review.
>
> Acked-by: Alexander Lobakin <alexandr.lobakin@...el.com>

Thank you!

>> Fixes: de5a1f3ce4c8 ("net: gro: minor optimization for dev_gro_receive()")
>> Reviewed-by: Maxim Mikityanskiy <maximmi@...dia.com>
>> Signed-off-by: Gal Pressman <gal@...dia.com>
>> ---
>>  include/net/gro.h | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/net/gro.h b/include/net/gro.h
>> index a765fedda5c4..146e2af8dd7d 100644
>> --- a/include/net/gro.h
>> +++ b/include/net/gro.h
>> @@ -35,6 +35,8 @@ struct napi_gro_cb {
>>  	/* jiffies when first packet was created/queued */
>>  	unsigned long age;
>>  
>> +#define NAPI_GRO_FREE		  1
>> +#define NAPI_GRO_FREE_STOLEN_HEAD 2
> 1. Maybe add a comment above the definitions that they belong to
> the `napi_gro_cb::free` field?
> 2. Maybe align the second with tabs while at it?

Sure, will add a comment and fix the alignment.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ