Re: [PATCH v5 2/2] staging: rtl8192e: replace macro defines with variables

From: Dan Carpenter
Date: Thu Nov 10 2022 - 06:07:13 EST


On Thu, Nov 10, 2022 at 09:35:11PM +1100, Jacob Bai wrote:
> -u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN] = {
> +u32 RTL8192E_PHY_REG_1T2R_ARRAY[] = {
> 0x800, 0x00000000,
> 0x804, 0x00000001,
> 0x808, 0x0000fc00,
> @@ -158,8 +159,9 @@ u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN] = {
> 0xe18, 0x161a1a1a,
> 0xe1c, 0x12121416,
> };
> +u32 RTL8192E_PHY_REG_1T2R_ARRAY_LEN = ARRAY_SIZE(RTL8192E_PHY_REG_1T2R_ARRAY);

This patch is kind of a headache to review. I have to go through and
count 148 array elements to ensure that the array hasn't changed size.

But the first patch renames all these arrays, so I first have go back
to patch #1 to find the original name. It might be easier to do the
renames afterward.

Also the commit message should say something like "I have checked the
object code and there is no change at all" or "I have counted all these
array elements and there is no change to the size of the array."

regards,
dan carpenter