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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 25 Mar 2020 10:20:54 +0100
From:   Julian Wiedmann <jwi@...ux.ibm.com>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, linux-s390@...r.kernel.org,
        heiko.carstens@...ibm.com, ubraun@...ux.ibm.com
Subject: Re: [PATCH net-next 01/11] s390/qeth: simplify RX buffer tracking

On 25.03.20 00:43, David Miller wrote:
> From: Julian Wiedmann <jwi@...ux.ibm.com>
> Date: Tue, 24 Mar 2020 19:24:38 +0100
> 
>> +#define QDIO_ELEMENT_NO(buf, element)	(element - &buf->element[0])
> 
> Maybe this works, but I would strongly suggest against using a CPP
> macro argument that is the same name for the singleton element on
> the left branch of the expression as the struct member name on
> the right side of the element.

Right you are, this would look a lot less fragile with some underscores.

> 
> Furthermore, as far as I can tell this is only used in one location
> in the code, and for such a simple expression that is excessive.
> 

This I flat out disagree with, but it's hardly worth arguing about.
So let me fold that macro back in, and send you a v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ