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]
Message-ID: <5BA2253F.4090409@huawei.com>
Date:   Wed, 19 Sep 2018 18:30:23 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     <davem@...emloft.net>
CC:     <jhs@...atatu.com>, <xiyou.wangcong@...il.com>, <jiri@...nulli.us>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: sched: Use FIELD_SIZEOF directly instead of reimplementing
 its function

On 2018/9/19 17:56, zhong jiang wrote:
> FIELD_SIZEOF is defined as a macro to calculate the specified vaule. Therefore,
> We prefer to use the macro rather than calculating its vaule.
s/vaule/value.    will resend. sorry.

Thanks
zhong jiang
> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
> ---
>  net/sched/cls_flower.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c
> index 4b8dd37..9aada2d 100644
> --- a/net/sched/cls_flower.c
> +++ b/net/sched/cls_flower.c
> @@ -993,7 +993,7 @@ static int fl_init_mask_hashtable(struct fl_flow_mask *mask)
>  }
>  
>  #define FL_KEY_MEMBER_OFFSET(member) offsetof(struct fl_flow_key, member)
> -#define FL_KEY_MEMBER_SIZE(member) (sizeof(((struct fl_flow_key *) 0)->member))
> +#define FL_KEY_MEMBER_SIZE(member) FIELD_SIZEOF(struct fl_flow_key, member)
>  
>  #define FL_KEY_IS_MASKED(mask, member)						\
>  	memchr_inv(((char *)mask) + FL_KEY_MEMBER_OFFSET(member),		\


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ