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: <Y2zfU+Cw0/odYATm@kadam>
Date:   Thu, 10 Nov 2022 14:24:03 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Jacob Bai <jacob.bai.au@...il.com>
Cc:     gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/2] staging: rtl8192e: rename tables in r8192e_hwimg.c

Look at how these defines are used.  Take RTL8192E_PHY_REG_ARRAY_LEN
as an example.

On Thu, Nov 10, 2022 at 09:35:10PM +1100, Jacob Bai wrote:
> +u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN] = {0x0,};
> +#define RTL8192E_PHY_REG_ARRAY_LEN 1
> +extern u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN];
> +#define PHY_REGArrayLength			RTL8192E_PHY_REG_ARRAY_LEN

It's only used to create the PHY_REGArrayLength define.  Layers upon
layers of indirection.  Get rid of the RTL8192E_PHY_REG_ARRAY_LEN
completely just do:

#define PHY_REGArrayLength 1

Except get rid of that as well and use ARRAY_SIZE().

What I'm saying is don't send a v6 of this patch.  Just step back and
try to figure out how to get rid of all this code instead of renaming
the variable.s

regars,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ